Change password using LDIF file

I have an LDIF file that contains a test user resident.

I would like to change the password for some of these users and wondered what would be the best way to do this?

+5
source share
1 answer

Use ldapmodify with LDIF, for example:

ldapmodify -h hostname -p port -D dn -w password <<!
dn: uid=user,dc=example,dc=com
changetype: modify
replace: userPassword
userPassword: new-password
!

or specify a file name:

ldapmodify -c -a -f file.ldif -h hostname -p port -D dn -w password

Of course, use the correct attribute names, distinguished names, etc. The distinguished name used to bind the ldapmodify tool must have permissions to change the distinguished name password specified in LDIF.

see also

+7
source

All Articles