Score:0

How to create LDAP users in bulk on Linux (UBUNTU)

ve flag

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

uz flag
Jos
See the explanation (with example) [here](https://ubuntu.com/server/docs/service-ldap) 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.
cn flag
@Jos that reads like an answer ;-)
uz flag
Jos
@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.
cn flag
Manual answers are easy rep :=) @Jos
Score:1
uz flag
Jos

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.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.