Add User to LDAP command line

Add User to LDAP command line

Add User to OpenLDAP command line

When LDAP was first introduced, there was no fancy GUI like PhpLDAPadmin, and in some Low-Bandwidth environments, it’s still more favoured to manipulate LDAP via CLI, here’s the basic steps to manipulating OpenLDAP.

login and su to root

OpenLDAP add user: login and su to root

change to a temporary directory to where we can manipulate LDAP files

OpenLDAP add user: change to a temporary directory to where we can manipulate LDAP files

now we need to dump/query the LDAP Database, here’s how to take a dump:

OpenLDAP add user: we need to dump/query the LDAP Database, here’s how to take a dump

now, let’s create a file with user info to import into the LDAP database

OpenLDAP add user: let’s create a file with user info to import into the LDAP database

in this case, we are creating a user named john, let’s set his user up

OpenLDAP add user: in this case, we are creating a user named john, let’s set his user up

here’s the basics of a user template (make sure the uidNumber is unique, and increases for each user)

OpenLDAP add user: here’s the basics of a user template (make sure the uidNumber is unique, and increases for each…

alright, now all we have to do is add this file to the database, and John will have an account for LDAP

OpenLDAP add user: now all we have to do is add this file to the database, and John will have an account for LDAP

here’s the command we use to add the user, you will have to enter your LDAP admin password

OpenLDAP add user: here’s the command we use to add the user, you will have to enter your LDAP admin password

done!

Hosted Linux Servers at www.zwiegnet.com/go

Related guides: Add user to a group OpenLDAP command line | Reset LDAP Password Command Line

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *