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.