Create LDAP Users

Create LDAP Users

createLDAPUsers.sh
created by Tyler Harris

This is a bash script to bulk create LDAP users and add them to a new group. It has been verified via LDAP with eDirectory, but is only intended for testing and troubleshooting purposes. Sometimes you just need a ton of users and would rather not go through the trouble of adding them all manually.

Description:

  • Connects to an LDAP server via :389 with specified credentials

  • Creates #ofUsers in a base container: (user1, user2, etc.)

  • Prompts if users should be added to a group

  • Generates two ldifs: add, modify (if group is requested)

  • Uses ldapadd command for creating users

  • Uses ldapmodify command for modifying users (group)

  • For group: adds user to group member with equivalentToMe,
    adds to user's groupMembership attribute.

Attachments

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Comments
There is no script attached here
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2017-03-08 21:17
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.