]> pere.pagekite.me Git - homepage.git/blob - blog/tags/ldap/index.html
58d457103479be83bdf7f264382829e63673fc14
[homepage.git] / blog / tags / ldap / index.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html>
4 <head>
5 <title>Petter Reinholdtsen: Entries Tagged ldap</title>
6 <link rel="stylesheet" type="text/css" media="screen" href="http://people.skolelinux.org/pere/blog/style.css">
7 <link rel="alternate" title="RSS Feed" href="ldap.rss" type="application/rss+xml">
8 </head>
9 <body>
10
11 <div class="title">
12 <h1>
13 <a href="http://people.skolelinux.org/pere/blog/">Petter Reinholdtsen</a>
14
15 </h1>
16
17 </div>
18
19 <p>Entries tagged "ldap".</p>
20
21
22
23
24 <div class="entry">
25 <div class="title">
26 <a href="http://people.skolelinux.org/pere/blog/Time_for_new__LDAP_schemas_replacing_RFC_2307_.html">Time for new LDAP schemas replacing RFC 2307?</a>
27 </div>
28 <div class="date">
29 2009-03-29 20:30
30 </div>
31
32 <div class="body">
33
34 <p>The state of standardized LDAP schemas on Linux is far from
35 optimal. There is RFC 2307 documenting one way to store NIS maps in
36 LDAP, and a modified version of this normally called RFC 2307bis, with
37 some modifications to be compatible with Active Directory. The RFC
38 specification handle the content of a lot of system databases, but do
39 not handle DNS zones and DHCP configuration.</p>
40
41 <p>In <a href="http://www.skolelinux.org/">Debian Edu/Skolelinux</a>,
42 we would like to store information about users, SMB clients/hosts,
43 filegroups, netgroups (users and hosts), DHCP and DNS configuration,
44 and LTSP configuration in LDAP. These objects have a lot in common,
45 but with the current LDAP schemas it is not possible to have one
46 object per entity. For example, one need to have at least three LDAP
47 objects for a given computer, one with the SMB related stuff, one with
48 DNS information and another with DHCP information. The schemas
49 provided for DNS and DHCP are impossible to combine into one LDAP
50 object. In addition, it is impossible to implement quick queries for
51 netgroup membership, because of the way NIS triples are implemented.
52 It just do not scale. I believe it is time for a few RFC
53 specifications to cleam up this mess.</p>
54
55 <p>I would like to have one LDAP object representing each computer in
56 the network, and this object can then keep the SMB (ie host key), DHCP
57 (mac address/name) and DNS (name/IP address) settings in one place.
58 It need to be efficently stored to make sure it scale well.</p>
59
60 <p>I would also like to have a quick way to map from a user or
61 computer and to the net group this user or computer is a member.</p>
62
63 <p>Active Directory have done a better job than unix heads like myself
64 in this regard, and the unix side need to catch up. Time to start a
65 new IETF work group?</p>
66
67 </div>
68 <div class="tags">
69
70
71
72 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/ldap">ldap</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>.
73
74 </div>
75 </div>
76 <div class="padding"></div>
77
78 <div class="entry">
79 <div class="title">
80 <a href="http://people.skolelinux.org/pere/blog/Idea_for_a_change_to_LDAP_schemas_allowing_DNS_and_DHCP_info_to_be_combined_into_one_object.html">Idea for a change to LDAP schemas allowing DNS and DHCP info to be combined into one object</a>
81 </div>
82 <div class="date">
83 2010-06-24 00:35
84 </div>
85
86 <div class="body">
87
88 <p>A while back, I
89 <a href="http://people.skolelinux.org/pere/blog/Time_for_new__LDAP_schemas_replacing_RFC_2307_.html">complained
90 about the fact</a> that it is not possible with the provided schemas
91 for storing DNS and DHCP information in LDAP to combine the two sets
92 of information into one LDAP object representing a computer.</p>
93
94 <p>In the mean time, I discovered that a simple fix would be to make
95 the dhcpHost object class auxiliary, to allow it to be combined with
96 the dNSDomain object class, and thus forming one object for one
97 computer when storing both DHCP and DNS information in LDAP.</p>
98
99 <p>If I understand this correctly, it is not safe to do this change
100 without also changing the assigned number for the object class, and I
101 do not know enough about LDAP schema design to do that properly for
102 Debian Edu.</p>
103
104 <p>Anyway, for future reference, this is how I believe we could change
105 the
106 <a href="http://tools.ietf.org/html/draft-ietf-dhc-ldap-schema-00">DHCP
107 schema</a> to solve at least part of the problem with the LDAP schemas
108 available today from IETF.</p>
109
110 <pre>
111 --- dhcp.schema (revision 65192)
112 +++ dhcp.schema (working copy)
113 @@ -376,7 +376,7 @@
114 objectclass ( 2.16.840.1.113719.1.203.6.6
115 NAME 'dhcpHost'
116 DESC 'This represents information about a particular client'
117 - SUP top
118 + SUP top AUXILIARY
119 MUST cn
120 MAY (dhcpLeaseDN $ dhcpHWAddress $ dhcpOptionsDN $ dhcpStatements $ dhcpComments $ dhcpOption)
121 X-NDS_CONTAINMENT ('dhcpService' 'dhcpSubnet' 'dhcpGroup') )
122 </pre>
123
124 <p>I very much welcome clues on how to do this properly for Debian
125 Edu/Squeeze. We provide the DHCP schema in our debian-edu-config
126 package, and should thus be free to rewrite it as we see fit.</p>
127
128 <p>If you want to help out with implementing this for Debian Edu,
129 please contact us on debian-edu@lists.debian.org.</p>
130
131 </div>
132 <div class="tags">
133
134
135
136 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/ldap">ldap</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>.
137
138 </div>
139 </div>
140 <div class="padding"></div>
141
142 <div class="entry">
143 <div class="title">
144 <a href="http://people.skolelinux.org/pere/blog/LUMA__a_very_nice_LDAP_GUI.html">LUMA, a very nice LDAP GUI</a>
145 </div>
146 <div class="date">
147 2010-06-28 00:30
148 </div>
149
150 <div class="body">
151
152 <p>The last few days I have been looking into the status of the LDAP
153 directory in Debian Edu, and in the process I started to miss a GUI
154 tool to browse the LDAP tree. The only one I was able to find in
155 Debian/Squeeze and Lenny is
156 <a href="http://luma.sourceforge.net/">LUMA</a>, which has proved to
157 be a great tool to get a overview of the current LDAP directory
158 populated by default in Skolelinux. Thanks to it, I have been able to
159 find empty and obsolete subtrees, misplaced objects and duplicate
160 objects. It will be installed by default in Debian/Squeeze. If you
161 are working with LDAP, give it a go. :)</p>
162
163 <p>I did notice one problem with it I have not had time to report to
164 the BTS yet. There is no .desktop file in the package, so the tool do
165 not show up in the Gnome and KDE menus, but only deep down in in the
166 Debian submenu in KDE. I hope that can be fixed before Squeeze is
167 released.</p>
168
169 <p>I have not yet been able to get it to modify the tree yet. I would
170 like to move objects and remove subtrees directly in the GUI, but have
171 not found a way to do that with LUMA yet. So in the mean time, I use
172 <a href="http://www.lichteblau.com/ldapvi/">ldapvi</a> for that.</p>
173
174 <p>If you have tips on other GUI tools for LDAP that might be useful
175 in Debian Edu, please contact us on debian-edu@lists.debian.org.</p>
176
177 <p>Update 2010-06-29: Ross Reedstrom tipped us about the
178 <a href="http://packages.qa.debian.org/g/gq.html">gq</a> package as a
179 useful GUI alternative. It seem like a good tool, but is unmaintained
180 in Debian and got a RC bug keeping it out of Squeeze. Unless that
181 changes, it will not be an option for Debian Edu based on Squeeze.</p>
182
183 </div>
184 <div class="tags">
185
186
187
188 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/ldap">ldap</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>.
189
190 </div>
191 </div>
192 <div class="padding"></div>
193
194 <div class="entry">
195 <div class="title">
196 <a href="http://people.skolelinux.org/pere/blog/Caching_password__user_and_group_on_a_roaming_Debian_laptop.html">Caching password, user and group on a roaming Debian laptop</a>
197 </div>
198 <div class="date">
199 2010-07-01 11:40
200 </div>
201
202 <div class="body">
203
204 <p>For a laptop, centralized user directories and password checking is
205 a bit troubling. Laptops are typically used also when not connected
206 to the network, and it is vital for a user to be able to log in or
207 unlock the screen saver also when a central server is unavailable.
208 This is possible by caching passwords and directory information (user
209 and group attributes) locally, and the packages to do so are available
210 in Debian. Here follow two recipes to set this up in Debian/Squeeze.
211 It is also possible to set up in Debian/Lenny, but require more manual
212 setup there because pam-auth-update is missing in Lenny.</p>
213
214 <h2>LDAP/Kerberos + nscd + libpam-ccreds + libpam-mklocaluser/pam_mkhomedir</h2>
215
216 This is the traditional method with a twist. The password caching is
217 provided by libpam-ccreds (version 10-4 or later is needed on
218 Squeeze), and the directory caching is done by nscd. The directory
219 lookup and password checking is done using LDAP. If one want to use
220 Kerberos for password checking the libpam-ldapd package can be
221 replaced with libpam-krb5 or libpam-heimdal. If one is happy having a
222 local home directory with the path listed in LDAP, one can use the
223 pam_mkhomedir module from pam-modules to make this happen instead of
224 using libpam-mklocaluser. A setup for pam-auth-update to enable
225 pam_mkhomedir will have to be written until a fix for
226 <a href="http://bugs.debian.org/568577">bug #568577</a> is in the
227 archive. Because I believe it is a bad idea to have local home
228 directories using misleading paths like /site/server/partition/, I
229 prefer to create a local user with the home directory in /home/. This
230 is done using the libpam-mklocaluser package.</p>
231
232 <p>These packages need to be installed and configured</p>
233
234 <blockquote><pre>
235 libnss-ldapd libpam-ldapd nscd libpam-ccreds libpam-mklocaluser
236 </pre></blockquote>
237
238 <p>The ldapd packages will ask for LDAP connection information, and
239 one have to fill in the values that fits ones own site. Make sure the
240 PAM part uses encrypted connections, to make sure the password is not
241 sent in clear text to the LDAP server. I've been unable to get TLS
242 certificate checking for a self signed certificate working, which make
243 LDAP authentication unsafe for Debian Edu (nslcd is not checking if it
244 is talking to the correct LDAP server), and very much welcome feedback
245 on how to get this working.</p>
246
247 <p>Because nscd do not have a default configuration fit for offline
248 caching until <a href="http://bugs.debian.org/485282">bug #485282</a>
249 is fixed, this configuration should be used instead of the one
250 currently in /etc/nscd.conf. The changes are in the fields
251 reload-count and positive-time-to-live, and is based on the
252 instructions I found in the
253 <a href="http://www.flyn.org/laptopldap/">LDAP for Mobile Laptops</a>
254 instructions by Flyn Computing.</p>
255
256 <blockquote><pre>
257 debug-level 0
258 reload-count unlimited
259 paranoia no
260
261 enable-cache passwd yes
262 positive-time-to-live passwd 2592000
263 negative-time-to-live passwd 20
264 suggested-size passwd 211
265 check-files passwd yes
266 persistent passwd yes
267 shared passwd yes
268 max-db-size passwd 33554432
269 auto-propagate passwd yes
270
271 enable-cache group yes
272 positive-time-to-live group 2592000
273 negative-time-to-live group 20
274 suggested-size group 211
275 check-files group yes
276 persistent group yes
277 shared group yes
278 max-db-size group 33554432
279 auto-propagate group yes
280
281 enable-cache hosts no
282 positive-time-to-live hosts 2592000
283 negative-time-to-live hosts 20
284 suggested-size hosts 211
285 check-files hosts yes
286 persistent hosts yes
287 shared hosts yes
288 max-db-size hosts 33554432
289
290 enable-cache services yes
291 positive-time-to-live services 2592000
292 negative-time-to-live services 20
293 suggested-size services 211
294 check-files services yes
295 persistent services yes
296 shared services yes
297 max-db-size services 33554432
298 </pre></blockquote>
299
300 <p>While we wait for a mechanism to update /etc/nsswitch.conf
301 automatically like the one provided in
302 <a href="http://bugs.debian.org/496915">bug #496915</a>, the file
303 content need to be manually replaced to ensure LDAP is used as the
304 directory service on the machine. /etc/nsswitch.conf should normally
305 look like this:</p>
306
307 <blockquote><pre>
308 passwd: files ldap
309 group: files ldap
310 shadow: files ldap
311 hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
312 networks: files
313 protocols: files
314 services: files
315 ethers: files
316 rpc: files
317 netgroup: files ldap
318 </pre></blockquote>
319
320 <p>The important parts are that ldap is listed last for passwd, group,
321 shadow and netgroup.</p>
322
323 <p>With these changes in place, any user in LDAP will be able to log
324 in locally on the machine using for example kdm, get a local home
325 directory created and have the password as well as user and group
326 attributes cached.
327
328 <h2>LDAP/Kerberos + nss-updatedb + libpam-ccreds +
329 libpam-mklocaluser/pam_mkhomedir</h2>
330
331 <p>Because nscd have had its share of problems, and seem to have
332 problems doing proper caching, I've seen suggestions and recipes to
333 use nss-updatedb to copy parts of the LDAP database locally when the
334 LDAP database is available. I have not tested such setup, because I
335 discovered sssd.</p>
336
337 <h2>LDAP/Kerberos + sssd + libpam-mklocaluser</h2>
338
339 <p>A more flexible and robust setup than the nscd combination
340 mentioned earlier that has shown up recently, is the
341 <a href="https://fedorahosted.org/sssd/">sssd</a> package from Redhat.
342 It is part of the <a href="http://www.freeipa.org/">FreeIPA</A> project
343 to provide a Active Directory like directory service for Linux
344 machines. The sssd system combines the caching of passwords and user
345 information into one package, and remove the need for nscd and
346 libpam-ccreds. It support LDAP and Kerberos, but not NIS. Version
347 1.2 do not support netgroups, but it is said that it will support this
348 in version 1.5 expected to show up later in 2010. Because the
349 <a href="http://packages.qa.debian.org/s/sssd.html">sssd package</a>
350 was missing in Debian, I ended up co-maintaining it with Werner, and
351 version 1.2 is now in testing.
352
353 <p>These packages need to be installed and configured to get the
354 roaming setup I want</p>
355
356 <blockquote><pre>
357 libpam-sss libnss-sss libpam-mklocaluser
358 </pre></blockquote>
359
360 The complete setup of sssd is done by editing/creating
361 <tt>/etc/sssd/sssd.conf</tt>.
362
363 <blockquote><pre>
364 [sssd]
365 config_file_version = 2
366 reconnection_retries = 3
367 sbus_timeout = 30
368 services = nss, pam
369 domains = INTERN
370
371 [nss]
372 filter_groups = root
373 filter_users = root
374 reconnection_retries = 3
375
376 [pam]
377 reconnection_retries = 3
378
379 [domain/INTERN]
380 enumerate = false
381 cache_credentials = true
382
383 id_provider = ldap
384 auth_provider = ldap
385 chpass_provider = ldap
386
387 ldap_uri = ldap://ldap
388 ldap_search_base = dc=skole,dc=skolelinux,dc=no
389 ldap_tls_reqcert = never
390 ldap_tls_cacert = /etc/ssl/certs/ca-certificates.crt
391 </pre></blockquote>
392
393 <p>I got the same problem here with certificate checking. Had to set
394 "ldap_tls_reqcert = never" to get it working.</p>
395
396 <p>With the libnss-sss package in testing at the moment, the
397 nsswitch.conf file is update automatically, so there is no need to
398 modify it manually.</p>
399
400 <p>If you want to help out with implementing this for Debian Edu,
401 please contact us on debian-edu@lists.debian.org.</p>
402
403 </div>
404 <div class="tags">
405
406
407
408 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/ldap">ldap</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>.
409
410 </div>
411 </div>
412 <div class="padding"></div>
413
414 <p style="text-align: right;"><a href="ldap.rss"><img src="http://people.skolelinux.org/pere/blog/xml.gif" alt="RSS Feed" width="36" height="14"></a></p>
415
416
417
418
419 <div id="sidebar">
420
421 <h2>Archive</h2>
422 <ul>
423
424 <li>2010
425 <ul>
426
427 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/01/">January (2)</a></li>
428
429 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/02/">February (1)</a></li>
430
431 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/03/">March (3)</a></li>
432
433 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/04/">April (3)</a></li>
434
435 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/05/">May (9)</a></li>
436
437 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/06/">June (14)</a></li>
438
439 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/07/">July (2)</a></li>
440
441 </ul></li>
442
443 <li>2009
444 <ul>
445
446 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/01/">January (8)</a></li>
447
448 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/02/">February (8)</a></li>
449
450 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/03/">March (12)</a></li>
451
452 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/04/">April (10)</a></li>
453
454 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/05/">May (9)</a></li>
455
456 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/06/">June (3)</a></li>
457
458 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/07/">July (4)</a></li>
459
460 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/08/">August (3)</a></li>
461
462 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/09/">September (1)</a></li>
463
464 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/10/">October (2)</a></li>
465
466 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/11/">November (3)</a></li>
467
468 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/12/">December (3)</a></li>
469
470 </ul></li>
471
472 <li>2008
473 <ul>
474
475 <li><a href="http://people.skolelinux.org/pere/blog/archive/2008/11/">November (5)</a></li>
476
477 <li><a href="http://people.skolelinux.org/pere/blog/archive/2008/12/">December (7)</a></li>
478
479 </ul></li>
480
481 </ul>
482
483
484
485 <h2>Tags</h2>
486 <ul>
487
488 <li><a href="http://people.skolelinux.org/pere/blog/tags/3d-printer">3d-printer (11)</a></li>
489
490 <li><a href="http://people.skolelinux.org/pere/blog/tags/amiga">amiga (1)</a></li>
491
492 <li><a href="http://people.skolelinux.org/pere/blog/tags/aros">aros (1)</a></li>
493
494 <li><a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem (10)</a></li>
495
496 <li><a href="http://people.skolelinux.org/pere/blog/tags/debian">debian (30)</a></li>
497
498 <li><a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu (30)</a></li>
499
500 <li><a href="http://people.skolelinux.org/pere/blog/tags/english">english (43)</a></li>
501
502 <li><a href="http://people.skolelinux.org/pere/blog/tags/fiksgatami">fiksgatami (1)</a></li>
503
504 <li><a href="http://people.skolelinux.org/pere/blog/tags/fildeling">fildeling (7)</a></li>
505
506 <li><a href="http://people.skolelinux.org/pere/blog/tags/kart">kart (2)</a></li>
507
508 <li><a href="http://people.skolelinux.org/pere/blog/tags/ldap">ldap (4)</a></li>
509
510 <li><a href="http://people.skolelinux.org/pere/blog/tags/lenker">lenker (1)</a></li>
511
512 <li><a href="http://people.skolelinux.org/pere/blog/tags/ltsp">ltsp (1)</a></li>
513
514 <li><a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia (5)</a></li>
515
516 <li><a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk (69)</a></li>
517
518 <li><a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug (80)</a></li>
519
520 <li><a href="http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett (13)</a></li>
521
522 <li><a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern (13)</a></li>
523
524 <li><a href="http://people.skolelinux.org/pere/blog/tags/reprap">reprap (10)</a></li>
525
526 <li><a href="http://people.skolelinux.org/pere/blog/tags/rss">rss (1)</a></li>
527
528 <li><a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet (9)</a></li>
529
530 <li><a href="http://people.skolelinux.org/pere/blog/tags/sitesummary">sitesummary (3)</a></li>
531
532 <li><a href="http://people.skolelinux.org/pere/blog/tags/standard">standard (13)</a></li>
533
534 <li><a href="http://people.skolelinux.org/pere/blog/tags/stavekontroll">stavekontroll (1)</a></li>
535
536 <li><a href="http://people.skolelinux.org/pere/blog/tags/video">video (10)</a></li>
537
538 <li><a href="http://people.skolelinux.org/pere/blog/tags/vitenskap">vitenskap (1)</a></li>
539
540 <li><a href="http://people.skolelinux.org/pere/blog/tags/web">web (6)</a></li>
541
542 </ul>
543
544 </div>
545 </body>
546 </html>