]> pere.pagekite.me Git - homepage.git/blob - blog/archive/2010/07/index.html
Nevn jXplorer.
[homepage.git] / blog / archive / 2010 / 07 / 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 from July 2010</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="07.rss" type="application/rss+xml">
8 </head>
9 <body>
10 <!-- XML FEED -->
11
12 <div class="title">
13 <h1>
14 <a href="http://people.skolelinux.org/pere/blog/">Petter Reinholdtsen</a>
15
16 </h1>
17
18 </div>
19
20 <p>Entries from July 2010.</p>
21
22
23 <div class="entry">
24 <div class="title">
25 <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>
26 </div>
27 <div class="date">
28 2010-07-01 11:40
29 </div>
30
31 <div class="body">
32
33 <p>For a laptop, centralized user directories and password checking is
34 a bit troubling. Laptops are typically used also when not connected
35 to the network, and it is vital for a user to be able to log in or
36 unlock the screen saver also when a central server is unavailable.
37 This is possible by caching passwords and directory information (user
38 and group attributes) locally, and the packages to do so are available
39 in Debian. Here follow two recipes to set this up in Debian/Squeeze.
40 It is also possible to set up in Debian/Lenny, but require more manual
41 setup there because pam-auth-update is missing in Lenny.</p>
42
43 <h2>LDAP/Kerberos + nscd + libpam-ccreds + libpam-mklocaluser/pam_mkhomedir</h2>
44
45 This is the traditional method with a twist. The password caching is
46 provided by libpam-ccreds (version 10-4 or later is needed on
47 Squeeze), and the directory caching is done by nscd. The directory
48 lookup and password checking is done using LDAP. If one want to use
49 Kerberos for password checking the libpam-ldapd package can be
50 replaced with libpam-krb5 or libpam-heimdal. If one is happy having a
51 local home directory with the path listed in LDAP, one can use the
52 pam_mkhomedir module from pam-modules to make this happen instead of
53 using libpam-mklocaluser. A setup for pam-auth-update to enable
54 pam_mkhomedir will have to be written until a fix for
55 <a href="http://bugs.debian.org/568577">bug #568577</a> is in the
56 archive. Because I believe it is a bad idea to have local home
57 directories using misleading paths like /site/server/partition/, I
58 prefer to create a local user with the home directory in /home/. This
59 is done using the libpam-mklocaluser package.</p>
60
61 <p>These packages need to be installed and configured</p>
62
63 <blockquote><pre>
64 libnss-ldapd libpam-ldapd nscd libpam-ccreds libpam-mklocaluser
65 </pre></blockquote>
66
67 <p>The ldapd packages will ask for LDAP connection information, and
68 one have to fill in the values that fits ones own site. Make sure the
69 PAM part uses encrypted connections, to make sure the password is not
70 sent in clear text to the LDAP server. I've been unable to get TLS
71 certificate checking for a self signed certificate working, which make
72 LDAP authentication unsafe for Debian Edu (nslcd is not checking if it
73 is talking to the correct LDAP server), and very much welcome feedback
74 on how to get this working.</p>
75
76 <p>Because nscd do not have a default configuration fit for offline
77 caching until <a href="http://bugs.debian.org/485282">bug #485282</a>
78 is fixed, this configuration should be used instead of the one
79 currently in /etc/nscd.conf. The changes are in the fields
80 reload-count and positive-time-to-live, and is based on the
81 instructions I found in the
82 <a href="http://www.flyn.org/laptopldap/">LDAP for Mobile Laptops</a>
83 instructions by Flyn Computing.</p>
84
85 <blockquote><pre>
86 debug-level 0
87 reload-count unlimited
88 paranoia no
89
90 enable-cache passwd yes
91 positive-time-to-live passwd 2592000
92 negative-time-to-live passwd 20
93 suggested-size passwd 211
94 check-files passwd yes
95 persistent passwd yes
96 shared passwd yes
97 max-db-size passwd 33554432
98 auto-propagate passwd yes
99
100 enable-cache group yes
101 positive-time-to-live group 2592000
102 negative-time-to-live group 20
103 suggested-size group 211
104 check-files group yes
105 persistent group yes
106 shared group yes
107 max-db-size group 33554432
108 auto-propagate group yes
109
110 enable-cache hosts no
111 positive-time-to-live hosts 2592000
112 negative-time-to-live hosts 20
113 suggested-size hosts 211
114 check-files hosts yes
115 persistent hosts yes
116 shared hosts yes
117 max-db-size hosts 33554432
118
119 enable-cache services yes
120 positive-time-to-live services 2592000
121 negative-time-to-live services 20
122 suggested-size services 211
123 check-files services yes
124 persistent services yes
125 shared services yes
126 max-db-size services 33554432
127 </pre></blockquote>
128
129 <p>While we wait for a mechanism to update /etc/nsswitch.conf
130 automatically like the one provided in
131 <a href="http://bugs.debian.org/496915">bug #496915</a>, the file
132 content need to be manually replaced to ensure LDAP is used as the
133 directory service on the machine. /etc/nsswitch.conf should normally
134 look like this:</p>
135
136 <blockquote><pre>
137 passwd: files ldap
138 group: files ldap
139 shadow: files ldap
140 hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
141 networks: files
142 protocols: files
143 services: files
144 ethers: files
145 rpc: files
146 netgroup: files ldap
147 </pre></blockquote>
148
149 <p>The important parts are that ldap is listed last for passwd, group,
150 shadow and netgroup.</p>
151
152 <p>With these changes in place, any user in LDAP will be able to log
153 in locally on the machine using for example kdm, get a local home
154 directory created and have the password as well as user and group
155 attributes cached.
156
157 <h2>LDAP/Kerberos + nss-updatedb + libpam-ccreds +
158 libpam-mklocaluser/pam_mkhomedir</h2>
159
160 <p>Because nscd have had its share of problems, and seem to have
161 problems doing proper caching, I've seen suggestions and recipes to
162 use nss-updatedb to copy parts of the LDAP database locally when the
163 LDAP database is available. I have not tested such setup, because I
164 discovered sssd.</p>
165
166 <h2>LDAP/Kerberos + sssd + libpam-mklocaluser</h2>
167
168 <p>A more flexible and robust setup than the nscd combination
169 mentioned earlier that has shown up recently, is the
170 <a href="https://fedorahosted.org/sssd/">sssd</a> package from Redhat.
171 It is part of the <a href="http://www.freeipa.org/">FreeIPA</A> project
172 to provide a Active Directory like directory service for Linux
173 machines. The sssd system combines the caching of passwords and user
174 information into one package, and remove the need for nscd and
175 libpam-ccreds. It support LDAP and Kerberos, but not NIS. Version
176 1.2 do not support netgroups, but it is said that it will support this
177 in version 1.5 expected to show up later in 2010. Because the
178 <a href="http://packages.qa.debian.org/s/sssd.html">sssd package</a>
179 was missing in Debian, I ended up co-maintaining it with Werner, and
180 version 1.2 is now in testing.
181
182 <p>These packages need to be installed and configured to get the
183 roaming setup I want</p>
184
185 <blockquote><pre>
186 libpam-sss libnss-sss libpam-mklocaluser
187 </pre></blockquote>
188
189 The complete setup of sssd is done by editing/creating
190 <tt>/etc/sssd/sssd.conf</tt>.
191
192 <blockquote><pre>
193 [sssd]
194 config_file_version = 2
195 reconnection_retries = 3
196 sbus_timeout = 30
197 services = nss, pam
198 domains = INTERN
199
200 [nss]
201 filter_groups = root
202 filter_users = root
203 reconnection_retries = 3
204
205 [pam]
206 reconnection_retries = 3
207
208 [domain/INTERN]
209 enumerate = false
210 cache_credentials = true
211
212 id_provider = ldap
213 auth_provider = ldap
214 chpass_provider = ldap
215
216 ldap_uri = ldap://ldap
217 ldap_search_base = dc=skole,dc=skolelinux,dc=no
218 ldap_tls_reqcert = never
219 ldap_tls_cacert = /etc/ssl/certs/ca-certificates.crt
220 </pre></blockquote>
221
222 <p>I got the same problem here with certificate checking. Had to set
223 "ldap_tls_reqcert = never" to get it working.</p>
224
225 <p>With the libnss-sss package in testing at the moment, the
226 nsswitch.conf file is update automatically, so there is no need to
227 modify it manually.</p>
228
229 <p>If you want to help out with implementing this for Debian Edu,
230 please contact us on debian-edu@lists.debian.org.</p>
231
232 </div>
233 <div class="tags">
234
235
236
237 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>.
238
239 </div>
240 </div>
241 <div class="padding"></div>
242
243 <div class="entry">
244 <div class="title">
245 <a href="http://people.skolelinux.org/pere/blog/Lenny__Squeeze_upgrades__apt_vs_aptitude_with_the_Gnome_desktop.html">Lenny->Squeeze upgrades, apt vs aptitude with the Gnome desktop</a>
246 </div>
247 <div class="date">
248 2010-07-03 23:55
249 </div>
250
251 <div class="body">
252
253 <p>Here is a short update on my <a
254 href="http://people.skolelinux.org/~pere/debian-upgrade-testing/">my
255 Debian Lenny->Squeeze upgrade testing</a>. Here is a summary of the
256 difference for Gnome when it is upgraded by apt-get and aptitude. I'm
257 not reporting the status for KDE, because the upgrade crashes when
258 aptitude try because of missing conflicts
259 (<a href="http://bugs.debian.org/584861">#584861</a> and
260 <a href="http://bugs.debian.org/585716">#585716</a>).</p>
261
262 <p>At the end of the upgrade test script, dpkg -l is executed to get a
263 complete list of the installed packages. Based on this I see these
264 differences when I did a test run today. As usual, I do not really
265 know what the correct set of packages would be, but thought it best to
266 publish the difference.</p>
267
268 <p>Installed using apt-get, missing with aptitude</p>
269
270 <blockquote><p>
271 at-spi cpp-4.3 finger gnome-spell gstreamer0.10-gnomevfs
272 libatspi1.0-0 libcupsys2 libeel2-data libgail-common libgdl-1-common
273 libgnomeprint2.2-data libgnomeprintui2.2-common libgnomevfs2-bin
274 libgtksourceview-common libpt-1.10.10-plugins-alsa
275 libpt-1.10.10-plugins-v4l libservlet2.4-java libxalan2-java
276 libxerces2-java openoffice.org-writer2latex openssl-blacklist p7zip
277 python-4suite-xml python-eggtrayicon python-gtkhtml2
278 python-gtkmozembed svgalibg1 xserver-xephyr zip
279 </p></blockquote>
280
281 <p>Installed using apt-get, removed with aptitude</p>
282
283 <blockquote><p>
284 bluez-utils dhcdbd djvulibre-desktop epiphany-gecko
285 gnome-app-install gnome-mount gnome-vfs-obexftp gnome-volume-manager
286 libao2 libavahi-compat-libdnssd1 libavahi-core5 libbind9-50
287 libbluetooth2 libcamel1.2-11 libcdio7 libcucul0 libcurl3
288 libdirectfb-1.0-0 libdvdread3 libedata-cal1.2-6 libedataserver1.2-9
289 libeel2-2.20 libepc-1.0-1 libepc-ui-1.0-1 libexchange-storage1.2-3
290 libfaad0 libgd2-noxpm libgda3-3 libgda3-common libggz2 libggzcore9
291 libggzmod4 libgksu1.2-0 libgksuui1.0-1 libgmyth0 libgnome-desktop-2
292 libgnome-pilot2 libgnomecups1.0-1 libgnomeprint2.2-0
293 libgnomeprintui2.2-0 libgpod3 libgraphviz4 libgtkhtml2-0
294 libgtksourceview1.0-0 libgucharmap6 libhesiod0 libicu38 libisccc50
295 libisccfg50 libiw29 libkpathsea4 libltdl3 liblwres50 libmagick++10
296 libmagick10 libmalaga7 libmtp7 libmysqlclient15off libnautilus-burn4
297 libneon27 libnm-glib0 libnm-util0 libopal-2.2 libosp5
298 libparted1.8-10 libpisock9 libpisync1 libpoppler-glib3 libpoppler3
299 libpt-1.10.10 libraw1394-8 libsensors3 libsmbios2 libsoup2.2-8
300 libssh2-1 libsuitesparse-3.1.0 libswfdec-0.6-90 libtalloc1
301 libtotem-plparser10 libtrackerclient0 libvoikko1 libxalan2-java-gcj
302 libxerces2-java-gcj libxklavier12 libxtrap6 libxxf86misc1 libzephyr3
303 mysql-common swfdec-gnome totem-gstreamer wodim
304 </p></blockquote>
305
306 <p>Installed using aptitude, missing with apt-get</p>
307
308 <blockquote><p>
309 gnome gnome-desktop-environment hamster-applet python-gnomeapplet
310 python-gnomekeyring python-wnck rhythmbox-plugins xorg
311 xserver-xorg-input-all xserver-xorg-input-evdev
312 xserver-xorg-input-kbd xserver-xorg-input-mouse
313 xserver-xorg-input-synaptics xserver-xorg-video-all
314 xserver-xorg-video-apm xserver-xorg-video-ark xserver-xorg-video-ati
315 xserver-xorg-video-chips xserver-xorg-video-cirrus
316 xserver-xorg-video-dummy xserver-xorg-video-fbdev
317 xserver-xorg-video-glint xserver-xorg-video-i128
318 xserver-xorg-video-i740 xserver-xorg-video-mach64
319 xserver-xorg-video-mga xserver-xorg-video-neomagic
320 xserver-xorg-video-nouveau xserver-xorg-video-nv
321 xserver-xorg-video-r128 xserver-xorg-video-radeon
322 xserver-xorg-video-radeonhd xserver-xorg-video-rendition
323 xserver-xorg-video-s3 xserver-xorg-video-s3virge
324 xserver-xorg-video-savage xserver-xorg-video-siliconmotion
325 xserver-xorg-video-sis xserver-xorg-video-sisusb
326 xserver-xorg-video-tdfx xserver-xorg-video-tga
327 xserver-xorg-video-trident xserver-xorg-video-tseng
328 xserver-xorg-video-vesa xserver-xorg-video-vmware
329 xserver-xorg-video-voodoo
330 </p></blockquote>
331
332 <p>Installed using aptitude, removed with apt-get</p>
333
334 <blockquote><p>
335 deskbar-applet xserver-xorg xserver-xorg-core
336 xserver-xorg-input-wacom xserver-xorg-video-intel
337 xserver-xorg-video-openchrome
338 </p></blockquote>
339
340 <p>I was told on IRC that the xorg-xserver package was
341 <a href="http://git.debian.org/?p=pkg-xorg/xserver/xorg-server.git;a=commit;h=9c8080d06c457932d3bfec021c69ac000aa60120">changed
342 in git</a> today to try to get apt-get to not remove xorg completely.
343 No idea when it hits Squeeze, but when it does I hope it will reduce
344 the difference somewhat.
345
346 </div>
347 <div class="tags">
348
349
350
351 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>.
352
353 </div>
354 </div>
355 <div class="padding"></div>
356
357 <div class="entry">
358 <div class="title">
359 <a href="http://people.skolelinux.org/pere/blog/MS_Word_kr__ller_det_til_for_politiet_.html">MS Word krøller det til for politiet?</a>
360 </div>
361 <div class="date">
362 2010-07-08 14:00
363 </div>
364
365 <div class="body">
366
367 <p>De siste dagene har Aftenposten
368 <a href="http://www.aftenposten.no/nyheter/iriks/article3718597.ece">fortalt</a>
369 <a href="http://www.aftenposten.no/nyheter/iriks/article3724249.ece">hvordan</a>
370 politet har brukt skriveverktøy som ikke håndterer arabisk tekst og
371 tekst som skal skrives fra høyre mot venstre når de har laget
372 løpeseddel for å be om informasjon fra publikum. Resultatet har vært
373 en uleselig arabisk-bit på løpeseddelen. Feilen har oppstått når
374 teksten har blitt "kopiert inn i programvare som ikke har støtte for
375 språk som skrives fra høyre mot venstre", og jeg er ganske sikker på
376 at det er snakk om Microsoft Office i dette tilfellet. Er det slik at
377 MS Office i norsk språkdrakt ikke har støtte for tekst som skal
378 skrives fra høyre mot venstre? Jeg tror alle utgaver av
379 OpenOffice.org har slik støtte, og det er jo ikke veldig vanskelig å
380 la slik støtte finnes i alle utgaver av et program hvis støtten først
381 er utviklet. Aftenpostens melding får meg til å undre om problemet
382 ville vært unngått hvis politiet brukte OpenOffice.org i stedet for MS
383 Office.</p>
384
385 <p>Mon tro om det er flere eksempler på at MS Office har ødelagt for
386 offentlig myndighet?</p>
387
388 </div>
389 <div class="tags">
390
391
392
393 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk</a>.
394
395 </div>
396 </div>
397 <div class="padding"></div>
398
399 <p style="text-align: right;"><a href="07.rss"><img src="http://people.skolelinux.org/pere/blog/xml.gif" alt="RSS Feed" width="36" height="14"></a></p>
400
401
402
403 <div id="sidebar">
404
405 <h2>Archive</h2>
406 <ul>
407
408 <li>2010
409 <ul>
410
411 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/01/">January (2)</a></li>
412
413 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/02/">February (1)</a></li>
414
415 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/03/">March (3)</a></li>
416
417 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/04/">April (3)</a></li>
418
419 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/05/">May (9)</a></li>
420
421 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/06/">June (14)</a></li>
422
423 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/07/">July (3)</a></li>
424
425 </ul></li>
426
427 <li>2009
428 <ul>
429
430 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/01/">January (8)</a></li>
431
432 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/02/">February (8)</a></li>
433
434 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/03/">March (12)</a></li>
435
436 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/04/">April (10)</a></li>
437
438 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/05/">May (9)</a></li>
439
440 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/06/">June (3)</a></li>
441
442 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/07/">July (4)</a></li>
443
444 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/08/">August (3)</a></li>
445
446 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/09/">September (1)</a></li>
447
448 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/10/">October (2)</a></li>
449
450 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/11/">November (3)</a></li>
451
452 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/12/">December (3)</a></li>
453
454 </ul></li>
455
456 <li>2008
457 <ul>
458
459 <li><a href="http://people.skolelinux.org/pere/blog/archive/2008/11/">November (5)</a></li>
460
461 <li><a href="http://people.skolelinux.org/pere/blog/archive/2008/12/">December (7)</a></li>
462
463 </ul></li>
464
465 </ul>
466
467
468
469 <h2>Tags</h2>
470 <ul>
471
472 <li><a href="http://people.skolelinux.org/pere/blog/tags/3d-printer">3d-printer (11)</a></li>
473
474 <li><a href="http://people.skolelinux.org/pere/blog/tags/amiga">amiga (1)</a></li>
475
476 <li><a href="http://people.skolelinux.org/pere/blog/tags/aros">aros (1)</a></li>
477
478 <li><a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem (10)</a></li>
479
480 <li><a href="http://people.skolelinux.org/pere/blog/tags/debian">debian (30)</a></li>
481
482 <li><a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu (30)</a></li>
483
484 <li><a href="http://people.skolelinux.org/pere/blog/tags/english">english (43)</a></li>
485
486 <li><a href="http://people.skolelinux.org/pere/blog/tags/fiksgatami">fiksgatami (1)</a></li>
487
488 <li><a href="http://people.skolelinux.org/pere/blog/tags/fildeling">fildeling (7)</a></li>
489
490 <li><a href="http://people.skolelinux.org/pere/blog/tags/kart">kart (2)</a></li>
491
492 <li><a href="http://people.skolelinux.org/pere/blog/tags/ldap">ldap (4)</a></li>
493
494 <li><a href="http://people.skolelinux.org/pere/blog/tags/lenker">lenker (1)</a></li>
495
496 <li><a href="http://people.skolelinux.org/pere/blog/tags/ltsp">ltsp (1)</a></li>
497
498 <li><a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia (5)</a></li>
499
500 <li><a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk (70)</a></li>
501
502 <li><a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug (80)</a></li>
503
504 <li><a href="http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett (13)</a></li>
505
506 <li><a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern (13)</a></li>
507
508 <li><a href="http://people.skolelinux.org/pere/blog/tags/reprap">reprap (10)</a></li>
509
510 <li><a href="http://people.skolelinux.org/pere/blog/tags/rss">rss (1)</a></li>
511
512 <li><a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet (9)</a></li>
513
514 <li><a href="http://people.skolelinux.org/pere/blog/tags/sitesummary">sitesummary (3)</a></li>
515
516 <li><a href="http://people.skolelinux.org/pere/blog/tags/standard">standard (13)</a></li>
517
518 <li><a href="http://people.skolelinux.org/pere/blog/tags/stavekontroll">stavekontroll (1)</a></li>
519
520 <li><a href="http://people.skolelinux.org/pere/blog/tags/video">video (10)</a></li>
521
522 <li><a href="http://people.skolelinux.org/pere/blog/tags/vitenskap">vitenskap (1)</a></li>
523
524 <li><a href="http://people.skolelinux.org/pere/blog/tags/web">web (6)</a></li>
525
526 </ul>
527
528 </div>
529 </body>
530 </html>