ud-useradd: now does usergroups by default
[mirror/userdir-ldap.git] / userdir-ldap-slapd.conf.in
1 # The backend type, ldbm, is the default standard
2 database hdb
3
4 # The base of your directory
5 suffix          "@@DN@@"
6
7 # Where the database file are physically stored
8 directory       "/var/lib/ldap"
9
10 moduleload      accesslog
11 overlay accesslog
12 logdb cn=log
13 logops writes
14 logold (objectclass=top)
15 logpurge 90+00:00 1+00:00
16
17 moduleload      constraint
18 overlay constraint
19 constraint_attribute keyfingerprint regex ^([0-9A-F]{40})$
20
21 # Indexing options
22 index gecos,cn,sn,uid,ircNick,hostname,emailForward pres,eq,sub,approx
23 index keyfingerprint,homeDirectory,objectClass,loginShell,supplementaryGid pres,eq
24 index c,gender,dnsZoneEntry,birthDate,gidNumber,uidNumber pres,eq
25
26 # Don't limit queries to the default of 500
27 sizelimit 10000
28
29 # Save the time that the entry gets modified
30 lastmod on
31
32
33 ##
34 ## prefix some rules that only apply to certain clients
35 ## and grant them more privileges
36 ##
37
38 # LDAP admins have full access, so has sshdist
39 access to *
40         by group="cn=LDAP Administrator,ou=users,@@DN@@" write
41         by dn="uid=sshdist,ou=users,@@DN@@" write
42         by * break
43
44 # allow keyring maint to write to the keyFingerPrint attribute
45 # (make an exception for adm for security reasons)
46 access to filter="(!(supplementaryGid=adm))" attrs=keyFingerPrint
47         by group="cn=Keyring Maintainers,ou=users,@@DN@@" write
48         by * break
49
50 # allow listmasters to write to the privateSub attribute
51 access to attrs=privateSub
52         by group="cn=Listmasters,ou=users,@@DN@@" write
53         by self write
54         by * break
55
56 # allow users write access to an explicit subset of their fields
57 access to attrs=c,l,loginShell,ircNick,labeledURI,icqUIN,jabberJID,onVacation,birthDate,mailDisableMessage,gender,emailforward,mailCallout,mailGreylisting,mailRBL,mailRHSBL,mailWhitelist,mailContentInspectionAction,mailDefaultOptions,facsimileTelephoneNumber,telephoneNumber,postalAddress,postalCode,loginShell,onVacation,latitude,longitude,VoIP,userPassword,sudoPassword,webPassword,rtcPassword,bATVToken
58         by self write
59         by * break
60
61
62 ##
63 ## All ACLs from here on result in a decision.  no fall through to later.
64 ##
65
66 # allow authn/z by anyone
67 access to attrs=userPassword,sudoPassword,webPassword,rtcPassword,bATVToken
68         by * compare
69
70 # readable only by self
71 access to attrs=sshrsaauthkey
72         by self read
73         by * none
74
75 # debian.org readable, authenticated user readable
76 access to attrs=activity-pgp,activity-from,c,l,loginShell,onVacation,birthDate,mailDisableMessage,gender,emailforward,mailCallout,mailGreylisting,mailRBL,mailRHSBL,mailWhitelist,mailContentInspectionAction,mailDefaultOptions
77         by peername.ip=127.0.0.1 read
78         by domain=alioth.debian.org none
79         by domain.subtree=@@DOMAIN@@ read
80         by dn.regex="uid=.*,ou=users,@@DN@@" read
81         by * none
82
83 # authenticated user readable
84 access to attrs=facsimileTelephoneNumber,telephoneNumber,postalAddress,postalCode,privateSub,latitude,longitude,VoIP
85         by dn.regex="uid=.*,ou=users,@@DN@@" read
86         by * none
87
88 # rest is globally readable
89 access to attrs=access,accountComment,accountStatus,admin,allowedGroups,allowedHost,architecture,bandwidth,cn,comment,dc,description,disk,distribution,dnsTTL,dnsZoneEntry,exportOptions,gecos,gid,gidNumber,homeDirectory,host,hostname,icqUin,ipHostNumber,ircNick,jabberJID,keyFingerPrint,labeledURI,mXRecord,machine,member,memory,mn,objectClass,ou,physicalHost,purpose,shadowExpire,shadowLastChange,shadowMax,shadowMin,shadowWarning,sn,sponsor,sponsor-admin,sshRSAHostKey,status,subGroup,supplementaryGid,uid,uidNumber
90         by * read
91
92 access to *
93         by * none
94
95
96 database hdb
97 directory       "/var/lib/ldap-log"
98 suffix cn=log
99 #
100 sizelimit 10000
101
102 index reqStart eq
103 access to *
104         by group="cn=LDAP Administrator,ou=users,@@DN@@" write
105         by dn="uid=sshdist,ou=users,@@DN@@" read
106         by * none
107