Lines 1-5
Link Here
|
1 |
<?xml version='1.0' encoding='UTF-8'?> |
1 |
<?xml version='1.0' encoding='UTF-8'?> |
2 |
<!-- $Header: /var/www/www.gentoo.org/raw_cvs/gentoo/xml/htdocs/doc/fr/ldap-howto.xml,v 1.14 2005/04/06 09:45:38 neysx Exp $ --> |
|
|
3 |
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
2 |
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
4 |
|
3 |
|
5 |
<guide link="/doc/fr/ldap-howto.xml" lang="fr"> |
4 |
<guide link="/doc/fr/ldap-howto.xml" lang="fr"> |
Lines 8-26
Link Here
|
8 |
<author title="Auteur"> |
7 |
<author title="Auteur"> |
9 |
<mail link="sj7trunks@gentoo.org">Benjamin Coles</mail> |
8 |
<mail link="sj7trunks@gentoo.org">Benjamin Coles</mail> |
10 |
</author> |
9 |
</author> |
11 |
|
|
|
12 |
<author title="Correcteur"> |
10 |
<author title="Correcteur"> |
13 |
<mail link="swift@gentoo.org">Sven Vermeulen</mail> |
11 |
<mail link="swift@gentoo.org">Sven Vermeulen</mail> |
14 |
</author> |
12 |
</author> |
15 |
|
|
|
16 |
<author title="Correcteur"> |
13 |
<author title="Correcteur"> |
17 |
<mail link="tseng@gentoo.org">Brandon Hale</mail> |
14 |
<mail link="tseng@gentoo.org">Brandon Hale</mail> |
18 |
</author> |
15 |
</author> |
19 |
|
|
|
20 |
<author title="Correcteur"> |
16 |
<author title="Correcteur"> |
21 |
<mail link="bennyc@gentoo.org">Benny Chuang</mail> |
17 |
<mail link="bennyc@gentoo.org">Benny Chuang</mail> |
22 |
</author> |
18 |
</author> |
23 |
|
|
|
24 |
<author title="Traducteur"> |
19 |
<author title="Traducteur"> |
25 |
<mail link="neysx@gentoo.org">Xavier Neys</mail> |
20 |
<mail link="neysx@gentoo.org">Xavier Neys</mail> |
26 |
</author> |
21 |
</author> |
Lines 33-40
Link Here
|
33 |
|
28 |
|
34 |
<license/> |
29 |
<license/> |
35 |
|
30 |
|
36 |
<version>0.11</version> |
31 |
<version>0.16</version> |
37 |
<date>2005-01-22</date> |
32 |
<date>2005-03-29</date> |
38 |
|
33 |
|
39 |
<chapter> |
34 |
<chapter> |
40 |
<title>Bien démarrer avec OpenLDAP</title> |
35 |
<title>Bien démarrer avec OpenLDAP</title> |
Lines 116-122
Link Here
|
116 |
|
111 |
|
117 |
</body> |
112 |
</body> |
118 |
</section> |
113 |
</section> |
|
|
114 |
<section> |
115 |
<title>Bon alors, à quoi ça sert ?</title> |
116 |
<body> |
119 |
|
117 |
|
|
|
118 |
<p> |
119 |
LDAP peut être utilisé pour de nombreuses tâches. Ce document s'intéresse plus |
120 |
particulièrement à la gestion des utilisateurs, mais d'autres buts peuvent être |
121 |
atteints grâce à LDAP. À l'aide de LDAP, les comptes utilisateurs seront |
122 |
centralisés sur un unique serveur LDAP (ce qui ne signifie pas pour autant que |
123 |
l'hébergement se fait sur un serveur unique puisque LDAP supporte la haute |
124 |
disponibilité et la redondance). Parmi les applications courantes pour |
125 |
LDAP : |
126 |
</p> |
127 |
|
128 |
<ul> |
129 |
<li>Infrastructure de gestion de clefs publiques ;</li> |
130 |
<li>Calendrier distribué ;</li> |
131 |
<li>Carnet d'adresse distribué ;</li> |
132 |
<li>Stockage pour le DHCP, le DNS, etc.</li> |
133 |
<li> |
134 |
Directives de configuration de systèmes (garder une trace des configurations |
135 |
sur plusieurs serveurs) ; |
136 |
</li> |
137 |
<li>...</li> |
138 |
</ul> |
139 |
|
140 |
</body> |
141 |
</section> |
120 |
</chapter> |
142 |
</chapter> |
121 |
|
143 |
|
122 |
<chapter> |
144 |
<chapter> |
Lines 146-165
Link Here
|
146 |
</p> |
168 |
</p> |
147 |
|
169 |
|
148 |
<pre caption="/etc/openldap/slapd.conf"> |
170 |
<pre caption="/etc/openldap/slapd.conf"> |
149 |
<comment># Include the needed data schemes</comment> |
171 |
# Include the needed data schemes |
150 |
include /etc/openldap/schema/cosine.schema |
172 |
include /etc/openldap/schema/cosine.schema |
151 |
include /etc/openldap/schema/inetorgperson.schema |
173 |
include /etc/openldap/schema/inetorgperson.schema |
152 |
include /etc/openldap/schema/nis.schema |
174 |
include /etc/openldap/schema/nis.schema |
153 |
|
175 |
|
154 |
<comment># Use crypt to hash the passwords</comment> |
176 |
# Use md5 to hash the passwords |
155 |
password-hash {crypt} |
177 |
password-hash {md5} |
156 |
|
178 |
|
157 |
<comment># Define SSL and TLS properties (optional)</comment> |
179 |
# Define SSL and TLS properties (optional) |
158 |
TLSCertificateFile /etc/ssl/ldap.pem |
180 |
TLSCertificateFile /etc/ssl/ldap.pem |
159 |
TLSCertificateKeyFile /etc/openldap/ssl/ldap.pem |
181 |
TLSCertificateKeyFile /etc/openldap/ssl/ldap.pem |
160 |
TLSCACertificateFile /etc/ssl/ldap.pem |
182 |
TLSCACertificateFile /etc/ssl/ldap.pem |
161 |
|
183 |
|
162 |
<comment>(Et plus bas...)</comment> |
184 |
<comment>Et plus bas...</comment> |
163 |
|
185 |
|
164 |
database ldbm |
186 |
database ldbm |
165 |
suffix "dc=genfic,dc=com" |
187 |
suffix "dc=genfic,dc=com" |
Lines 168-174
Link Here
|
168 |
directory /var/lib/openldap-ldbm |
190 |
directory /var/lib/openldap-ldbm |
169 |
index objectClass eq |
191 |
index objectClass eq |
170 |
|
192 |
|
171 |
<comment>(Le mot de passe ci-dessus est obtenu en faisant slappasswd -h {Md5})</comment> |
193 |
<comment>Le mot de passe ci-dessus est obtenu en faisant slappasswd -h {Md5}</comment> |
172 |
</pre> |
194 |
</pre> |
173 |
|
195 |
|
174 |
<p> |
196 |
<p> |
Lines 177-183
Link Here
|
177 |
|
199 |
|
178 |
<pre caption="/etc/openldap/ldap.conf"> |
200 |
<pre caption="/etc/openldap/ldap.conf"> |
179 |
# <i>nano -w /etc/openldap/ldap.conf</i> |
201 |
# <i>nano -w /etc/openldap/ldap.conf</i> |
180 |
<comment>(Ajoutez ceci :)</comment> |
202 |
<comment>Ajoutez ceci :</comment> |
181 |
|
203 |
|
182 |
BASE dc=genfic, dc=com |
204 |
BASE dc=genfic, dc=com |
183 |
URI ldaps://auth.genfic.com:636/ |
205 |
URI ldaps://auth.genfic.com:636/ |
Lines 277-301
Link Here
|
277 |
# <i>ldapadd -D "cn=Manager,dc=genfic,dc=com" -W -f /tmp/hosts.ldif</i> |
299 |
# <i>ldapadd -D "cn=Manager,dc=genfic,dc=com" -W -f /tmp/hosts.ldif</i> |
278 |
</pre> |
300 |
</pre> |
279 |
|
301 |
|
|
|
302 |
<p> |
303 |
Si vous rencontrez une erreur dans vos fichiers ldif, vous pouvez reprendre là |
304 |
où vous en étiez en utilisant <c>ldapadd -c</c>. |
305 |
</p> |
306 |
|
280 |
</body> |
307 |
</body> |
281 |
</section> |
308 |
</section> |
282 |
</chapter> |
309 |
</chapter> |
283 |
|
310 |
|
284 |
<chapter> |
311 |
<chapter> |
285 |
<title>Configuration de l'authentification</title> |
312 |
<title>Configuration du client</title> |
286 |
<section> |
313 |
<section> |
287 |
<title>Configurer PAM</title> |
314 |
<title>Configurer PAM</title> |
288 |
<body> |
315 |
<body> |
289 |
|
316 |
|
290 |
<p> |
317 |
<p> |
291 |
Ensuite, nous configurons PAM pour permettre les autorisations par LDAP. |
318 |
Nous allons tout d'abord configurer PAM pour permettre une authentification |
292 |
Modifiez le fichier <path>/etc/pam.d/system-auth</path> comme suit : |
319 |
LDAP. Installez <c>net-libs/pam_ldap</c> afin que PAM dispose du support LDAP et |
|
|
320 |
<c>net-libs/nss_ldap</c> pour que le système puisse utiliser des serveurs LDAP |
321 |
pour obtenir des informations supplémentaires (utilisé par le fichier |
322 |
<path>nsswitch.conf</path>). |
323 |
</p> |
324 |
|
325 |
<pre caption="Installation de pam_ldap et nss_ldap"> |
326 |
# <i>emerge pam_ldap nss_ldap</i> |
327 |
</pre> |
328 |
|
329 |
<p> |
330 |
Maintenant, éditez le fichier <path>/etc/pam.d/system-auth</path> pour qu'il |
331 |
ressemble à ceci : |
293 |
</p> |
332 |
</p> |
294 |
|
333 |
|
295 |
<pre caption="/etc/pam.d/system-auth"> |
334 |
<pre caption="/etc/pam.d/system-auth"> |
296 |
auth required /lib/security/pam_env.so |
335 |
auth required /lib/security/pam_env.so |
297 |
auth sufficient /lib/security/pam_unix.so likeauth nullok shadow |
|
|
298 |
auth sufficient /lib/security/pam_ldap.so use_first_pass |
336 |
auth sufficient /lib/security/pam_ldap.so use_first_pass |
|
|
337 |
auth sufficient /lib/security/pam_unix.so likeauth nullok shadow |
299 |
auth required /lib/security/pam_deny.so |
338 |
auth required /lib/security/pam_deny.so |
300 |
|
339 |
|
301 |
account sufficient /lib/security/pam_unix.so |
340 |
account sufficient /lib/security/pam_unix.so |
Lines 359-365
Link Here
|
359 |
<pre caption="Tester l'authentification LDAP"> |
398 |
<pre caption="Tester l'authentification LDAP"> |
360 |
# <i>getent passwd|grep 0:0</i> |
399 |
# <i>getent passwd|grep 0:0</i> |
361 |
|
400 |
|
362 |
<comment>(Vous devriez voir ces deux lignes :)</comment> |
401 |
<comment>Vous devriez voir ces deux lignes :</comment> |
363 |
root:x:0:0:root:/root:/bin/bash |
402 |
root:x:0:0:root:/root:/bin/bash |
364 |
root:x:0:0:root:/root:/bin/bash |
403 |
root:x:0:0:root:/root:/bin/bash |
365 |
</pre> |
404 |
</pre> |
Lines 380-386
Link Here
|
380 |
|
419 |
|
381 |
</body> |
420 |
</body> |
382 |
</section> |
421 |
</section> |
|
|
422 |
</chapter> |
383 |
|
423 |
|
|
|
424 |
<chapter> |
425 |
<title>Configuration de la sécurité du serveur LDAP</title> |
384 |
<section> |
426 |
<section> |
385 |
<title>Permissions OpenLDAP</title> |
427 |
<title>Permissions OpenLDAP</title> |
386 |
<body> |
428 |
<body> |
Lines 414-420
Link Here
|
414 |
</p> |
456 |
</p> |
415 |
|
457 |
|
416 |
<pre caption="/etc/openldap/slapd.conf"> |
458 |
<pre caption="/etc/openldap/slapd.conf"> |
417 |
access to attribute="userPassword" |
459 |
access to attrs="userPassword" |
418 |
by dn="uid=root,ou=people,dc=genfic,dc=com" write |
460 |
by dn="uid=root,ou=people,dc=genfic,dc=com" write |
419 |
by dn="uid=John,ou=People,dc=genfic,dc=com" write |
461 |
by dn="uid=John,ou=People,dc=genfic,dc=com" write |
420 |
by anonymous auth |
462 |
by anonymous auth |