Bootstrap FreeKB - OpenLDAP - Add an organizational unit (OU)
OpenLDAP - Add an organizational unit (OU)

Updated:   |  OpenLDAP articles

This assumes you have already installed OpenLDAP and configured OpenLDAP to use your domain name, such as example.com.

 

Create an LDIF file for the new organizational units (OU).

~]# touch /etc/openldap/slapd.d/OU.ldif

 

In this example, an OU named Group will be added to OpenLDAP. You can replace Groups with any other text, such as Users or myCustomOU. 

cn: ou=Group,dc=example,dc=com
ou: Group
objectClass: top
objectclass: organizationalunit

 

Add the OU into OpenLDAP.

~]# ldapadd -x -W -D "cn=Manager,dc=example,dc=com" -f /etc/openldap/slapd.d/OU.ldif
Enter LDAP password: ******
adding new entry "ou=Group,dc=example,dc=com"

 

The ldapsearch command can be used to verify that the OU has been added to OpenLDAP.




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter ac5577 in the box below so that we can be sure you are a human.