1 <?xml version=
"1.0" encoding=
"utf-8"?>
2 <rss version='
2.0' xmlns:lj='http://www.livejournal.org/rss/lj/
1.0/' xmlns:
atom=
"http://www.w3.org/2005/Atom">
4 <title>Petter Reinholdtsen
</title>
5 <description></description>
6 <link>http://people.skolelinux.org/pere/blog/
</link>
7 <atom:link href=
"http://people.skolelinux.org/pere/blog/index.rss" rel=
"self" type=
"application/rss+xml" />
10 <title>Testing if a file system can be used for home directories...
</title>
11 <link>http://people.skolelinux.org/pere/blog/Testing_if_a_file_system_can_be_used_for_home_directories___.html
</link>
12 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Testing_if_a_file_system_can_be_used_for_home_directories___.html
</guid>
13 <pubDate>Sun,
8 Aug
2010 21:
20:
00 +
0200</pubDate>
15 <p
>A few years ago, I was involved in a project planning to use
16 Windows file servers as home directory servers for Debian
17 Edu/Skolelinux machines. This was thought to be no problem, as the
18 access would be through the SMB network file system protocol, and we
19 knew other sites used SMB with unix and samba as the file server to
20 mount home directories without any problems. But, after months of
21 struggling, we had to conclude that our goal was impossible.
</p
>
23 <p
>The reason is simply that while SMB can be used for home
24 directories when the file server is Samba running on Unix, this only
25 work because of Samba have some extensions and the fact that the
26 underlying file system is a unix file system. When using a Windows
27 file server, the underlying file system do not have POSIX semantics,
28 and several programs will fail if the users home directory where they
29 want to store their configuration lack POSIX semantics.
</p
>
31 <p
>As part of this work, I wrote a small C program I want to share
32 with you all, to replicate a few of the problematic applications (like
33 OpenOffice.org and GCompris) and see if the file system was working as
34 it should. If you find yourself in spooky file system land, it might
35 help you find your way out again. This is the fs-test.c source:
</p
>
39 * Some tests to check the file system sematics. Used to verify that
40 * CIFS from a windows server do not work properly as a linux home
42 * License: GPL v2 or later
44 * needs libsqlite3-dev and build-essential installed
45 * compile with: gcc -Wall -lsqlite3 -DTEST_SQLITE fs-test.c -o fs-test
48 #define _FILE_OFFSET_BITS
64
49 #define _LARGEFILE_SOURCE
1
50 #define _LARGEFILE64_SOURCE
1
52 #define _GNU_SOURCE /* for asprintf() */
54 #include
<errno.h
>
55 #include
<fcntl.h
>
56 #include
<stdio.h
>
57 #include
<string.h
>
58 #include
<stdlib.h
>
59 #include
<sys/file.h
>
60 #include
<sys/stat.h
>
61 #include
<sys/types.h
>
62 #include
<unistd.h
>
66 * Test sqlite open, as done by gcompris require the libsqlite3-dev
67 * package and linking with -lsqlite3. A more low level test is
69 * See also
<URL: http://www.sqlite.org./faq.html#q5
>.
71 #include
<sqlite3.h
>
72 #define CREATE_TABLE_USERS \
73 "CREATE TABLE users (user_id INT UNIQUE, login TEXT, lastname TEXT, firstname TEXT, birthdate TEXT, class_id INT );
"
74 int test_sqlite_open(void) {
76 char *name =
"testsqlite.db
";
79 int rc = sqlite3_open(name,
&db);
81 printf(
"error: sqlite open of %s failed: %s\n
", name, sqlite3_errmsg(db));
87 rc = sqlite3_exec(db,CREATE_TABLE_USERS, NULL,
0,
&zErrMsg);
88 if( rc != SQLITE_OK ){
89 printf(
"error: sqlite table create failed: %s\n
", zErrMsg);
93 printf(
"info: sqlite worked\n
");
97 #endif /* TEST_SQLITE */
100 * Demonstrate locking issue found in gcompris using sqlite3. This
101 * work with ext3, but not with cifs server on Windows
2003. This is
102 * done in the sqlite3 library.
104 *
<URL:http://www.cygwin.com/ml/cygwin/
2001-
08/msg00854.html
> and the
105 * POSIX specification
106 *
<URL:http://www.opengroup.org/onlinepubs/
009695399/functions/fcntl.html
>.
108 int test_gcompris_locking(void) {
110 char *name =
"testsqlite.db
";
112 int fd = open(name, O_RDWR|O_CREAT|O_LARGEFILE,
0644);
113 printf(
"info: testing fcntl locking\n
");
115 fl.l_whence = SEEK_SET;
117 printf(
" Read-locking
1 byte from
1073741824");
118 fl.l_start =
1073741824;
121 if (
0 != fcntl(fd, F_SETLK,
&fl) ) printf(
" - error!\n
"); else printf(
"\n
");
123 printf(
" Read-locking
510 byte from
1073741826");
124 fl.l_start =
1073741826;
127 if (
0 != fcntl(fd, F_SETLK,
&fl) ) printf(
" - error!\n
"); else printf(
"\n
");
129 printf(
" Unlocking
1 byte from
1073741824");
130 fl.l_start =
1073741824;
133 if (
0 != fcntl(fd, F_SETLK,
&fl) ) printf(
" - error!\n
"); else printf(
"\n
");
135 printf(
" Write-locking
1 byte from
1073741824");
136 fl.l_start =
1073741824;
139 if (
0 != fcntl(fd, F_SETLK,
&fl) ) printf(
" - error!\n
"); else printf(
"\n
");
141 printf(
" Write-locking
510 byte from
1073741826");
142 fl.l_start =
1073741826;
144 if (
0 != fcntl(fd, F_SETLK,
&fl) ) printf(
" - error!\n
"); else printf(
"\n
");
146 printf(
" Unlocking
2 byte from
1073741824");
147 fl.l_start =
1073741824;
150 if (
0 != fcntl(fd, F_SETLK,
&fl) ) printf(
" - error!\n
"); else printf(
"\n
");
157 * Test if permissions of freshly created directories allow entries
158 * below them. This was a problem with OpenOffice.org and gcompris.
159 * Mounting with option
'sync
' seem to solve this problem while
160 * slowing down file operations.
162 int test_subdirectory_creation(void) {
164 char *path = strdup(
"test
");
167 printf(
"info: testing subdirectory creation\n
");
168 for (level =
0; level
< LEVELS; level++) {
169 char *newpath = NULL;
170 if (-
1 == mkdir(path,
0777)) {
171 printf(
" error: Unable to create directory
'%s
': %s\n
",
172 path, strerror(errno));
175 asprintf(
&newpath,
"%s/%s
", path,
"test
");
183 * Test if symlinks can be created. This was a problem detected with
186 int test_symlinks(void) {
187 printf(
"info: testing symlink creation\n
");
188 unlink(
"symlink
");
189 if (-
1 == symlink(
"file
",
"symlink
"))
190 printf(
" error: Unable to create symlink\n
");
194 int main(int argc, char **argv) {
195 printf(
"Testing POSIX/Unix sematics on file system\n
");
197 test_subdirectory_creation();
200 #endif /* TEST_SQLITE */
201 test_gcompris_locking();
206 <p
>When everything is working, it should print something like
210 Testing POSIX/Unix sematics on file system
211 info: testing symlink creation
212 info: testing subdirectory creation
214 info: testing fcntl locking
215 Read-locking
1 byte from
1073741824
216 Read-locking
510 byte from
1073741826
217 Unlocking
1 byte from
1073741824
218 Write-locking
1 byte from
1073741824
219 Write-locking
510 byte from
1073741826
220 Unlocking
2 byte from
1073741824
223 <p
>I do not remember the exact details of the problems we saw, but one
224 of them was with locking, where if I remember correctly, POSIX allow a
225 read-only lock to be upgraded to a read-write lock without unlocking
226 the read-only lock (while Windows do not). Another was a bug in the
227 CIFS/SMB client implementation in the Linux kernel where directory
228 meta information would be wrong for a fraction of a second, making
229 OpenOffice.org fail to create its deep directory tree because it was
230 not allowed to create files in its freshly created directory.
</p
>
232 <p
>Anyway, here is a nice tool for your tool box, might you never need
238 <title>Autodetecting Client setup for roaming workstations in Debian Edu
</title>
239 <link>http://people.skolelinux.org/pere/blog/Autodetecting_Client_setup_for_roaming_workstations_in_Debian_Edu.html
</link>
240 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Autodetecting_Client_setup_for_roaming_workstations_in_Debian_Edu.html
</guid>
241 <pubDate>Sat,
7 Aug
2010 14:
45:
00 +
0200</pubDate>
243 <p
>A few days ago, I
244 <a href=
"http://people.skolelinux.org/pere/blog/Debian_Edu_roaming_workstation___at_the_university_of_Oslo.html
">tried
245 to install
</a
> a Roaming workation profile from Debian Edu/Squeeze
246 while on the university network here at the University of Oslo, and
247 noticed how much had to change to get it operational using the
248 university infrastructure. It was fairly easy, but it occured to me
249 that Debian Edu would improve a lot if I could get the client to
250 connect without any changes at all, and thus let the client configure
251 itself during installation and first boot to use the infrastructure
252 around it. Now I am a huge step further along that road.
</p
>
254 <p
>With our current squeeze-test packages, I can select the roaming
255 workstation profile and get a working laptop connecting to the
256 university LDAP server for user and group and our active directory
257 servers for Kerberos authentication. All this without any
258 configuration at all during installation. My users home directory got
259 a bookmark in the KDE menu to mount it via SMB, with the correct URL.
260 In short, openldap and sssd is correctly configured. In addition to
261 this, the client look for http://wpad/wpad.dat to configure a web
262 proxy, and when it fail to find it no proxy settings are stored in
263 /etc/environment and /etc/apt/apt.conf. Iceweasel and KDE is
264 configured to look for the same wpad configuration and also do not use
265 a proxy when at the university network. If the machine is moved to a
266 network with such wpad setup, it would automatically use it when DHCP
267 gave it a IP address.
</p
>
269 <p
>The LDAP server is located using DNS, by first looking for the DNS
270 entry ldap.$domain. If this do not exist, it look for the
271 _ldap._tcp.$domain SRV records and use the first one as the LDAP
272 server. Next, it connects to the LDAP server and search all
273 namingContexts entries for posixAccount or posixGroup objects, and
274 pick the first one as the LDAP base. For Kerberos, a similar
275 algorithm is used to locate the LDAP server, and the realm is the
276 uppercase version of $domain.
</p
>
278 <p
>So, what is not working, you might ask. SMB mounting my home
279 directory do not work. No idea why, but suspected the incorrect
280 Kerberos settings in /etc/krb5.conf and /etc/samba/smb.conf might be
281 the cause. These are not properly configured during installation, and
282 had to be hand-edited to get the correct Kerberos realm and server,
283 but SMB mounting still do not work. :(
</p
>
285 <p
>With this automatic configuration in place, I expect a Debian Edu
286 roaming profile installation would be able to automatically detect and
287 connect to any site using LDAP and Kerberos for NSS directory and PAM
288 authentication. It should also work out of the box in a Active
289 Directory environment providing posixAccount and posixGroup objects
290 with UID and GID values.
</p
>
292 <p
>If you want to help out with implementing these things for Debian
293 Edu, please contact us on debian-edu@lists.debian.org.
</p
>
298 <title>Debian Edu roaming workstation - at the university of Oslo
</title>
299 <link>http://people.skolelinux.org/pere/blog/Debian_Edu_roaming_workstation___at_the_university_of_Oslo.html
</link>
300 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Debian_Edu_roaming_workstation___at_the_university_of_Oslo.html
</guid>
301 <pubDate>Tue,
3 Aug
2010 23:
30:
00 +
0200</pubDate>
303 <p
>The new roaming workstation profile in Debian Edu/Squeeze is fairly
304 similar to the laptop setup am I working on using Ubuntu for the
305 University of Oslo, and just for the heck of it, I tested today how
306 hard it would be to integrate that profile into the university
307 infrastructure. In this case, it is the university LDAP server,
308 Active Directory Kerberos server and SMB mounting from the Netapp file
311 <p
>I was pleasantly surprised that the only three files needed to be
312 changed (/etc/sssd/sssd.conf, /etc/ldap.conf and
313 /etc/mklocaluser.d/
20-debian-edu-config) and one file had to be added
314 (/usr/share/perl5/Debian/Edu_Local.pm), to get the client working.
315 Most of the changes were to get the client to use the university LDAP
316 for NSS and Kerberos server for PAM, but one was to change a hard
317 coded DNS domain name in the mklocaluser hook from .intern to
320 <p
>This testing was so encouraging, that I went ahead and adjusted the
321 Debian Edu scripts and setup in subversion to centralise the roaming
322 workstation setup a bit more and avoid the hardcoded DNS domain name,
323 so that when I test this tomorrow, I expect to get away with modifying
324 only /etc/sssd/sssd.conf and /etc/ldap.conf to get it to use the
325 university servers.
</p
>
327 <p
>My goal is to get the clients to have no hardcoded settings and
328 fetch all their initial setup during installation and first boot, to
329 allow them to be inserted also into environments where the default
330 setup in Debian Edu has been changed or as with the university, where
331 the environment is different but provides the protocols Debian Edu
337 <title>Circular package dependencies harms apt recovery
</title>
338 <link>http://people.skolelinux.org/pere/blog/Circular_package_dependencies_harms_apt_recovery.html
</link>
339 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Circular_package_dependencies_harms_apt_recovery.html
</guid>
340 <pubDate>Tue,
27 Jul
2010 23:
50:
00 +
0200</pubDate>
342 <p
>I discovered this while doing
343 <a href=
"http://people.skolelinux.org/pere/blog/Automatic_upgrade_testing_from_Lenny_to_Squeeze.html
">automated
344 testing of upgrades from Debian Lenny to Squeeze
</a
>. A few packages
345 in Debian still got circular dependencies, and it is often claimed
346 that apt and aptitude should be able to handle this just fine, but
347 some times these dependency loops causes apt to fail.
</p
>
349 <p
>An example is from todays
350 <a href=
"http://people.skolelinux.org/~pere/debian-upgrade-testing//test-
20100727-lenny-squeeze-kde-aptitude.txt
">upgrade
351 of KDE using aptitude
</a
>. In it, a bug in kdebase-workspace-data
352 causes perl-modules to fail to upgrade. The cause is simple. If a
353 package fail to unpack, then only part of packages with the circular
354 dependency might end up being unpacked when unpacking aborts, and the
355 ones already unpacked will fail to configure in the recovery phase
356 because its dependencies are unavailable.
</p
>
358 <p
>In this log, the problem manifest itself with this error:
</p
>
360 <blockquote
><pre
>
361 dpkg: dependency problems prevent configuration of perl-modules:
362 perl-modules depends on perl (
>=
5.10.1-
1); however:
363 Version of perl on system is
5.10.0-
19lenny
2.
364 dpkg: error processing perl-modules (--configure):
365 dependency problems - leaving unconfigured
366 </pre
></blockquote
>
368 <p
>The perl/perl-modules circular dependency is already
369 <a href=
"http://bugs.debian.org/
527917">reported as a bug
</a
>, and will
370 hopefully be solved as soon as possible, but it is not the only one,
371 and each one of these loops in the dependency tree can cause similar
372 failures. Of course, they only occur when there are bugs in other
373 packages causing the unpacking to fail, but it is rather nasty when
374 the failure of one package causes the problem to become worse because
375 of dependency loops.
</p
>
378 <a href=
"http://lists.debian.org/debian-devel/
2010/
06/msg00116.html
">the
379 tireless effort by Bill Allombert
</a
>, the number of circular
381 <a href=
"http://debian.semistable.com/debgraph.out.html
">left in Debian
382 is dropping
</a
>, and perhaps it will reach zero one day. :)
</p
>
384 <p
>Todays testing also exposed a bug in
385 <a href=
"http://bugs.debian.org/
590605">update-notifier
</a
> and
386 <a href=
"http://bugs.debian.org/
590604">different behaviour
</a
> between
387 apt-get and aptitude, the latter possibly caused by some circular
388 dependency. Reported both to BTS to try to get someone to look at
394 <title>First Debian Edu test release (alpha0) based on Squeeze is released
</title>
395 <link>http://people.skolelinux.org/pere/blog/First_Debian_Edu_test_release__alpha0__based_on_Squeeze_is_released.html
</link>
396 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/First_Debian_Edu_test_release__alpha0__based_on_Squeeze_is_released.html
</guid>
397 <pubDate>Tue,
27 Jul
2010 17:
45:
00 +
0200</pubDate>
399 <p
>I just posted this announcement culminating several months of work
400 with the next Debian Edu release. Not nearly done, but one major step
404 <p
>This is the first test release based on Squeeze. The focus of this
405 release is to test the user application selection. To have a look,
406 install the standalone profile and let the developers know if the set
407 of installed packages i.e. applications should be modified. If some
408 user application is missing, or if there are some applications that no
409 longer make sense to be included in Debian Edu, please let us know.
410 Also, if a useful application is missing the translation for your
411 language of choice, please let us know too.
</p
>
413 <p
>In addition, feedback and help to polish the desktop (menus,
414 artwork, starters, etc.) is appreciated. We would like to ship a nice
415 and handy KDE4 desktop targeted for schools out of the box.
</p
>
417 <p
>The other profiles should be installable, but there is a lot more
418 work left to be done before they are ready, so do not expect to
421 <p
>Changes compared to the lenny based version
</p
>
424 <li
>Everything from Debian Squeeze
426 <li
>Desktop environment KDE
4.4 =
> the new KDE desktop in
427 combination with some new artwork
428 <li
>Web browser Iceweasel
3.5
429 <li
>OpenOffice.org
3.2
430 <li
>Educational toolbox GCompris
9.3
431 <li
>Music creator Rosegarden
10.04.2
432 <li
>Image editor Gimp
2.6.10
433 <li
>Virtual universe Celestia
1.6.0
434 <li
>Virtual stargazer Stellarium
0.10.4
435 <li
>3D modeler Blender
2.49.2 (new application)
436 <li
>Video editor Kdenlive
0.7.7 (new application)
437 </ul
></li
>
438 <li
>Now using Kerberos for password checking (migration not finished).
444 <li
>SMTP (sender verification)
447 <li
>New experimental roaming workstation profile for laptops.
</li
>
448 <li
>Show welcome page to users when they first log in. The URL is
449 fetched from LDAP.
</li
>
450 <li
>New LXDE desktop option, in addition to KDE (default) and Gnome.
</li
>
451 <li
>General cleanup (not finished)
</li
>
453 <p
>The following features are not working as they should
</p
>
456 <li
>No web based administration tool for creating users and groups. The
457 scripts ldap-createuser-krb and ldap-add-user-to-group can be used
458 for testing.
</li
>
459 <li
>DVD installs are missing debian-installer images for the PXE boot,
460 and do not set up the PXE menu on eth0 because of this. LTSP
461 clients should still boot from eth1 on thin client servers.
</li
>
462 <li
>The restructured KDE menu is not implemented.
</li
>
463 <li
>The LDAP server setup need to be reviewed for security.
</li
>
464 <li
>The LDAP directory structure need to be reworked.
</li
>
465 <li
>Different sets of packages are installed when using the DVD and the
466 netinst CD. More packages are installed using the netinst CD.
</li
>
467 <li
>The jackd package fail to install. This is believed to be caused by
468 some ongoing transition, and hopefully should be solved soon. The
469 jackd1 package can be installed manually for those that need it.
</li
>
470 <li
>Some packages lack translations. See
471 http://wiki.debian.org/DebianEdu/Status/Squeeze for updated status,
472 and help out with translations.
</li
>
475 <p
>To download this multiarch netinstall release you can use
</p
>
478 <li
><a href=
"ftp://ftp.skolelinux.org/skolelinux-cd/squeeze-alpha/debian-edu-
6.0.0+edua0-CD.iso
">ftp://ftp.skolelinux.org/skolelinux-cd/squeeze-alpha/debian-edu-
6.0.0+edua0-CD.iso
</a
></li
>
479 <li
><a href=
"http://ftp.skolelinux.org/skolelinux-cd/squeeze-alpha/debian-edu-
6.0.0+edua0-CD.iso
">http://ftp.skolelinux.org/skolelinux-cd/squeeze-alpha/debian-edu-
6.0.0+edua0-CD.iso
</a
></li
>
480 <li
>rsync -avzP ftp.skolelinux.org::skolelinux-cd/squeeze-alpha/debian-edu-
6.0.0+edua0-CD.iso
</li
>
482 <p
>To download this multiarch dvd release you can use
</p
>
485 <li
><a href=
"ftp://ftp.skolelinux.org/skolelinux-cd/squeeze-alpha/debian-edu-
6.0.0+edua0-DVD.iso
">ftp://ftp.skolelinux.org/skolelinux-cd/squeeze-alpha/debian-edu-
6.0.0+edua0-DVD.iso
</a
></li
>
486 <li
><a href=
"http://ftp.skolelinux.org/skolelinux-cd/squeeze-alpha/debian-edu-
6.0.0+edua0-DVD.iso
">http://ftp.skolelinux.org/skolelinux-cd/squeeze-alpha/debian-edu-
6.0.0+edua0-DVD.iso
</a
></li
>
487 <li
>rsync -avzP ftp.skolelinux.org::skolelinux-cd/squeeze-alpha/debian-edu-
6.0.0+edua0-DVD.iso
</li
>
490 <p
>There is no source DVD available yet. It will be prepared when we
491 get closer to the final release.
</p
>
493 <p
>The MD5SUM of these images are
</p
>
496 <li
>3dbf45d59f42a53518b6e3c9ec3b5eb6 debian-edu-
6.0.0+edua0-CD.iso
</li
>
497 <li
>22f2cbfce281d1c6e478be452638675d debian-edu-
6.0.0+edua0-DVD.iso
</li
>
500 <p
>The SHA1SUM of these images are
</p
>
502 <li
>c53d1b69b40cf37cd27aefaf33f6f6a3821bedf0 debian-edu-
6.0.0+edua0-CD.iso
</li
>
503 <li
>2ec29d7db676d59d32197b05c277ffe16348376c debian-edu-
6.0.0+edua0-DVD.iso
</li
>
505 <p
>How to report bugs:
506 http://wiki.debian.org/DebianEdu/HowTo/ReportBugsInBugzilla
</p
>
508 <p
>Please direct replies to debian-edu@lists.debian.org
</p
>
514 <title>One step closer to single signon in Debian Edu
</title>
515 <link>http://people.skolelinux.org/pere/blog/One_step_closer_to_single_signon_in_Debian_Edu.html
</link>
516 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/One_step_closer_to_single_signon_in_Debian_Edu.html
</guid>
517 <pubDate>Sun,
25 Jul
2010 10:
00:
00 +
0200</pubDate>
519 <p
>The last few months me and the other Debian Edu developers have
520 been working hard to get the Debian/Squeeze based version of Debian
521 Edu/Skolelinux into shape. This future version will use Kerberos for
522 authentication, and services are slowly migrated to single signon,
523 getting rid of password questions one at the time.
</p
>
525 <p
>It will also feature a roaming workstation profile with local home
526 directory, for laptops that are only some times on the Skolelinux
527 network, and for this profile a shortcut is created in Gnome and KDE
528 to gain access to the users home directory on the file server. This
529 shortcut uses SMB at the moment, and yesterday I had time to test if
530 SMB mounting had started working in KDE after we added the cifs-utils
531 package. I was pleasantly surprised how well it worked.
</p
>
533 <p
>Thanks to the recent changes to our samba configuration to get it
534 to use Kerberos for authentication, there were no question about user
535 password when mounting the SMB volume. A simple click on the shortcut
536 in the KDE menu, and a window with the home directory popped
539 <p
>One step closer to a single signon solution out of the box in
540 Debian Edu. We already had PAM, LDAP, IMAP and SMTP in place, and now
541 also Samba. Next step is Cups and hopefully also NFS.
</p
>
543 <p
>We had planned a alpha0 release of Debian Edu for today, but thanks
544 to the autobuilder administrators for some architectures being slow to
545 sign packages, we are still missing the fixed LTSP package we need for
546 the release. It was uploaded three days ago with urgency=high, and if
547 it had entered testing yesterday we would have been able to test it in
548 time for a alpha0 release today. As the binaries for ia64 and powerpc
549 still not uploaded to the Debian archive, we need to delay the alpha
550 release another day.
</p
>
552 <p
>If you want to help out with implementing Kerberos for Debian Edu,
553 please contact us on debian-edu@lists.debian.org.
</p
>
558 <title>Digitale restriksjonsmekanismer fikk meg til å slutte å kjøpe musikk
</title>
559 <link>http://people.skolelinux.org/pere/blog/Digitale_restriksjonsmekanismer_fikk_meg_til____slutte____kj__pe_musikk.html
</link>
560 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Digitale_restriksjonsmekanismer_fikk_meg_til____slutte____kj__pe_musikk.html
</guid>
561 <pubDate>Thu,
22 Jul
2010 23:
50:
00 +
0200</pubDate>
563 <p
>For mange år siden slutte jeg å kjøpe musikk-CDer. Årsaken var at
564 musikkbransjen var godt i gang med å selge platene sine med DRM som
565 gjorde at jeg ikke fikk spilt av musikken jeg kjøpte på utstyret jeg
566 hadde tilgjengelig, dvs. min datamaskin. Det var umulig å se på en
567 plate om den var ødelagt eller ikke, og jeg hadde jo allerede en
568 anseelig samling med plater, så jeg bestemme meg for å slutte å gi
569 penger til en bransje som åpenbart ikke respekterte meg.
</p
>
571 <p
>Jeg har mange titalls dager med musikk på CD i dag. Det meste er
572 lagt i et stort arkiv som kan spilles av fra husets datamaskiner (har
573 ikke rukket rippe alt). Jeg ser dermed ikke behovet for å skaffe mer
574 musikk. De fleste av mine favoritter er i hus, og jeg er dermed godt
577 <p
>Hvis musikkbransjen ønsker mine penger, så må de demonstrere at de
578 setter pris på meg som kunde, og ikke skremme meg bort med DRM og
579 antydninger om at kundene er kriminelle.
</p
>
581 <p
>Filmbransjen er like ille, men mens musikk gjerne varer lenge, er
582 filmer mer ferskvare. Har dermed ikke helt sluttet å kjøpe filmer, men
583 holder meg til DVD-filmer som kan spilles av på mine Linuxbokser.
584 Kommer neppe til å ta i bruk Blueray, og ei heller de nye DRM-greiene
585 «Ultraviolet» som be annonsert her om dagen.
</p
>
590 <title>OpenStreetmap one step closer to having routing on its front page
</title>
591 <link>http://people.skolelinux.org/pere/blog/OpenStreetmap_one_step_closer_to_having_routing_on_its_front_page.html
</link>
592 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/OpenStreetmap_one_step_closer_to_having_routing_on_its_front_page.html
</guid>
593 <pubDate>Sun,
18 Jul
2010 16:
45:
00 +
0200</pubDate>
596 <a href=
"http://feedproxy.google.com/~r/Opengeodata/~
3/wUTCzDZk3lc/project-of-the-week-which-way-home
">todays
597 opengeodata blog entry
</a
>, I just discovered that the
598 OpenStreetmap.org site have gotten
599 <a href=
"http://nroets.dev.openstreetmap.org/demo/index.html?layers=B000FTFTT
">support
600 for calculating routes
</a
>. The support is still experimental and
601 only available from the development server, until more experience is
602 gathered on the user interface and any scalability issues.
</p
>
604 <p
>Earlier, the routing I knew about using the OpenStreetmap.org data
605 was provided by
<a href=
"http://maps.cloudmade.com/
">Cloudmade
</a
>,
606 but having it on the main page is required to make everyone aware of
607 the issue. I
've had people reject Openstreetmap.org as a viable
608 alternative for them because the front page lacked routing support,
609 and I hope their needs will be catered for when routing show up on the
610 www.openstreetmap.org front page.
</p
>
615 <title>What are they searching for - PowerDNS and ISC DHCP in LDAP
</title>
616 <link>http://people.skolelinux.org/pere/blog/What_are_they_searching_for___PowerDNS_and_ISC_DHCP_in_LDAP.html
</link>
617 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/What_are_they_searching_for___PowerDNS_and_ISC_DHCP_in_LDAP.html
</guid>
618 <pubDate>Sat,
17 Jul
2010 21:
00:
00 +
0200</pubDate>
621 <a href=
"http://people.skolelinux.org/pere/blog/Time_for_new__LDAP_schemas_replacing_RFC_2307_.html
">followup
</a
>
623 <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
">previous
625 <a href=
"http://people.skolelinux.org/pere/blog/Combining_PowerDNS_and_ISC_DHCP_LDAP_objects.html
">merging
626 all
</a
> the computer related LDAP objects in Debian Edu.
</p
>
628 <p
>As a step to try to see if it possible to merge the DNS and DHCP
629 LDAP objects, I have had a look at how the packages pdns-backend-ldap
630 and dhcp3-server-ldap in Debian use the LDAP server. The two
631 implementations are quite different in how they use LDAP.
</p
>
633 To get this information, I started slapd with debugging enabled and
634 dumped the debug output to a file to get the LDAP searches performed
635 on a Debian Edu main-server. Here is a summary.
637 <p
><strong
>powerdns
</strong
></p
>
639 <a href=
"http://www.linuxnetworks.de/doc/index.php/PowerDNS_LDAP_Backend
">Clues
640 on how to
</a
> set up PowerDNS to use a LDAP backend is available on
643 <p
>PowerDNS have two modes of operation using LDAP as its backend.
644 One
"strict
" mode where the forward and reverse DNS lookups are done
645 using the same LDAP objects, and a
"tree
" mode where the forward and
646 reverse entries are in two different subtrees in LDAP with a structure
647 based on the DNS names, as in tjener.intern and
648 2.2.0.10.in-addr.arpa.
</p
>
650 <p
>In tree mode, the server is set up to use a LDAP subtree as its
651 base, and uses a
"base
" scoped search for the DNS name by adding
652 "dc=tjener,dc=intern,
" to the base with a filter for
653 "(associateddomain=tjener.intern)
" for the forward entry and
654 "dc=
2,dc=
2,dc=
0,dc=
10,dc=in-addr,dc=arpa,
" with a filter for
655 "(associateddomain=
2.2.0.10.in-addr.arpa)
" for the reverse entry. For
656 forward entries, it is looking for attributes named dnsttl, arecord,
657 nsrecord, cnamerecord, soarecord, ptrrecord, hinforecord, mxrecord,
658 txtrecord, rprecord, afsdbrecord, keyrecord, aaaarecord, locrecord,
659 srvrecord, naptrrecord, kxrecord, certrecord, dsrecord, sshfprecord,
660 ipseckeyrecord, rrsigrecord, nsecrecord, dnskeyrecord, dhcidrecord,
661 spfrecord and modifytimestamp. For reverse entries it is looking for
662 the attributes dnsttl, arecord, nsrecord, cnamerecord, soarecord,
663 ptrrecord, hinforecord, mxrecord, txtrecord, rprecord, aaaarecord,
664 locrecord, srvrecord, naptrrecord and modifytimestamp. The equivalent
665 ldapsearch commands could look like this:
</p
>
667 <blockquote
><pre
>
669 -b dc=tjener,dc=intern,ou=hosts,dc=skole,dc=skolelinux,dc=no \
670 -s base -x
'(associateddomain=tjener.intern)
' dNSTTL aRecord nSRecord \
671 cNAMERecord sOARecord pTRRecord hInfoRecord mXRecord tXTRecord \
672 rPRecord aFSDBRecord KeyRecord aAAARecord lOCRecord sRVRecord \
673 nAPTRRecord kXRecord certRecord dSRecord sSHFPRecord iPSecKeyRecord \
674 rRSIGRecord nSECRecord dNSKeyRecord dHCIDRecord sPFRecord modifyTimestamp
677 -b dc=
2,dc=
2,dc=
0,dc=
10,dc=in-addr,dc=arpa,ou=hosts,dc=skole,dc=skolelinux,dc=no \
678 -s base -x
'(associateddomain=
2.2.0.10.in-addr.arpa)
'
679 dnsttl, arecord, nsrecord, cnamerecord soarecord ptrrecord \
680 hinforecord mxrecord txtrecord rprecord aaaarecord locrecord \
681 srvrecord naptrrecord modifytimestamp
682 </pre
></blockquote
>
684 <p
>In Debian Edu/Lenny, the PowerDNS tree mode is used with
685 ou=hosts,dc=skole,dc=skolelinux,dc=no as the base, and these are two
686 example LDAP objects used there. In addition to these objects, the
687 parent objects all th way up to ou=hosts,dc=skole,dc=skolelinux,dc=no
688 also exist.
</p
>
690 <blockquote
><pre
>
691 dn: dc=tjener,dc=intern,ou=hosts,dc=skole,dc=skolelinux,dc=no
693 objectclass: dnsdomain
694 objectclass: domainrelatedobject
697 associateddomain: tjener.intern
699 dn: dc=
2,dc=
2,dc=
0,dc=
10,dc=in-addr,dc=arpa,ou=hosts,dc=skole,dc=skolelinux,dc=no
701 objectclass: dnsdomain2
702 objectclass: domainrelatedobject
704 ptrrecord: tjener.intern
705 associateddomain:
2.2.0.10.in-addr.arpa
706 </pre
></blockquote
>
708 <p
>In strict mode, the server behaves differently. When looking for
709 forward DNS entries, it is doing a
"subtree
" scoped search with the
710 same base as in the tree mode for a object with filter
711 "(associateddomain=tjener.intern)
" and requests the attributes dnsttl,
712 arecord, nsrecord, cnamerecord, soarecord, ptrrecord, hinforecord,
713 mxrecord, txtrecord, rprecord, aaaarecord, locrecord, srvrecord,
714 naptrrecord and modifytimestamp. For reverse entires it also do a
715 subtree scoped search but this time the filter is
"(arecord=
10.0.2.2)
"
716 and the requested attributes are associateddomain, dnsttl and
717 modifytimestamp. In short, in strict mode the objects with ptrrecord
718 go away, and the arecord attribute in the forward object is used
721 <p
>The forward and reverse searches can be simulated using ldapsearch
724 <blockquote
><pre
>
725 ldapsearch -h ldap -b ou=hosts,dc=skole,dc=skolelinux,dc=no -s sub -x \
726 '(associateddomain=tjener.intern)
' dNSTTL aRecord nSRecord \
727 cNAMERecord sOARecord pTRRecord hInfoRecord mXRecord tXTRecord \
728 rPRecord aFSDBRecord KeyRecord aAAARecord lOCRecord sRVRecord \
729 nAPTRRecord kXRecord certRecord dSRecord sSHFPRecord iPSecKeyRecord \
730 rRSIGRecord nSECRecord dNSKeyRecord dHCIDRecord sPFRecord modifyTimestamp
732 ldapsearch -h ldap -b ou=hosts,dc=skole,dc=skolelinux,dc=no -s sub -x \
733 '(arecord=
10.0.2.2)
' associateddomain dnsttl modifytimestamp
734 </pre
></blockquote
>
736 <p
>In addition to the forward and reverse searches , there is also a
737 search for SOA records, which behave similar to the forward and
738 reverse lookups.
</p
>
740 <p
>A thing to note with the PowerDNS behaviour is that it do not
741 specify any objectclass names, and instead look for the attributes it
742 need to generate a DNS reply. This make it able to work with any
743 objectclass that provide the needed attributes.
</p
>
745 <p
>The attributes are normally provided in the cosine (RFC
1274) and
746 dnsdomain2 schemas. The latter is used for reverse entries like
747 ptrrecord and recent DNS additions like aaaarecord and srvrecord.
</p
>
749 <p
>In Debian Edu, we have created DNS objects using the object classes
750 dcobject (for dc), dnsdomain or dnsdomain2 (structural, for the DNS
751 attributes) and domainrelatedobject (for associatedDomain). The use
752 of structural object classes make it impossible to combine these
753 classes with the object classes used by DHCP.
</p
>
755 <p
>There are other schemas that could be used too, for example the
756 dnszone structural object class used by Gosa and bind-sdb for the DNS
757 attributes combined with the domainrelatedobject object class, but in
758 this case some unused attributes would have to be included as well
759 (zonename and relativedomainname).
</p
>
761 <p
>My proposal for Debian Edu would be to switch PowerDNS to strict
762 mode and not use any of the existing objectclasses (dnsdomain,
763 dnsdomain2 and dnszone) when one want to combine the DNS information
764 with DHCP information, and instead create a auxiliary object class
765 defined something like this (using the attributes defined for
766 dnsdomain and dnsdomain2 or dnszone):
</p
>
768 <blockquote
><pre
>
769 objectclass ( some-oid NAME
'dnsDomainAux
'
772 MAY ( ARecord $ MDRecord $ MXRecord $ NSRecord $ SOARecord $ CNAMERecord $
773 DNSTTL $ DNSClass $ PTRRecord $ HINFORecord $ MINFORecord $
774 TXTRecord $ SIGRecord $ KEYRecord $ AAAARecord $ LOCRecord $
775 NXTRecord $ SRVRecord $ NAPTRRecord $ KXRecord $ CERTRecord $
776 A6Record $ DNAMERecord
778 </pre
></blockquote
>
780 <p
>This will allow any object to become a DNS entry when combined with
781 the domainrelatedobject object class, and allow any entity to include
782 all the attributes PowerDNS wants. I
've sent an email to the PowerDNS
783 developers asking for their view on this schema and if they are
784 interested in providing such schema with PowerDNS, and I hope my
785 message will be accepted into their mailing list soon.
</p
>
787 <p
><strong
>ISC dhcp
</strong
></p
>
789 <p
>The DHCP server searches for specific objectclass and requests all
790 the object attributes, and then uses the attributes it want. This
791 make it harder to figure out exactly what attributes are used, but
792 thanks to the working example in Debian Edu I can at least get an idea
793 what is needed without having to read the source code.
</p
>
795 <p
>In the DHCP server configuration, the LDAP base to use and the
796 search filter to use to locate the correct dhcpServer entity is
797 stored. These are the relevant entries from
798 /etc/dhcp3/dhcpd.conf:
</p
>
800 <blockquote
><pre
>
801 ldap-base-dn
"dc=skole,dc=skolelinux,dc=no
";
802 ldap-dhcp-server-cn
"dhcp
";
803 </pre
></blockquote
>
805 <p
>The DHCP server uses this information to nest all the DHCP
806 configuration it need. The cn
"dhcp
" is located using the given LDAP
807 base and the filter
"(
&(objectClass=dhcpServer)(cn=dhcp))
". The
808 search result is this entry:
</p
>
810 <blockquote
><pre
>
811 dn: cn=dhcp,dc=skole,dc=skolelinux,dc=no
814 objectClass: dhcpServer
815 dhcpServiceDN: cn=DHCP Config,dc=skole,dc=skolelinux,dc=no
816 </pre
></blockquote
>
818 <p
>The content of the dhcpServiceDN attribute is next used to locate the
819 subtree with DHCP configuration. The DHCP configuration subtree base
820 is located using a base scope search with base
"cn=DHCP
821 Config,dc=skole,dc=skolelinux,dc=no
" and filter
822 "(
&(objectClass=dhcpService)(|(dhcpPrimaryDN=cn=dhcp,dc=skole,dc=skolelinux,dc=no)(dhcpSecondaryDN=cn=dhcp,dc=skole,dc=skolelinux,dc=no)))
".
823 The search result is this entry:
</p
>
825 <blockquote
><pre
>
826 dn: cn=DHCP Config,dc=skole,dc=skolelinux,dc=no
829 objectClass: dhcpService
830 objectClass: dhcpOptions
831 dhcpPrimaryDN: cn=dhcp, dc=skole,dc=skolelinux,dc=no
832 dhcpStatements: ddns-update-style none
833 dhcpStatements: authoritative
834 dhcpOption: smtp-server code
69 = array of ip-address
835 dhcpOption: www-server code
72 = array of ip-address
836 dhcpOption: wpad-url code
252 = text
837 </pre
></blockquote
>
839 <p
>Next, the entire subtree is processed, one level at the time. When
840 all the DHCP configuration is loaded, it is ready to receive requests.
841 The subtree in Debian Edu contain objects with object classes
842 top/dhcpService/dhcpOptions, top/dhcpSharedNetwork/dhcpOptions,
843 top/dhcpSubnet, top/dhcpGroup and top/dhcpHost. These provide options
844 and information about netmasks, dynamic range etc. Leaving out the
845 details here because it is not relevant for the focus of my
846 investigation, which is to see if it is possible to merge dns and dhcp
847 related computer objects.
</p
>
849 <p
>When a DHCP request come in, LDAP is searched for the MAC address
850 of the client (
00:
00:
00:
00:
00:
00 in this example), using a subtree
851 scoped search with
"cn=DHCP Config,dc=skole,dc=skolelinux,dc=no
" as
852 the base and
"(
&(objectClass=dhcpHost)(dhcpHWAddress=ethernet
853 00:
00:
00:
00:
00:
00))
" as the filter. This is what a host object look
856 <blockquote
><pre
>
857 dn: cn=hostname,cn=group1,cn=THINCLIENTS,cn=DHCP Config,dc=skole,dc=skolelinux,dc=no
860 objectClass: dhcpHost
861 dhcpHWAddress: ethernet
00:
00:
00:
00:
00:
00
862 dhcpStatements: fixed-address hostname
863 </pre
></blockquote
>
865 <p
>There is less flexiblity in the way LDAP searches are done here.
866 The object classes need to have fixed names, and the configuration
867 need to be stored in a fairly specific LDAP structure. On the
868 positive side, the invidiual dhcpHost entires can be anywhere without
869 the DN pointed to by the dhcpServer entries. The latter should make
870 it possible to group all host entries in a subtree next to the
871 configuration entries, and this subtree can also be shared with the
872 DNS server if the schema proposed above is combined with the dhcpHost
873 structural object class.
875 <p
><strong
>Conclusion
</strong
></p
>
877 <p
>The PowerDNS implementation seem to be very flexible when it come
878 to which LDAP schemas to use. While its
"tree
" mode is rigid when it
879 come to the the LDAP structure, the
"strict
" mode is very flexible,
880 allowing DNS objects to be stored anywhere under the base cn specified
881 in the configuration.
</p
>
883 <p
>The DHCP implementation on the other hand is very inflexible, both
884 regarding which LDAP schemas to use and which LDAP structure to use.
885 I guess one could implement ones own schema, as long as the
886 objectclasses and attributes have the names used, but this do not
887 really help when the DHCP subtree need to have a fairly fixed
890 <p
>Based on the observed behaviour, I suspect a LDAP structure like
891 this might work for Debian Edu:
</p
>
893 <blockquote
><pre
>
895 cn=machine-info (dhcpService) - dhcpServiceDN points here
897 cn=dhcp-internal (dhcpSharedNetwork/dhcpOptions)
898 cn=
10.0.2.0 (dhcpSubnet)
899 cn=group1 (dhcpGroup/dhcpOptions)
900 cn=dhcp-thinclients (dhcpSharedNetwork/dhcpOptions)
901 cn=
192.168.0.0 (dhcpSubnet)
902 cn=group1 (dhcpGroup/dhcpOptions)
903 ou=machines - PowerDNS base points here
904 cn=hostname (dhcpHost/domainrelatedobject/dnsDomainAux)
905 </pre
></blockquote
>
907 <P
>This is not tested yet. If the DHCP server require the dhcpHost
908 entries to be in the dhcpGroup subtrees, the entries can be stored
909 there instead of a common machines subtree, and the PowerDNS base
910 would have to be moved one level up to the machine-info subtree.
</p
>
912 <p
>The combined object under the machines subtree would look something
915 <blockquote
><pre
>
916 dn: dc=hostname,ou=machines,cn=machine-info,dc=skole,dc=skolelinux,dc=no
919 objectClass: dhcpHost
920 objectclass: domainrelatedobject
921 objectclass: dnsDomainAux
922 associateddomain: hostname.intern
924 dhcpHWAddress: ethernet
00:
00:
00:
00:
00:
00
925 dhcpStatements: fixed-address hostname.intern
926 </pre
></blockquote
>
928 </p
>One could even add the LTSP configuration associated with a given
929 machine, as long as the required attributes are available in a
930 auxiliary object class.
</p
>
935 <title>Combining PowerDNS and ISC DHCP LDAP objects
</title>
936 <link>http://people.skolelinux.org/pere/blog/Combining_PowerDNS_and_ISC_DHCP_LDAP_objects.html
</link>
937 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Combining_PowerDNS_and_ISC_DHCP_LDAP_objects.html
</guid>
938 <pubDate>Wed,
14 Jul
2010 23:
45:
00 +
0200</pubDate>
940 <p
>For a while now, I have wanted to find a way to change the DNS and
941 DHCP services in Debian Edu to use the same LDAP objects for a given
942 computer, to avoid the possibility of having a inconsistent state for
943 a computer in LDAP (as in DHCP but no DNS entry or the other way
944 around) and make it easier to add computers to LDAP.
</p
>
946 <p
>I
've looked at how powerdns and dhcpd is using LDAP, and using this
947 information finally found a solution that seem to work.
</p
>
949 <p
>The old setup required three LDAP objects for a given computer.
950 One forward DNS entry, one reverse DNS entry and one DHCP entry. If
951 we switch powerdns to use its strict LDAP method (ldap-method=strict
952 in pdns-debian-edu.conf), the forward and reverse DNS entries are
953 merged into one while making it impossible to transfer the reverse map
954 to a slave DNS server.
</p
>
956 <p
>If we also replace the object class used to get the DNS related
957 attributes to one allowing these attributes to be combined with the
958 dhcphost object class, we can merge the DNS and DHCP entries into one.
959 I
've written such object class in the dnsdomainaux.schema file (need
960 proper OIDs, but that is a minor issue), and tested the setup. It
961 seem to work.
</p
>
963 <p
>With this test setup in place, we can get away with one LDAP object
964 for both DNS and DHCP, and even the LTSP configuration I suggested in
965 an earlier email. The combined LDAP object will look something like
968 <blockquote
><pre
>
969 dn: cn=hostname,cn=group1,cn=THINCLIENTS,cn=DHCP Config,dc=skole,dc=skolelinux,dc=no
971 objectClass: dhcphost
972 objectclass: domainrelatedobject
973 objectclass: dnsdomainaux
974 associateddomain: hostname.intern
976 dhcphwaddress: ethernet
00:
00:
00:
00:
00:
00
977 dhcpstatements: fixed-address hostname
979 </pre
></blockquote
>
981 <p
>The DNS server uses the associateddomain and arecord entries, while
982 the DHCP server uses the dhcphwaddress and dhcpstatements entries
983 before asking DNS to resolve the fixed-adddress. LTSP will use
984 dhcphwaddress or associateddomain and the ldapconfig* attributes.
</p
>
986 <p
>I am not yet sure if I can get the DHCP server to look for its
987 dhcphost in a different location, to allow us to put the objects
988 outside the
"DHCP Config
" subtree, but hope to figure out a way to do
989 that. If I can
't figure out a way to do that, we can still get rid of
990 the hosts subtree and move all its content into the DHCP Config tree
991 (which probably should be renamed to be more related to the new
992 content. I suspect cn=dnsdhcp,ou=services or something like that
993 might be a good place to put it.
</p
>
995 <p
>If you want to help out with implementing this for Debian Edu,
996 please contact us on debian-edu@lists.debian.org.
</p
>