dc cz
|
dc muni
|
dc fi
/ \
ou People ou Group
/ \
uid Janko gid Student
ldapsearch -x -h ldap://ldap.fi.muni.cz -b uid=zlatuska,ou=People,dc=fi,dc=muni,dc=cz dn: uid=zlatuska,ou=People,dc=fi,dc=muni,dc=cz uid: zlatuska cn: zlatuska objectClass: account objectClass: posixAccount objectClass: shadowAccount userPassword:: e2NyeXB0fXg= loginShell: /bin/ksh uidNumber: 206 gidNumber: 10000 homeDirectory: /home/zlatuska gecos: Jiri Zlatuska host: aisa host: anxur host: erinys host: gorgo host: nymfe host: oreias host: pandora host: pyrrha
cn=xhrasko,ou=People,dc=fi,dc=muni,dc=cz objectClass: account gecos: Janko Hraško homeDirectory: /home/xhrasko
# definícia schémat
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/inetorgperson.schema
#definície LDAP servru
suffix "dc=fi,dc=muni,dc=cz" # najvrchnejšie miesto celého ldap stromu
rootdn "cn=root,dc=fi,dc=muni,dc=cz" # pozícia administrátora v DIT
rootpw PASSWD # heslo adminstrátora v podobe {typ}hash (typ={MD5, SHA..})
directory /var/lib/openldap-data # db úložište
index uid,uidNumber,gidNumber eq
# definície prístupových práv
access to dn=".*ou=People,dc=fi,dc=muni,dc=cz"
by dn="cn=backup,ou=admins,dc=fi,dc=muni,dc=cz" read
by domain=.* read
access to attrs=userPassword
by dn="cn=admin,dc=fi,dc=muni,dc=cz" write # osobami z domény admin sa môže heslo meniť
by anonymous auth # anonymný užívateľ sa môže ako záznam prihlásiť (nič iné)
by self write # záznam môže sám v sebe meniť data
by * none # ostatný užívatelia si môžu pískať
passwd: files ldap shadow: files ldap group: files ldap hosts: files ldap dns ethers: files netmasks: files networks: files protocols: nisplus [NOTFOUND=return] files
server-user nscd debug-level 0 enable-cache passwd yes positive-time-to-live passwd 600 negative-time-to-live passwd 20 suggested-size passwd 211 check-files passwd yes enable-cache hosts yes positive-time-to-live hosts 3600 negative-time-to-live hosts 20 suggested-size hosts 211 check-files hosts yes
# povinné atribúty cn: Common Name uid: Uniq ID uidNumber: unixové uid gidNumber: unixové gid homeDirectory: domovský adresář objectClass: posixAccount # volitelné atributy: userPassword: heslo loginShell: shell gecos: GECOS záznam odpovídající záznamu z /etc/passwd description: popis objektu
# povinné atributy: uid: Uniq ID objectClass: shadowAccount # volitelné atributy: userPassword: heslo shadowLastChange: shadowMin: shadowMax: shadowWarning: shadowInactive: shadowExpire: shadowFlag: description: popis objektu
replogfile /var/lib/ldap/ldap.replog replica uri=ldaps://slave.my-domain.com:636 binddn="cn=Replicator,dc=my-domain,dc=com" bindmethod=simple credentials=secret