Serveur LDAP

# Installation d'un serveur ldap
apt-get install slapd
# mot de passe demandé (2 fois)

Ajoute dans la base de données (/var/lib/ldap) un organization (dc=nodomain) et un organizationalRole (cn=admin,dc=nodomain) avec le mot de passe (userPassword)

php5-ldap

apt-get install php5-ldap

Quick

1. StartTLS
2. bind
3. search(DN baseObject, scope=BaseObject|singleLevel|wholeSubtree,string filter,mixed derefAliases,array attributes,int sizeLimit,int timeLimit,boolean typesOnly)
filter = () 
         (&()()())
         (|()()())
         (objectClass=person)
         (mail=john*)
4. compare(DN, attribute name, attribute value)
5. update
6. extended operation
   cancel(messageID) and return a response
   password modify
   start tls
7. abandon(messageID)
8. unbind

LDAP URLs
                    v-- attribute to retreive (by default all)
ldap://host:port/DN?attributes?scope?filter?extensions
                 ^- search base, base,one,sub
                 
Example:
ldap://ldap.example.com/cn=John%20Doe,dc=example,dc=com // all user attributes of this object by DN
ldap:///dc=example,dc=com??sub?(givenName=John)         // search query for all sub and current entry

Hyperliens...