Linux commands

Sunday, November 5, 2017

NSS is failed to communicate with Oracle Directory Server on cipher TLS_DHE_RSA_WITH_AES_128_CBC_SHA256



This is not a bug from NSS libs.

This issue is resolved by following change in ODSEE
Need to change the config in ODSEE

Add a New cipher suite as below.
enabled-ssl-cipher-suites:JRE


https://bugzilla.mozilla.org/show_bug.cgi?id=1366685. 

Tuesday, October 31, 2017

ld: fatal: file ./.libs/libpcre.so: wrong ELF class: ELFCLASS64

configure with --enable-utf8 --enable-unicode-properties --disable-cpp

./configure --prefix=/tmp/apache/pcre-8.41/Release/ --enable-utf8 --enable-unicode-properties --disable-cpp

Tuesday, September 5, 2017

fatal: File processing errors. No output written to .libs/htpasswd


Error 1:

fatal: File processing errors. No output written to .libs/htpasswd

This can be resovled by adding the below to ./configure command
--enable-static-htpasswd

Error 2:

ld: fatal: File processing errors. No output written to .libs/htdigest

This can be resovled by adding the below to ./configure command

--enable-static-htdigest


Error 3:
errors. No output written to .libs/httpd

best solution:
compile the expat library and provide the expat lib path to the configure command

