Logo Background

Oracle LDAP Query Search

  • By on May 30, 2009 | No Comments

    In previous topic on Oracle E-Business Suite and SSO/OID Integration, I did write on how can we integrate our existing Oracle Applications 11i E-Business Suite with the new OID/SSO from Oracle 10gAS.

    If we register the OID/SSO using txkrun.pl -script=SetSSOReg -registeroid=Yes and txkrun.pl -script=SetSSOReg -registersso=Yes, by default the provisioning template that will be deployed was the bi-directional provisioning template.

    This means whenever you create a new user in Oracle Applications 11i E-Business Suite, the user will be provision to OID automatically and vice versa.

    Just in case if you have any problem when after creating the user in Oracle Applications 11i E-Business Suite but the user was not found in OID, then you may use the ldap search script as below to verify the user in OID.

    Copy the content of the ldap search script below into a file and make it executable.

    Execute the ldap search script file and put some mandatory parameter like OID port number before you proceed.

    A result file will be spool to the current directory which consist of the user information in OID.

    This ldap query script was very useful for Oracle Applications 11i E-Business Suite and OID integration provisioning.

    Script to query OID user using LDAP

    #####################################################################
    ### START OF SCRIPT : ldapsearch_apps11i_user.sh ###
    #####################################################################
    ##
    (
    echo "****************************************************"
    date
    echo "****************************************************"
    if [ "$OIDManagerName" -eq "" ]; then
    echo -n "Please enter the OID Manager username (default=orcladmin) : "
    read OIDManagerName
    fi
    if [ "$OIDManagerName" -eq "" ]; then
    OIDManagerName="orcladmin"
    fi
    echo "you entered " $OIDManagerName
     
    if [ "$OIDManagerPasswd" -eq "" ]; then
    echo -n "Please enter the OID Manager password : "
    read OIDManagerPasswd
    fi
    if [ "$Host" -eq "" ]; then
    echo -n "Please enter the OID Server hostname (default=`eval hostname` ) : "
    read Host
    fi
    if [ "$Host" -eq "" ]; then
    Host=`eval hostname`
    fi
    echo "you entered " $Host
     
    if [ "$Port" -eq "" ]; then
    echo -n "Please enter the OID Server Port (default=389) : "
    read Port
    fi
    if [ "$Port" -eq "" ]; then
    Port="389"
    fi
    echo "you entered " $Port
     
    if [ "$AppsUser" -eq "" ]; then
    echo -n "Please enter the Applications username (default=all) : "
    read AppsUser
    echo "you entered " ${AppsUser}
    fi
    if [ "$AppsUser" -eq "" ]; then
    echo "you entered all users"
    fi
    ### The following lines are the read work of the script
    ldapsearch -v -h "${Host}" -p ${Port} -D "cn=${OIDManagerName}" -w "${OIDManagerPasswd}" 
    -b "" -s sub "uid=${AppsUser}*" uid orclguid orclactivestartdate 
    orclactiveenddate orclisenabled
    ###
    echo "***********************************************"
    ###
    ldapsearch -v -h "${Host}" -p ${Port} -D "cn=${OIDManagerName}" -w "${OIDManagerPasswd}" 
    -b "cn=Provisioning Profiles, cn=Changelog Subscriber, cn=Oracle Internet Directory" 
    -s sub "objectclass=*"
    ###
    ) 2>&1 | tee -a LdapAppsUser.out
    ##
    #####################################################################
    ### END OF SCRIPT ###
    #####################################################################
    Previous
    Next
    » Oracle LDAP Error
Leave a Comment