I have an OpenBSD 7.1 server with the LDAPD service running. At the moment it is working as expected, however I am new to managing an LDAP organization, and am unsure about some of the configuration settings I have. As a quick side note - despite the descriptions and wording in the configuration, this LDAP server is only for personal use and not for business purposes.
This is currently my running configuration:
listen on lo0 secure
listen on 10.42.19.5 ldaps certificate "/etc/ssl/hypnos/cert"
schema "/etc/ldap/core.schema"
schema "/etc/ldap/inetorgperson.schema"
schema "/etc/ldap/nis.schema"
schema "/etc/ldap/bsd.schema"
namespace "dc=spookyinternet,dc=com" {
rootdn "dc=spookyinternet,dc=com"
rootpw "{SSHA}3zOLoePUtznUxOMAqMCngEIw4o9FeS9KNXA5Wg=="
index "uid"
index "cn"
}
allow read access to subtree "dc=spookyinternet,dc=com" by self
deny read access to subtree "ou=personnel,dc=spookyinternet,dc=com" attribute "userPassword"
allow read,write access to subtree "ou=personnel,dc=spookyinternet,dc=com" attribute "userPassword" by self
allow read,write access to subtree "ou=personnel,dc=spookyinternet,dc=com" attribute "description" by self
I have created an initial structure out of this LDIF (/tmp/org.ldif
):
dn: dc=spookyinternet,dc=com
objectclass: dcObject
objectclass: organization
dc: spookyinternet
o: spookyinternet.com LDAP Server
description: Root entry for spookyinternet.com
dn: ou=personnel,dc=spookyinternet,dc=com
objectclass: organizationalUnit
ou: personnel
description: All employees of Spooky Internet
dn: ou=services,dc=spookyinternet,dc=com
objectclass: organizationalUnit
ou: services
description: All sevices provided by Spooky Internet
dn: ou=domains,dc=spookyinternet,dc=com
objectclass: organizationalUnit
ou: domains
description: All domains managed by Spooky Internet
dn: dc=spookyinternet.com,ou=domains,dc=spookyinternet,dc=com
objectclass: domain
dc: spookyinternet.com
description: Primary domain
And was able to successfully import it with the following command:
ldapadd -vv -w 'correct horse battery staple' -H ldap://localhost/ -D dc=spookyinternet,dc=com -f /tmp/org.ldif
After completing the above, my questions are:
- Some of the guides I looked at (specifically this) use a
rootdn
along the lines ofcn=admin,dc=spookyinternet,dc=com
. What is the difference between that and justdc=spookyinternet,dc=com
for arootdn
? - If
cn=admin
should be used for therootdn
, is this a user that I need to create afterwards? - What is the difference between the
rootdn
in the configuration and thebinddn
I passed toldapadd
via the-D
flag? - If the
cn=admin
rootdn
should be used, is that what I should use for thebinddn
as well?