0

i just install LDAP server on my server and its working fine. now i would like to create 20 users with different names so is there any script to create users in bulk on LDAP server.

OS: ubuntu 20.04 server

4
  • See the explanation (with example) here under "Modifying and populating your database". In short: create a text file with the data on the 20 users, and use the ldapadd command to process it.
    – Jos
    Sep 20 at 13:07
  • @Jos that reads like an answer ;-)
    – Rinzwind
    Sep 20 at 16:29
  • @Rinzwind That may be so but I can't think why the OP didn't come up with it themselves. It is literally the starting page about the OpenLDAP server.
    – Jos
    Sep 20 at 17:11
  • Manual answers are easy rep :=) @Jos
    – Rinzwind
    Sep 21 at 6:18
1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.