add "security simple_bind=128" to sample slapd.conf.
[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
5 # only allow plain text auth when we do crypto
6 security simple_bind=128
7
8 # and the database definition
9 database bdb
10
11 # Turn on automatic last modification time 
12 lastmod on
13
14 # Index some things
15 index uid eq
16 index keyfingerprint eq
17 index cn,sn approx,sub,eq
18
19 # Administrate 
20 #rootdn "uid=admin,ou=users,dc=debian,dc=org"
21 #rootpw
22
23 # Restrict reading/modification of the password to administration and self
24 access to attrs=userpassword,sshrsaauthkey
25         by self write
26         by dn="uid=admin,ou=users,dc=debian,dc=org" write
27         by group="uid=admin,ou=users,dc=debian,dc=org" write
28         by * compare    
29
30 access to attrs=emailforward
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         by addr=127.0.0.1 read
35         by domain=.*\.debian\.org read
36         by * none
37 access to attrs=c,l,loginShell,ircNick
38         by dn="uid=admin,ou=users,dc=debian,dc=org" write
39         by group="uid=admin,ou=users,dc=debian,dc=org" write
40         by self write
41 access to attrs=facsimileTelephoneNumber,telephoneNumber,postalAddress,postalC
42 ode,loginShell,onvacation,privateSub,latitude,longitude
43         by dn="uid=admin,ou=users,dc=debian,dc=org" write
44         by group="uid=admin,ou=users,dc=debian,dc=org" write
45         by self write
46         by dn="uid=.*,ou=users,dc=debian,dc=org" read
47         by * none
48 access to * 
49         by dn="uid=admin,ou=users,dc=debian,dc=org" write
50         by group="uid=admin,ou=users,dc=debian,dc=org" write
51
52 # Overlays are useful to enforce constraints:
53
54 moduleload /usr/lib/ldap/unique.so
55 overlay unique
56 unique_uri ldap:///ou=users,dc=debian,dc=org?uidNumber,uid,keyFingerPrint?sub
57 unique_uri ldap:///ou=groups,dc=debian,dc=org?gidNumber,cn?sub
58
59 # End----------
60
61 Note that in more modern versions of slapd, the "by addr" and "by domain"
62 syntax has changed and the following should be used instead:
63         by peername.ip=127.0.0.1 read
64         by domain.subtree=debian.org read
65
66
67
68 Here is the initial seed file to import and setup the proper entries:
69
70 dn: dc=org
71 dc: net
72 objectClass: top
73 objectClass: domain
74
75 dn: dc=debian,dc=org
76 dc: visi
77 objectClass: top
78 objectClass: domain
79
80 dn: ou=users,dc=debian,dc=org
81 ou: users
82 objectClass: top
83 objectClass: organizationalUnit
84
85 dn: uid=admin,ou=users,dc=debian,dc=org
86 uid: admin
87 cn: LDAP administrator
88 objectClass: top
89 objectClass: groupOfNames
90 userPassword: {crypt}?????
91 member: uid=jgg,ou=users,dc=debian,dc=org
92 member: uid=joey,ou=users,dc=debian,dc=org
93 member: uid=troup,ou=users,dc=debian,dc=org
94 mail: debian-admin@debian.org