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