Verify the OpenLDAP server/Add Starting dn
After install OpenLDAP, use the following commands to check the LDAP service run well:
1. Start up LDAP service with specific port:
# sladp -h “ldap://:389”
2. Execute the “ldapsearch” utility,
# ldapsearch -x -b ” -s base ‘(objectclass=*)’ namingContexts
If return texts as:
dn:
namingContexts: dc=plasmon,dc=sit
It validate the LDAP is running well with correct setting.
Since the LDAP installed successfully, the next step is add root dn for all structure, in my case, “dc=plasmon,dc=sit” is the top node. Create an LDIF file named “phillip”by vi:
dn: dc=plasmon,dc=sit
objectclass: dcObject
objectclass: organization
o: Example Company
dc: plasmon
Then import this ldif to LDAP database:
# ldapadd -x -D “cn=root,dc=plasmon,dc=sit” -W -f phillip
The “dc=plamosn,dc=sit” will be added, note, if do not add this node, any operating to LDAP would meet frastrations.