Google Search

Friday, March 20, 2015

Bulk password update Steps for OID

Steps to follow in order to bulk update users password in OID

1. create a file for all the users using below format

          dn: cn=test1,cn=Users,dc=abc,dc=com
          changetype: modify
          replace: userPassword
          userPassword: new_password

         dn: cn=test2,cn=Users,dc=abc,dc=com
         changetype: modify
         replace: userPassword
         userPassword: new_password
 
    dc=abc,dc=com (is as per your environment domain)

Things to consider while creating above file.

   a) get correct dn from OID. Go to OID select any users (users already exists in OID), right click on the users account and get dn, for example if it shows below

     cn=mani,cn=Users,dn=abc,dn=com

It means you need to get append cn=users,dn=abc,dn=com at the end of each record, for example users is test1 that you want to update the password you need to write the command like above I mentioned in step1.

 If users dn is uid=mani,cn=users,dn=abc,dn=com than users you will create file like

         dn: uid=test1,cn=Users,dc=abc,dc=com
         changetype: modify
         replace: userPassword
         userPassword: new_password

        dn: uid=test2,cn=Users,dc=abc,dc=com
        changetype: modify
        replace: userPassword
        userPassword: new_password

   b) Make sure there is a space between each record(empty line). if there is no space you will get error

   c) Make sure userPassword attribute exists in OID(it is default attribute) if it is changed in your environment please make sure to get correct attribute.

   d) Save file in .csv formate because sometimes extra spaces cause issues while running command

2. Load above file at OID server and run following "ldapmodify" command

 $ORACLE_HOME/bin/ldapmodify -h hostName -p port -D “cn=orcladmin” -w password -f usersPassword.ldif  > passwordusers.out

3. Test if user password is updated successfully

 $ORACLE_HOME/bin/ldapbind -h [oid_hostName] -p [oid_port] -D “uid=test1,cn=Users,dc=abc,dc=com” -w new_Password

 You should get message “bind successful”

No comments:

Post a Comment