How to change an username in the LDAP Database

Please follow the procedure below to change a username. This will start $EDITOR with a textual reprsentation of the LDAP database that you can edit. When you are done, save the file and the tool will run whatever command is necessary to apply your changes to the database.


Run one of these commands from the LDAP server. You can also install ldapvi on your computer (with apt-get install ldapvi on Debian and Debian-based distributions) and use the -h flag to edit the LDAP database remotely.

(test instance)
ldapvi -D 'cn=admin,dc=fsfe-test,dc=org' -b 'ou=fellowship,dc=fsfe-test,dc=org'

(production instance)
ldapvi -D 'cn=admin,dc=fsfe,dc=org' -b 'ou=fellowship,dc=fsfe,dc=org'

Enter the password for the rootdn user. A vi session will be opened, showing the whole database content.

Do the changes

If your not sure or if this is the first time you're doing this, please backup the database first by running /root/bin/ldap-backup on the LDAP server

Search for the username(s) to change and modify the followng fields:

Do NOT change the ID (the number) or the mail field. The mail field is used by the email server to forward emails from * to the real address.


ldapvi will prompt with a line summarizing the number of changes and asking confirmation.

Press V (or v) to view the changes you are about to confirm. Press y to commit the changes to the LDAP server. Press q to exit without committing changes (they will be saved to a file for further inspection). Press ? for more help.

TechDocs/TechnicalProcesses/ChangeuserNameLDAP (last edited 2018-04-20 11:47:49 by vincent)