1 Most of the configuration of the ldap server has to do with getting correct
2 access controls to keep the data safe. Here is a sample:
4 # Turn on automatic last modification time
9 index keyfingerprint eq
10 index cn,sn approx,sub,eq
13 #rootdn "uid=admin,ou=users,dc=debian,dc=org"
16 # Restrict reading/modification of the password to administration and self
17 access to attrs=userpassword,sshrsaauthkey
19 by dn="uid=admin,ou=users,dc=debian,dc=org" write
20 by group="uid=admin,ou=users,dc=debian,dc=org" write
23 access to attrs=emailforward
24 by dn="uid=admin,ou=users,dc=debian,dc=org" write
25 by group="uid=admin,ou=users,dc=debian,dc=org" write
27 by addr=127.0.0.1 read
28 by domain=.*\.debian\.org read
30 access to attrs=c,l,loginShell,ircNick
31 by dn="uid=admin,ou=users,dc=debian,dc=org" write
32 by group="uid=admin,ou=users,dc=debian,dc=org" write
34 access to attrs=facsimileTelephoneNumber,telephoneNumber,postalAddress,postalC
35 ode,loginShell,onvacation,privateSub,latitude,longitude
36 by dn="uid=admin,ou=users,dc=debian,dc=org" write
37 by group="uid=admin,ou=users,dc=debian,dc=org" write
39 by dn="uid=.*,ou=users,dc=debian,dc=org" read
42 by dn="uid=admin,ou=users,dc=debian,dc=org" write
43 by group="uid=admin,ou=users,dc=debian,dc=org" write
47 Note that in more modern versions of slapd, the "by addr" and "by domain"
48 syntax has changed and the following should be used instead:
49 by peername.ip=127.0.0.1 read
50 by domain.subtree=debian.org read
54 Here is the initial seed file to import and setup the proper entries:
66 dn: ou=users,dc=debian,dc=org
69 objectClass: organizationalUnit
71 dn: uid=admin,ou=users,dc=debian,dc=org
73 cn: LDAP administrator
75 objectClass: groupOfNames
76 userPassword: {crypt}?????
77 member: uid=jgg,ou=users,dc=debian,dc=org
78 member: uid=joey,ou=users,dc=debian,dc=org
79 member: uid=troup,ou=users,dc=debian,dc=org
80 mail: debian-admin@debian.org