Create a script named: OIDPWD.bat
@echo offREM ####################################################################REM # OIDPWD for IAS 9.0.2REM ####################################################################if not "%1" == "" goto step0:usageREM ####################################################################REM # Usage Description REM ####################################################################set IAS_PASSWORD=welcome1set OIDHOST=hostname.domain.comset OIDPORT=389echo Usageecho -----echo oidpwd [-w IAS_PASSWORD] [-h OID_HOST] -p [OID_PORT]echo .echo -w IAS_PASSWORD The OID password of "cn=orcladmin"echo Default = %IAS_PASSWORD%echo -h OID_HOST The oid host name echo Default = %OIDHOST%echo -p OID_PORT The port used by OIDecho Default = %OIDPORT%:step0echo .setlocalif not "%ORACLE_HOME%" == "" goto step1set ORACLE_HOME=d:\ias902echo You should set ORACLE_HOME in your environment to run this script.echo Using default = %ORACLE_HOME%:step1if "%1" == "" goto step2:arg1if not "%1" == "-w" goto arg2shiftset IAS_PASSWORD=%1shiftgoto step1:arg2if not "%1" == "-h" goto arg3shiftset OIDHOST=%1shiftgoto step1:arg3if not "%1" == "-p" goto arg4shiftset OIDPORT=%1shiftgoto step1:arg4echo "***Error - Unknow option used %1"goto :end:step2echo Looking up passwords inside OIDecho ..IAS_PASSWORD = %IAS_PASSWORD%echo ..OIDHOST = %OIDHOST%echo ..OIDPORT = %OIDPORT%echo .echo --- portal ---%ORACLE_HOME%\bin\ldapsearch -h %OIDHOST% -p %OIDPORT% -D cn=orcladmin -w %IAS_PASSWORD% -b "cn=IAS Infrastructure Databases,cn=IAS,cn=Products,cn=OracleContext" -s sub "orclResourceName=portal" orclpasswordattributeecho .echo --- orasso ---%ORACLE_HOME%\bin\ldapsearch -h %OIDHOST% -p %OIDPORT% -D cn=orcladmin -w %IAS_PASSWORD% -b "cn=IAS Infrastructure Databases,cn=IAS,cn=Products,cn=OracleContext" -s sub "orclResourceName=orasso" orclpasswordattributeecho .echo --- orasso_pa ---%ORACLE_HOME%\bin\ldapsearch -h %OIDHOST% -p %OIDPORT% -D cn=orcladmin -w %IAS_PASSWORD% -b "cn=IAS Infrastructure Databases,cn=IAS,cn=Products,cn=OracleContext" -s sub "orclResourceName=orasso_pa" orclpasswordattributeecho .echo --- orasso_ps ---%ORACLE_HOME%\bin\ldapsearch -h %OIDHOST% -p %OIDPORT% -D cn=orcladmin -w %IAS_PASSWORD% -b "cn=IAS Infrastructure Databases,cn=IAS,cn=Products,cn=OracleContext" -s sub "orclResourceName=orasso_ps" orclpasswordattributeecho .echo OIDPWD Completed.goto end:oh_not_setecho ***ERROR: You must set ORACLE_HOME in your environment to run this script.goto end:endendlocalpause:exit
Change the defaults in the script:
...
set IAS_PASSWORD=welcome1
set OIDHOST=hostname.domain.com
set OIDPORT=389
set ORACLE_HOME=d:\ias902...
Where:
IAS_PASSWORD is the main password of iAS and the password of cn=orcladmin user in OID
OIDHOST is the host of OIDOIDPORT is the port of OIDORACLE_HOME is the home where the program will use LDAPSEARCH
Run the bat file
Post a Comment
No comments:
Post a Comment