Total Pageviews

Thursday, March 19, 2015

OID bulk password update, complete steps for beginners

steps to follow in order to bulk update users password in OID( i have explained these steps for beginner who have to run this task.

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

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

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

dc=mycompany,dc=com( is as per your environment)

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=scott,cn=Users,dn=mycompany,dn=com

it means you need to get append cn=users,cn=mycompany,cn=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=scott,con=users,dn=mycompany,dn=com
than users you will create file like

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

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


b) 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

c) Test if user password is updated successfully
$ORACLE_HOME/bin/ldapbind -h [oid_hostName] -p [oid_port] -D “uid=test1,cn=Users,dc=mycompany,dc=com” -w new_Password
You should get message “bind successful”

No comments:

Post a Comment