Difference between revisions of "Install and configure OpenLDAP"
Line 8: | Line 8: | ||
Once this is done, you have an empty LDAP server launched as a service. | Once this is done, you have an empty LDAP server launched as a service. | ||
− | = | + | = Setup server = |
− | + | The DN root, user and password to connect are available into file '''slapd.conf'''. Port may also be into this file, if not, it is default port value: 389. | |
− | + | Stop the service | |
− | + | Modify file '''slapd.conf''' to use your domain name (replace all dc=my-domain,dc=com by value of your choice). | |
− | + | Modify file '''slapd.conf''' also to add includes of schemas you will need to declare your LDAP objects. | |
<source lang="ini"> | <source lang="ini"> | ||
include ./schema/core.schema | include ./schema/core.schema | ||
Line 22: | Line 22: | ||
include ./schema/nis.schema | include ./schema/nis.schema | ||
</source> | </source> | ||
− | + | Restart the service. | |
= Tester le serveur = | = Tester le serveur = |
Revision as of 12:04, 24 October 2012
Ce chapitre ne concerne pas Dolibarr. Il contient un exemple d'instructions pour installer un annuaire LDAP qui pourra éventuellement être interfacé avec Dolibarr.
Install LDAP server
- With Ubuntu or Debian, install package slapd and ldap.
- With Windows, you can use the install program of OpenLDAP.
Once this is done, you have an empty LDAP server launched as a service.
Setup server
The DN root, user and password to connect are available into file slapd.conf. Port may also be into this file, if not, it is default port value: 389.
Stop the service
Modify file slapd.conf to use your domain name (replace all dc=my-domain,dc=com by value of your choice).
Modify file slapd.conf also to add includes of schemas you will need to declare your LDAP objects.
include ./schema/core.schema
include ./schema/cosine.schema
include ./schema/inetorgperson.schema
include ./schema/nis.schema
Restart the service.
Tester le serveur
A l'aide d'un browser LDAP comme JXplorer, essayer de vous connecter au sevrer LDAP avec le user d'administration LDAP. Les identifiants de connexion par défaut seront donc:
- Server: Localhost
- Port: 389
- User: cn=Manager,dc=yourdomain,dc=com
- Password: secret
- Base DN (optionnel): ne rien mettre ou mettre dc=yourdomain,dc=com
Créer votre arbre LDAP
L'étape suivante consiste à définir les informations à stocker dans l'annuaire LDAP et leur organisation.
Créer un fichier init.ldif contenant votre organisation. Par exemple:
# Organization
dn: dc=mydomain,dc=com
objectclass: dcObject
objectclass: organization
dc: mydomain
o: Description of annuary
description: The description of annuary
# Setting up container for Users OU
dn: ou=People,dc=mydomain,dc=com
objectclass: top
objectclass: organizationalUnit
ou: People
# Setting up container for groups
dn: ou=Groups,dc=mydomain,dc=com
objectclass: top
objectclass: organizationalUnit
ou: Groups
Executer le fichier avec le compte administrateur LDAP:
ldapadd -f init.ldif -D "cn=Manager,dc=mydomain,dc=com" -w secret