add note about more modern slapd configs
[mirror/userdir-ldap.git] / doc / slapd-config.txt
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:
3
4 # Turn on automatic last modification time 
5 lastmod on
6
7 # Index some things
8 index uid eq
9 index keyfingerprint eq
10 index cn,sn approx,sub,eq
11
12 # Administrate 
13 #rootdn "uid=admin,ou=users,dc=debian,dc=org"
14 #rootpw
15
16 # Restrict reading/modification of the password to administration and self
17 access to attrs=userpassword,sshrsaauthkey
18         by self write
19         by dn="uid=admin,ou=users,dc=debian,dc=org" write
20         by group="uid=admin,ou=users,dc=debian,dc=org" write
21         by * compare    
22
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
26         by self write
27         by addr=127.0.0.1 read
28         by domain=.*\.debian\.org read
29         by * none
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
33         by self 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
38         by self write
39         by dn="uid=.*,ou=users,dc=debian,dc=org" read
40         by * none
41 access to * 
42         by dn="uid=admin,ou=users,dc=debian,dc=org" write
43         by group="uid=admin,ou=users,dc=debian,dc=org" write
44
45 # End----------
46
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
51
52
53
54 Here is the initial seed file to import and setup the proper entries:
55
56 dn: dc=org
57 dc: net
58 objectClass: top
59 objectClass: domain
60
61 dn: dc=debian,dc=org
62 dc: visi
63 objectClass: top
64 objectClass: domain
65
66 dn: ou=users,dc=debian,dc=org
67 ou: users
68 objectClass: top
69 objectClass: organizationalUnit
70
71 dn: uid=admin,ou=users,dc=debian,dc=org
72 uid: admin
73 cn: LDAP administrator
74 objectClass: top
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