How to create LDAP users in bulk on Linux (UBUNTU)
On the page that describes the OpenLDAP server, there are a couple of examples of how to add groups and users.
Keep in mind that:
- before you can add a user to a group, the group must be defined
- before you can add a group, there must be an ou (organizational unit) defined to store groups. Let's call this
Groups
. - before you can add a user, there must be an ou to store people in; call this
People
.
The aforementioned page (under "Modifying and populating your database") gives examples of all these. The basic steps are:
- create a text file defining all of the above;
- use the
ldapadd
command to process this text file.