provide the expat compiled libs to httpd(pa

./configure  --with-expat=/tmp/libexpat/Release/

checking the archiver (false) interface... unknown

it is unable to find the ar command, so set the path as below

set path
export PATH=/usr/ccs/bin:/usr/sbin:/usr/bin:/usr/sfw/bin:/usr/sfw/sbin:$PATH

Monday, June 19, 2017

ProviderTest.exe example

C:\Program Files (x86)\CA\erpconn\siebel\bin>ProviderTest.exe
Enter username: sadmin (username should authenticate and Authorization in User directory given in policies)
Enter password: sadmin (username should validated in User directory given in policies)
Testing provider with username 'sadmin' and password 'sadmin'
Loading library... OK
Finding entry point... OK
Enter Config File: C:\Siebel\8.1.1.14.0\ses\siebsrvr\BIN\SmSiebelSSO.conf
Calling SecurityLogin()...OK
pUser is NULL
Provider test failed

ERR: SmAgentConnection::SetResource Agent API Error (No Connection)

Trouble shoot
restarted the policy server
corrected the config file C:\Siebel\8.1.1.14.0\ses\siebsrvr\BIN\SmSiebelSSO.conf

correct conf file as below.
#ClusterThreshold=50
AgentName=agent
SharedSecret=****
Resource=/SiebelConnector/

testprovider correct output


C:\Program Files (x86)\CA\erpconn\siebel\bin>ProviderTest75.exe
Loading Security Adapter
OK
Security Adapter API Version is correct
Enter username: user1   (This is ldap user, not the siebel admin user)
Enter password: ****  
Testing provider with username 'user1' and password '****'
Enter Config File: C:\Siebel\8.1.1.14.0\ses\siebsrvr\BIN\SmSiebelSSO.conf
Calling SecurityLogin()...Number of roles to save is 0OK
Return code is OK
Test 1: SecurityGetUsername8()
        Username: user1
Test 2: SecurityGetAccountStatus8()
        Account state: ACTIVE
Test 3: SecurityGetCredentials8()
        pCred->m_pType: Test1
        pCred->m_pUsername: sadmin
        pCred->m_pPassword: 6 characters long
Test 4: GetUserInfo:
        m_accountStatus: ACTIVE
        m_bPasswordSet: 0
        m_pCredentialsArray
                #:       Type |   Username |   Password
                --------------+------------+-----------
                0:            |     sadmin |    6 chars
        No further credentials
        m_pNewUsername: (None)
        m_pPassword: (None)
Test 5: GetRoles()
        SecurityGetRoles8 returned SecurityErrOK
        Total: 0 roles

Friday, June 9, 2017

gmake[4]: ../../../config/./nsinstall: Command not found

solution:
If you start compilation with NSPR then this error will through 

so don't do first nspr build ,

Do NSS build only from nss folder.
cd nss
gmake BUILD_OPT=1 NSPR_INCLUDE_DIR=/root/nss/ USE_SYSTEM_ZLIB=1 ZLIB_LIBS=-lz nss_build_all

ld: fatal: Symbol referencing errors. No output written to libnspr4.so

Solution:
Go to nspr folder and Build nspr with 
./Configure

ld: fatal: library -lplc4: not found

ld: fatal: library -lplc4: not found
ld: fatal: library -lplds4: not found

Solution:
Goto 
nss-3.20/dist/SunOS5.10_DBG.OBJ/lib/
bash-3.2# ldd libplc4.so
ldd: libplc4.so: cannot open file: No such file or directory
bash-3.2# ls -ltr
total 112
drwxr-xr-x   3 root     root         185 Nov 10 11:53 cpu
lrwxrwxrwx   1 root     root          51 Nov 10 12:11 libnspr4.a -> ../../../nspr/SunOS5.10_DBG.OBJ/pr/src/./libnspr4.a
lrwxrwxrwx   1 root     root          52 Nov 10 12:11 libnspr4.so -> ../../../nspr/SunOS5.10_DBG.OBJ/pr/src/./libnspr4.so
lrwxrwxrwx   1 root     root          51 Nov 10 12:11 libplds4.a -> ../../../nspr/SunOS5.10_DBG.OBJ/lib/ds/./libplds4.a
lrwxrwxrwx   1 root     root          52 Nov 10 12:11 libplds4.so -> ../../../nspr/SunOS5.10_DBG.OBJ/lib/ds/./libplds4.so
lrwxrwxrwx   1 root     root          56 Nov 10 12:11 libplc4.a -> ../../../nspr/SunOS5.10_DBG.OBJ/lib/libc/src/./libplc4.a
lrwxrwxrwx   1 root     root          57 Nov 10 12:11 libplc4.so -> ../../../nspr/SunOS5.10_DBG.OBJ/lib/libc/src/./libplc4.so

All are soft links here and soft links path are incorrect here. please copy the original so files created in below.
cd nss-3.20
bash-3.2# cp nspr/lib/libc/src/libplc4.so dist/SunOS5.10_DBG.OBJ/lib/
bash-3.2# cp nspr/lib/ds/libplds4.so dist/SunOS5.10_DBG.OBJ/lib/
cp nspr/pr/src/libnspr4.so dist/SunOS5.10_DBG.OBJ/lib/

configure: error: C compiler cannot create executables

Issue 2:
checking whether the C compiler works... no
configure: error: in `/home/kanmu03/nss-3.20/nspr':
configure: error: C compiler cannot create executables

Solution:
You need CC or gcc compiler when you compiling the NSS

We prefer the CC or cc compiler wich comes with solaris studio, you can download solaris studio from oracle site.

Un zip the solaris studio and set path to compiler CC or cc

export PATH=/usr/ccs/bin:/usr/sfw/bin:/opt/SolarisStudio12.3-solaris-sparc-bin/solarisstudio12.3/bin:$PATH

ld.so.1: certutil: fatal: libssl3.so: open failed: No such file or directory

Solution:
reinevm01: # ldd certutil
        libssl3.so =>    /lib/libssl3.so
        libsmime3.so => /lib/libsmime3.so
        libnss3.so =>    /lib/libnss3.so

check the symbolic link for the certuitl and add the lib path to LD_LIBRARY_PATH

NSS Compilation on Solaris

You need CC or gcc compiler when you compiling the NSS

We prefer the CC or cc compiler wich comes with solaris studio, you can download solaris studio from oracle site.

Un zip the solaris studio and set path to compiler CC or cc

export PATH=/usr/ccs/bin:/usr/sfw/bin:/opt/SolarisStudio12.3-solaris-sparc-bin/solarisstudio12.3/bin:$PATH

export CFLAGS=-m32

export CXX=CC

export CC=cc

Go to nss folder
cd nss

Compilation command :

gmake nss_build_all 
or
gmake BUILD_OPT=1 NSPR_INCLUDE_DIR=/root/nss/ USE_SYSTEM_ZLIB=1 ZLIB_LIBS=-lz nss_build_all



Trouble shoot issues while compilation

Issue 1:

ld.so.1: certutil: fatal: libssl3.so: open failed: No such file or directory

Solution:
reinevm01: # ldd certutil
        libssl3.so =>    /lib/libssl3.so
        libsmime3.so => /lib/libsmime3.so
        libnss3.so =>    /lib/libnss3.so

check the symbolic link for the certuitl and add the lib path to LD_LIBRARY_PATH

Issue 2:
checking whether the C compiler works... no
configure: error: in `/home/kanmu03/nss-3.20/nspr':
configure: error: C compiler cannot create executables

Solution:
Add the solaris studio bin folder path in $PATH


Issue 3:
ld: fatal: library -lplc4: not found
ld: fatal: library -lplds4: not found

Solution:
Goto 
nss-3.20/dist/SunOS5.10_DBG.OBJ/lib/
bash-3.2# ldd libplc4.so
ldd: libplc4.so: cannot open file: No such file or directory
bash-3.2# ls -ltr
total 112
drwxr-xr-x   3 root     root         185 Nov 10 11:53 cpu
lrwxrwxrwx   1 root     root          51 Nov 10 12:11 libnspr4.a -> ../../../nspr/SunOS5.10_DBG.OBJ/pr/src/./libnspr4.a
lrwxrwxrwx   1 root     root          52 Nov 10 12:11 libnspr4.so -> ../../../nspr/SunOS5.10_DBG.OBJ/pr/src/./libnspr4.so
lrwxrwxrwx   1 root     root          51 Nov 10 12:11 libplds4.a -> ../../../nspr/SunOS5.10_DBG.OBJ/lib/ds/./libplds4.a
lrwxrwxrwx   1 root     root          52 Nov 10 12:11 libplds4.so -> ../../../nspr/SunOS5.10_DBG.OBJ/lib/ds/./libplds4.so
lrwxrwxrwx   1 root     root          56 Nov 10 12:11 libplc4.a -> ../../../nspr/SunOS5.10_DBG.OBJ/lib/libc/src/./libplc4.a
lrwxrwxrwx   1 root     root          57 Nov 10 12:11 libplc4.so -> ../../../nspr/SunOS5.10_DBG.OBJ/lib/libc/src/./libplc4.so

All are soft links here and soft links path are incorrect here. please copy the original so files created in below.
cd nss-3.20
bash-3.2# cp nspr/lib/libc/src/libplc4.so dist/SunOS5.10_DBG.OBJ/lib/
bash-3.2# cp nspr/lib/ds/libplds4.so dist/SunOS5.10_DBG.OBJ/lib/
cp nspr/pr/src/libnspr4.so dist/SunOS5.10_DBG.OBJ/lib/



Issue 4:

ld: fatal: Symbol referencing errors. No output written to libnspr4.so

Solution:
Go to nspr folder and Build nspr with 
./Configure

Issue 5:

gmake[4]: ../../../config/./nsinstall: Command not found

solution:
If you start compilation with NSPR then this error will through 

so don't do first nspr build ,

Do NSS build only from nss folder.
cd nss
gmake BUILD_OPT=1 NSPR_INCLUDE_DIR=/root/nss/ USE_SYSTEM_ZLIB=1 ZLIB_LIBS=-lz nss_build_all

Create cert8.db from certutil

Run the below commands to create cert8.db and key3.db and second.db

       
./certutil -A -n "My Root CA" -t "C,," -i "/root/caroot.cer" -d "/root/"
./certutil -A -n "My Server Cert" -t "P,," -i "/root/servercert.cer" -d "/root/"

Monday, March 20, 2017

run siebel installer

-jreLoc path to the jre location (inside the jre locaton bin folder should exits)

-invPtrLoc  oraInst.loc file location need to provide , this file exits only when you install the oracle database in your machine.


./runInstaller -jreLoc /usr/java6_64/jre -invPtrLoc /u01/app/oraInventory/oraInst.loc


how to start Gateway name server in windows

Start->Run->

services.msc

all services are listed here search for "Siebel Gateway Name Server"

right click and then start.

O/S-Error: (OS 5) Access is Denied

Need to set ORACLE_SID environment variable

Set Oracle SID C:>set ORACLE_SID=ORCL

Now run Net start command (windows command)

C:>net start oracleserviceORCL

list compopents in siebel

C:\siebel\8.1.1.14\siebsrvr\bin>siebsrvr.exe


srvrmgr:SIEBEL> list component SCCObjMgr_enu for server SIEBEL

SV_NAME  CC_ALIAS       CC_NAME                           CT_ALIAS   CG_ALIAS    CC_RUNMODE   CP_DISP_RUN_STATE  CP_STARTMODE  CP_NUM_R
UN_TASKS  CP_MAX_TASKS  CP_ACTV_MTS_PROCS  CP_MAX_MTS_PROCS  CP_START_TIME        CP_END_TIME  CC_INCARN_NO  CC_DESC_TEXT
-------  -------------  --------------------------------  ---------  ----------  -----------  -----------------  ------------  --------
--------  ------------  -----------------  ----------------  -------------------  -----------  ------------  ------------
SIEBEL   SCCObjMgr_enu  Call Center Object Manager (ENU)  AppObjMgr  CallCenter  Interactive  Online             Auto          0
          20            1                  1                 2016-10-25 03:38:43

1 row returned.

srvrmgr:SIEBEL>

Monday, March 13, 2017

How to enable ASLR of an exe


Command to enable the ASLR for an EXE

By using editbin.exe you can change the exe to support the ASLR.

ebitbin.exe can get from visual studio bin location (C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin)


C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin>editbin /DYNAMICBASE  C:\Exename.exe

Monday, March 6, 2017

No rule to make target ecp_fp.h. Stop

I had resolved this issue please follow the below steps

go to below link and modify your local Makefile(/opt/nss-3.28.1/nss/lib/freebl/Makefile) as sugested in the below link.