salut , afin d'installé un serveur ldap j'ai installé les Package suivant openldap,openldap-clients,openldap-devel et
nss_ldap,openldap-servers sur mon serveur.
j'ai crée les dossier de base de donnée
root@bigboy tmp]# mkdir /var/lib/ldap/example.com
[root@bigboy tmp]# chown ldap:ldap /var/lib/ldap/example.com
j'ai crée le mot de pass LDap de root
[root@bigboy tmp]# slappasswd
New password:
Re-enter new password:
{SSHA}v4qLq/qy01w9my60LLX9BvfNUrRhOjQZ
[root@bigboy tmp]#
et j'ai crée un utilisateur ldap user
[root@bigboy tmp]# useradd -g users ldapuser
[root@bigboy tmp]# passwd ldapuser
Changing password for user ldapuser.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
j'ai edité slapd.conf:
database bdb
suffix "dc=example,dc=com"
rootdn "cn=Manager,dc=example,dc=com"
rootpw {SSHA}v4qLq/qy01w9my60LLX9BvfNUrRhOjQZ
directory /var/lib/ldap/example.com
et aussi: pour l'authentification de mon system:
[root@bigboy tmp]# vi /usr/share/openldap/migration/migrate_common.ph
[root@bigboy tmp]# updatedb
[root@bigboy tmp]# locate DB_CONFIG
/usr/share/doc/openldap-servers-2.4.16/DB_CONFIG.example
[root@bigboy tmp]# cp /usr/share/doc/openldap-servers-2.4.16/DB_CONFIG.example \
/var/lib/ldap/example.com/DB_CONFIG
et on utilisant migrate_all_offline.sh
[root@bigboy tmp]# /usr/share/openldap/migration/migrate_all_offline.sh
Creating naming context entries...
Migrating groups...
Migrating hosts...
...
...
...
Preparing LDAP database...
=> bdb_tool_entry_put: id2entry_add failed: DB_KEYEXIST: Key/data pair already exists (-30996)
=> bdb_tool_entry_put: txn_aborted! DB_KEYEXIST: Key/data pair already exists (-30996)
slapadd: could not add entry dn="cn=raid-am,ou=Services,dc=example,dc=com"
(line=16432): txn_aborted! DB_KEYEXIST: Key/data pair already exists (-30996)
Migration failed: saving failed LDIF to /tmp/nis.ldif.E14499
cette ereur comme le dit le site web n'affecte pas les fonctionnalités de ldap

j'ai changé le propriétaire des dossier de la base de données et je démarre le serveur
[root@bigboy tmp]# chown -R ldap:ldap /var/lib/ldap/example.com
[root@bigboy tmp]# service ldap start
Starting slapd: [ OK ]
pour le tst que propose l'assistant du site tout va bien
[root@bigboy tmp]# ldapsearch -x -b 'dc=example,dc=com' \
'(objectclass=*)'
.
.
# search result
search: 2
result: 0 Success

# numResponses: 402
# numEntries: 401
sur le client j'edité les different fichier:
/etc/openldap/ldap.conf
HOST 192.168.1.100
BASE dc=example,dc=com
[root@smallfry tmp]# env LANG=C authconfig-tui
[*] Use Shadow Passwords
[*] Use MD5 Passwords
[*] Use LDAP [ ] Use TLS
Server: 192.168.1.100
Base DN: dc=example,dc=com
j'ai crée un repertoire pour ldap
[root@smallfry tmp]# mkdir /home/ldapuser
[root@smallfry tmp]# chmod 700 /home/ldapuser/
[root@smallfry tmp]# ll /home
total 2
drwx------ 2 root root 1024 Aug 4 08:05 ldapuser
et c'est la le probleme :il faut que ça donne
drwx------ 2 ldapuser users 1024 Aug 4 08:05 ldapuser
alors ça marche pas sur le client
je crois que c'est un probleme de firewall car je ne sais pas comment ouvrir les port t 389 (LDAP) ou 636 (LDAPS).
si je tape
[root@localhost ~]# ldapsearch -x -H ldaps://firewall "(uid=will)"
ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)
si vous pourer m'aider j'en serai ravi
Salut,

pour ouvrir un port il faut taper cela, je crois :
iptables -t filter -A INPUT -i interface_d_entree -s ip_source -d ip_destination -p tcp --dport N_port -j ACCEPT
regardes voir du coté de Netfilter pour avoir plus de détails....