1 <?xml version=
"1.0" encoding=
"ISO-8859-1"?>
2 <rss version='
2.0' xmlns:lj='http://www.livejournal.org/rss/lj/
1.0/'
>
4 <title>Petter Reinholdtsen - Entries from May
2010</title>
5 <description>Entries from May
2010</description>
6 <link>http://www.hungry.com/~pere/blog/
</link>
10 <title>Parallellized boot seem to hold up well in Debian/testing
</title>
11 <link>http://www.hungry.com/~pere/blog/Parallellized_boot_seem_to_hold_up_well_in_Debian_testing.html
</link>
12 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/Parallellized_boot_seem_to_hold_up_well_in_Debian_testing.html
</guid>
13 <pubDate>Thu,
27 May
2010 23:
55:
00 +
0200</pubDate>
14 <description><p
>A few days ago, parallel booting was enabled in Debian/testing.
15 The feature seem to hold up pretty well, but three fairly serious
16 issues are known and should be solved:
20 <li
>The wicd package seen to
21 <a href=
"http://bugs.debian.org/
508289">break NFS mounting
</a
> and
22 <a href=
"http://bugs.debian.org/
581586">network setup
</a
> when
23 parallel booting is enabled. No idea why, but the wicd maintainer
24 seem to be on the case.
</li
>
26 <li
>The nvidia X driver seem to
27 <a href=
"http://bugs.debian.org/
583312">have a race condition
</a
>
28 triggered more easily when parallel booting is in effect. The
29 maintainer is on the case.
</li
>
31 <li
>The sysv-rc package fail to properly enable dependency based boot
32 sequencing (the shutdown is broken) when old file-rc users
33 <a href=
"http://bugs.debian.org/
575080">try to switch back
</a
> to
34 sysv-rc. One way to solve it would be for file-rc to create
35 /etc/init.d/.legacy-bootordering, and another is to try to make
36 sysv-rc more robust. Will investigate some more and probably upload a
37 workaround in sysv-rc to help those trying to move from file-rc to
38 sysv-rc get a working shutdown.
</li
>
42 <p
>All in all not many surprising issues, and all of them seem
43 solvable before Squeeze is released. In addition to these there are
44 some packages with bugs in their dependencies and run level settings,
45 which I expect will be fixed in a reasonable time span.
</p
>
47 <p
>If you report any problems with dependencies in init.d scripts to
48 the BTS, please usertag the report to get it to show up at
49 <a href=
"http://bugs.debian.org/cgi-bin/pkgreport.cgi?users=initscripts-ng-devel@lists.alioth.debian.org
">the
50 list of usertagged bugs related to this
</a
>.
</p
>
52 <p
>Update: Correct bug number to file-rc issue.
</p
>
57 <title>More flexible firmware handling in debian-installer
</title>
58 <link>http://www.hungry.com/~pere/blog/More_flexible_firmware_handling_in_debian_installer.html
</link>
59 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/More_flexible_firmware_handling_in_debian_installer.html
</guid>
60 <pubDate>Sat,
22 May
2010 21:
30:
00 +
0200</pubDate>
61 <description><p
>After a long break from debian-installer development, I finally
62 found time today to return to the project. Having to spend less time
63 working dependency based boot in debian, as it is almost complete now,
64 definitely helped freeing some time.
</p
>
66 <p
>A while back, I ran into a problem while working on Debian Edu. We
67 include some firmware packages on the Debian Edu CDs, those needed to
68 get disk and network controllers working. Without having these
69 firmware packages available during installation, it is impossible to
70 install Debian Edu on the given machine, and because our target group
71 are non-technical people, asking them to provide firmware packages on
72 an external medium is a support pain. Initially, I expected it to be
73 enough to include the firmware packages on the CD to get
74 debian-installer to find and use them. This proved to be wrong.
75 Next, I hoped it was enough to symlink the relevant firmware packages
76 to some useful location on the CD (tried /cdrom/ and
77 /cdrom/firmware/). This also proved to not work, and at this point I
78 found time to look at the debian-installer code to figure out what was
79 going to work.
</p
>
81 <p
>The firmware loading code is in the hw-detect package, and a closer
82 look revealed that it would only look for firmware packages outside
83 the installation media, so the CD was never checked for firmware
84 packages. It would only check USB sticks, floppies and other
85 "external
" media devices. Today I changed it to also look in the
86 /cdrom/firmware/ directory on the mounted CD or DVD, which should
87 solve the problem I ran into with Debian edu. I also changed it to
88 look in /firmware/, to make sure the installer also find firmware
89 provided in the initrd when booting the installer via PXE, to allow us
90 to provide the same feature in the PXE setup included in Debian
93 <p
>To make sure firmware deb packages with a license questions are not
94 activated without asking if the license is accepted, I extended
95 hw-detect to look for preinst scripts in the firmware packages, and
96 run these before activating the firmware during installation. The
97 license question is asked using debconf in the preinst, so this should
98 solve the issue for the firmware packages I have looked at so far.
</p
>
100 <p
>If you want to discuss the details of these features, please
101 contact us on debian-boot@lists.debian.org.
</p
>
106 <title>Magnetstripeinnhold i billetter fra Flytoget og Hurtigruten
</title>
107 <link>http://www.hungry.com/~pere/blog/Magnetstripeinnhold_i_billetter_fra_Flytoget_og_Hurtigruten.html
</link>
108 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/Magnetstripeinnhold_i_billetter_fra_Flytoget_og_Hurtigruten.html
</guid>
109 <pubDate>Fri,
21 May
2010 16:
00:
00 +
0200</pubDate>
110 <description><p
>For en stund tilbake kjøpte jeg en magnetkortleser for å kunne
111 titte på hva som er skrevet inn på magnetstripene til ulike kort. Har
112 ikke hatt tid til å analysere mange kort så langt, men tenkte jeg
113 skulle dele innholdet på to kort med mine lesere.
</p
>
115 <p
>For noen dager siden tok jeg flyet til Harstad og Hurtigruten til
116 Bergen. Flytoget fra Oslo S til flyplassen ga meg en billett med
117 magnetstripe. Påtrykket finner jeg følgende informasjon:
</p
>
120 Flytoget Airport Express Train
122 Fra - Til : Oslo Sentralstasjon
125 Herav mva.
8,
00% : NOK
12,
59
127 Til - Fra : Oslo Lufthavn
129 Gyldig Fra-Til :
08.05.10-
07.11.10
130 Billetttype : Enkeltbillett
132 102-
1015-
100508-
48382-
01-
08
135 <p
>På selve magnetstripen er innholdet
136 <tt
>;E?+
900120011=
23250996541068112619257138248441708433322932704083389389062603279671261502492655?
</tt
>.
137 Aner ikke hva innholdet representerer, og det er lite overlapp mellom
138 det jeg ser trykket på billetten og det jeg ser av tegn i
139 magnetstripen. Håper det betyr at de bruker kryptografiske metoder
140 for å gjøre det vanskelig å forfalske billetter.
</p
>
142 <p
>Den andre billetten er fra Hurtigruten, der jeg mistenker at
143 strekkoden på fronten er mer brukt enn magnetstripen (det var i hvert
144 fall den biten vi stakk inn i dørlåsen).
</p
>
146 <p
>Påtrykket forsiden er følgende:
</p
>
154 Bookingno: SAX69
0742193
156 Dep:
09.05.2010 Arr:
12.05.2010
161 <p
>På selve magnetstripen er innholdet
162 <tt
>;
1316010007421930=
00000000000000000000?+E?
</tt
>. Heller ikke her
163 ser jeg mye korrespondanse mellom påtrykk og magnetstripe.
</p
>
168 <title>Pieces of the roaming laptop puzzle in Debian
</title>
169 <link>http://www.hungry.com/~pere/blog/Pieces_of_the_roaming_laptop_puzzle_in_Debian.html
</link>
170 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/Pieces_of_the_roaming_laptop_puzzle_in_Debian.html
</guid>
171 <pubDate>Wed,
19 May
2010 19:
00:
00 +
0200</pubDate>
172 <description><p
>Today, the last piece of the puzzle for roaming laptops in Debian
173 Edu finally entered the Debian archive. Today, the new
174 <a href=
"http://packages.qa.debian.org/libp/libpam-mklocaluser.html
">libpam-mklocaluser
</a
>
175 package was accepted. Two days ago, two other pieces was accepted
177 <a href=
"http://packages.qa.debian.org/p/pam-python.html
">pam-python
</a
>
178 package needed by libpam-mklocaluser, and the
179 <a href=
"http://packages.qa.debian.org/s/sssd.html
">sssd
</a
> package
180 passed NEW on Monday. In addition, the
181 <a href=
"http://packages.qa.debian.org/libp/libpam-ccreds.html
">libpam-ccreds
</a
>
182 package we need is in experimental (version
10-
4) since Saturday, and
183 hopefully will be moved to unstable soon.
</p
>
185 <p
>This collection of packages allow for two different setups for
186 roaming laptops. The traditional setup would be using libpam-ccreds,
187 nscd and libpam-mklocaluser with LDAP or Kerberos authentication,
188 which should work out of the box if the configuration changes proposed
189 for nscd in
<a href=
"http://bugs.debian.org/
485282">BTS report
190 #
485282</a
> is implemented. The alternative setup is to use sssd with
191 libpam-mklocaluser to connect to LDAP or Kerberos and let sssd take
192 care of the caching of passwords and group information.
</p
>
194 <p
>I have so far been unable to get sssd to work with the LDAP server
195 at the University, but suspect the issue is some SSL/GnuTLS related
196 problem with the server certificate. I plan to update the Debian
197 package to version
1.2, which is scheduled for next week, and hope to
198 find time to make sure the next release will include both the
199 Debian/Ubuntu specific patches. Upstream is friendly and responsive,
200 and I am sure we will find a good solution.
</p
>
202 <p
>The idea is to set up the roaming laptops to authenticate using
203 LDAP or Kerberos and create a local user with home directory in /home/
204 when a usre in LDAP logs in via KDM or GDM for the first time, and
205 cache the password for offline checking, as well as caching group
206 memberhips and other relevant LDAP information. The
207 libpam-mklocaluser package was created to make sure the local home
208 directory is in /home/, instead of /site/server/directory/ which would
209 be the home directory if pam_mkhomedir was used. To avoid confusion
210 with support requests and configuration, we do not want local laptops
211 to have users in a path that is used for the same users home directory
212 on the home directory servers.
</p
>
214 <p
>One annoying problem with gdm is that it do not show the PAM
215 message passed to the user from libpam-mklocaluser when the local user
216 is created. Instead gdm simply reject the login with some generic
217 message. The message is shown in kdm, ssh and login, so I guess it is
218 a bug in gdm. Have not investigated if there is some other message
219 type that can be used instead to get gdm to also show the message.
</p
>
221 <p
>If you want to help out with implementing this for Debian Edu,
222 please contact us on debian-edu@lists.debian.org.
</p
>
227 <title>Parallellized boot is now the default in Debian/unstable
</title>
228 <link>http://www.hungry.com/~pere/blog/Parallellized_boot_is_now_the_default_in_Debian_unstable.html
</link>
229 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/Parallellized_boot_is_now_the_default_in_Debian_unstable.html
</guid>
230 <pubDate>Fri,
14 May
2010 22:
40:
00 +
0200</pubDate>
231 <description><p
>Since this evening, parallel booting is the default in
232 Debian/unstable for machines using dependency based boot sequencing.
233 Apparently the testing of concurrent booting has been wider than
234 expected, if I am to believe the
235 <a href=
"http://lists.debian.org/debian-devel/
2010/
05/msg00122.html
">input
236 on debian-devel@
</a
>, and I concluded a few days ago to move forward
237 with the feature this weekend, to give us some time to detect any
238 remaining problems before Squeeze is frozen. If serious problems are
239 detected, it is simple to change the default back to sequential boot.
240 The upload of the new sysvinit package also activate a new upstream
243 More information about
244 <a href=
"http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot
">dependency
245 based boot sequencing
</a
> is available from the Debian wiki. It is
246 currently possible to disable parallel booting when one run into
247 problems caused by it, by adding this line to /etc/default/rcS:
</p
>
249 <blockquote
><pre
>
251 </pre
></blockquote
>
253 <p
>If you report any problems with dependencies in init.d scripts to
254 the BTS, please usertag the report to get it to show up at
255 <a href=
"http://bugs.debian.org/cgi-bin/pkgreport.cgi?users=initscripts-ng-devel@lists.alioth.debian.org
">the
256 list of usertagged bugs related to this
</a
>.
</p
>
261 <title>Sitesummary tip: Listing MAC address of all clients
</title>
262 <link>http://www.hungry.com/~pere/blog/Sitesummary_tip__Listing_MAC_address_of_all_clients.html
</link>
263 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/Sitesummary_tip__Listing_MAC_address_of_all_clients.html
</guid>
264 <pubDate>Fri,
14 May
2010 21:
10:
00 +
0200</pubDate>
265 <description><p
>In the recent Debian Edu versions, the
266 <a href=
"http://wiki.debian.org/DebianEdu/HowTo/SiteSummary
">sitesummary
267 system
</a
> is used to keep track of the machines in the school
268 network. Each machine will automatically report its status to the
269 central server after boot and once per night. The network setup is
270 also reported, and using this information it is possible to get the
271 MAC address of all network interfaces in the machines. This is useful
272 to update the DHCP configuration.
</p
>
274 <p
>To give some idea how to use sitesummary, here is a one-liner to
275 ist all MAC addresses of all machines reporting to sitesummary. Run
276 this on the collector host:
</p
>
278 <blockquote
><pre
>
279 perl -MSiteSummary -e
'for_all_hosts(sub { print join(
" ", get_macaddresses(shift)),
"\n
"; });
'
280 </pre
></blockquote
>
282 <p
>This will list all MAC addresses assosiated with all machine, one
283 line per machine and with space between the MAC addresses.
</p
>
285 <p
>To allow system administrators easier job at adding static DHCP
286 addresses for hosts, it would be possible to extend this to fetch
287 machine information from sitesummary and update the DHCP and DNS
288 tables in LDAP using this information. Such tool is unfortunately not
289 written yet.
</p
>
294 <title>systemd, an interesting alternative to upstart
</title>
295 <link>http://www.hungry.com/~pere/blog/systemd__an_interesting_alternative_to_upstart.html
</link>
296 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/systemd__an_interesting_alternative_to_upstart.html
</guid>
297 <pubDate>Thu,
13 May
2010 22:
20:
00 +
0200</pubDate>
298 <description><p
>The last few days a new boot system called
299 <a href=
"http://www.freedesktop.org/wiki/Software/systemd
">systemd
</a
>
301 <a href=
"http://
0pointer.de/blog/projects/systemd.html
">introduced
</a
>
303 to the free software world. I have not yet had time to play around
304 with it, but it seem to be a very interesting alternative to
305 <a href=
"http://upstart.ubuntu.com/
">upstart
</a
>, and might prove to be
306 a good alternative for Debian when we are able to switch to an event
307 based boot system. Tollef is
308 <a href=
"http://bugs.debian.org/
580814">in the process
</a
> of getting
309 systemd into Debian, and I look forward to seeing how well it work. I
310 like the fact that systemd handles init.d scripts with dependency
311 information natively, allowing them to run in parallel where upstart
312 at the moment do not.
</p
>
314 <p
>Unfortunately do systemd have the same problem as upstart regarding
315 platform support. It only work on recent Linux kernels, and also need
316 some new kernel features enabled to function properly. This means
317 kFreeBSD and Hurd ports of Debian will need a port or a different boot
318 system. Not sure how that will be handled if systemd proves to be the
319 way forward.
</p
>
321 <p
>In the mean time, based on the
322 <a href=
"http://lists.debian.org/debian-devel/
2010/
05/msg00122.html
">input
323 on debian-devel@
</a
> regarding parallel booting in Debian, I have
324 decided to enable full parallel booting as the default in Debian as
325 soon as possible (probably this weekend or early next week), to see if
326 there are any remaining serious bugs in the init.d dependencies. A
327 new version of the sysvinit package implementing this change is
328 already in experimental. If all go well, Squeeze will be released
329 with parallel booting enabled by default.
</p
>
334 <title>Parallellizing the boot in Debian Squeeze - ready for wider testing
</title>
335 <link>http://www.hungry.com/~pere/blog/Parallellizing_the_boot_in_Debian_Squeeze___ready_for_wider_testing.html
</link>
336 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/Parallellizing_the_boot_in_Debian_Squeeze___ready_for_wider_testing.html
</guid>
337 <pubDate>Thu,
6 May
2010 23:
25:
00 +
0200</pubDate>
338 <description><p
>These days, the init.d script dependencies in Squeeze are quite
339 complete, so complete that it is actually possible to run all the
340 init.d scripts in parallell based on these dependencies. If you want
341 to test your Squeeze system, make sure
342 <a href=
"http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot
">dependency
343 based boot sequencing
</a
> is enabled, and add this line to
344 /etc/default/rcS:
</p
>
346 <blockquote
><pre
>
348 </pre
></blockquote
>
350 <p
>That is it. It will cause sysv-rc to use the startpar tool to run
351 scripts in parallel using the dependency information stored in
352 /etc/init.d/.depend.boot, /etc/init.d/.depend.start and
353 /etc/init.d/.depend.stop to order the scripts. Startpar is configured
354 to try to start the kdm and gdm scripts as early as possible, and will
355 start the facilities required by kdm or gdm as early as possible to
356 make this happen.
</p
>
358 <p
>Give it a try, and see if you like the result. If some services
359 fail to start properly, it is most likely because they have incomplete
360 init.d script dependencies in their startup script (or some of their
361 dependent scripts have incomplete dependencies). Report bugs and get
362 the package maintainers to fix it. :)
</p
>
364 <p
>Running scripts in parallel could be the default in Debian when we
365 manage to get the init.d script dependencies complete and correct. I
366 expect we will get there in Squeeze+
1, if we get manage to test and
367 fix the remaining issues.
</p
>
369 <p
>If you report any problems with dependencies in init.d scripts to
370 the BTS, please usertag the report to get it to show up at
371 <a href=
"http://bugs.debian.org/cgi-bin/pkgreport.cgi?users=initscripts-ng-devel@lists.alioth.debian.org
">the
372 list of usertagged bugs related to this
</a
>.
</p
>
377 <title>Forcing new users to change their password on first login
</title>
378 <link>http://www.hungry.com/~pere/blog/Forcing_new_users_to_change_their_password_on_first_login.html
</link>
379 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/Forcing_new_users_to_change_their_password_on_first_login.html
</guid>
380 <pubDate>Sun,
2 May
2010 13:
47:
00 +
0200</pubDate>
381 <description><p
>One interesting feature in Active Directory, is the ability to
382 create a new user with an expired password, and thus force the user to
383 change the password on the first login attempt.
</p
>
385 <p
>I
'm not quite sure how to do that with the LDAP setup in Debian
386 Edu, but did some initial testing with a local account. The account
387 and password aging information is available in /etc/shadow, but
388 unfortunately, it is not possible to specify an expiration time for
389 passwords, only a maximum age for passwords.
</p
>
391 <p
>A freshly created account (using adduser test) will have these
392 settings in /etc/shadow:
</p
>
394 <blockquote
><pre
>
395 root@tjener:~# chage -l test
396 Last password change : May
02,
2010
397 Password expires : never
398 Password inactive : never
399 Account expires : never
400 Minimum number of days between password change :
0
401 Maximum number of days between password change :
99999
402 Number of days of warning before password expires :
7
404 </pre
></blockquote
>
406 <p
>The only way I could come up with to create a user with an expired
407 account, is to change the date of the last password change to the
408 lowest value possible (January
1th
1970), and the maximum password age
409 to the difference in days between that date and today. To make it
410 simple, I went for
30 years (
30 *
365 =
10950) and January
2th (to
411 avoid testing if
0 is a valid value).
</p
>
413 <p
>After using these commands to set it up, it seem to work as
416 <blockquote
><pre
>
417 root@tjener:~# chage -d
1 test; chage -M
10950 test
418 root@tjener:~# chage -l test
419 Last password change : Jan
02,
1970
420 Password expires : never
421 Password inactive : never
422 Account expires : never
423 Minimum number of days between password change :
0
424 Maximum number of days between password change :
10950
425 Number of days of warning before password expires :
7
427 </pre
></blockquote
>
429 <p
>So far I have tested this with ssh and console, and kdm (in
430 Squeeze) login, and all ask for a new password before login in the
431 user (with ssh, I was thrown out and had to log in again).
</p
>
433 <p
>Perhaps we should set up something similar for Debian Edu, to make
434 sure only the user itself have the account password?
</p
>
436 <p
>If you want to comment on or help out with implementing this for
437 Debian Edu, please contact us on debian-edu@lists.debian.org.
</p
>
439 <p
>Update
2010-
05-
02 17:
20: Paul Tötterman tells me on IRC that the
440 shadow(
8) page in Debian/testing now state that setting the date of
441 last password change to zero (
0) will force the password to be changed
442 on the first login. This was not mentioned in the manual in Lenny, so
443 I did not notice this in my initial testing. I have tested it on
444 Squeeze, and
'<tt
>chage -d
0 username
</tt
>' do work there. I have not
445 tested it on Lenny yet.
</p
>
447 <p
>Update
2010-
05-
02-
19:
05: Jim Paris tells me via email that an
448 equivalent command to expire a password is
'<tt
>passwd -e
449 username
</tt
>', which insert zero into the date of the last password