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