]> pere.pagekite.me Git - homepage.git/blob - blog/index.rss
Generated.
[homepage.git] / blog / index.rss
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">
3 <channel>
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" />
8
9 <item>
10 <title>No hardcoded config on Debian Edu clients</title>
11 <link>http://people.skolelinux.org/pere/blog/No_hardcoded_config_on_Debian_Edu_clients.html</link>
12 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/No_hardcoded_config_on_Debian_Edu_clients.html</guid>
13 <pubDate>Mon, 9 Aug 2010 20:15:00 +0200</pubDate>
14 <description>
15 &lt;p&gt;As reported earlier, the last few days I have looked at how Debian
16 Edu clients are configured, and tried to get rid of all hardcoded
17 configuration settings on the clients. I believe the work to be
18 mostly done, and the clients seem to work just fine with dynamically
19 generated configuration.&lt;/p&gt;
20
21 &lt;p&gt;What is the point, you might ask? The point is to allow a Debian
22 Edu desktop to integrate into an existing network infrastructure
23 without any manual configuration.&lt;/p&gt;
24
25 &lt;p&gt;This is what happens when installing a Debian Edu client here at
26 the University of Oslo using PXE. With the PXE installation, I am
27 asked for language (Norwegian Bokmål), locality (Norway) and keyboard
28 layout (no-latin1), Debian Edu profile (Roaming Workstation), if I
29 accept to reformat the hard drive (yes), if I want to submit info to
30 popcon.debian.org (no) and root password (secret). After answering
31 these questions, the installer goes ahead and does its thing, and
32 after around 50 minutes it is done. I press enter to finish the
33 installation, and the machine reboots into KDE. When the machine is
34 ready and kdm asks for login information, I enter my university
35 username and password, am told by kdm that a local home directory has
36 been created and that I must log in again, and finally log in with the
37 same username and password to the KDE 4.4 desktop. At no point during
38 this process did it ask for university specific settings, and all the
39 required configuration was dynamically detected using information
40 fetched via DHCP and DNS. The roaming workstation is now ready for
41 use.&lt;/p&gt;
42
43 &lt;p&gt;How was this done, you might wonder? First of all, here is the
44 list of things that need to be configured on the client to get it
45 working properly out of the box:&lt;/p&gt;
46
47 &lt;ul&gt;
48 &lt;li&gt;IP address/netmask and DNS server.&lt;/li&gt;
49 &lt;li&gt;Web proxy URL.&lt;/li&gt;
50 &lt;li&gt;LDAP server for NSS directory information (user, group, etc).&lt;/li&gt;
51 &lt;li&gt;Kerberos server for PAM password checking.&lt;/li&gt;
52 &lt;li&gt;SMB mount point to access the network home directory. (*)&lt;/li&gt;
53 &lt;li&gt;Central syslog server to send syslog messages to. (*)&lt;/li&gt;
54 &lt;li&gt;Sitesummary collector URL to submit info to central server. (*)&lt;/li&gt;
55 &lt;/ul&gt;
56
57 &lt;p&gt;(Hm, did I forget anything? Let me knew if I did.)&lt;/p&gt;
58
59 &lt;p&gt;The points marked (*) are not required to be able to use the
60 machine, but needed to provide central storage and allowing system
61 administrators to track their machines. Since yesterday, everything
62 but the sitesummary collector URL is dynamically discovered at boot
63 and installation time in the svn version of Debian Edu.&lt;/p&gt;
64
65 &lt;p&gt;The IP and DNS setup is fetched during boot using DHCP as usual.
66 When a DHCP update arrives, the proxy setup is updated by looking for
67 http://wpat/wpad.dat and using the content of this WPAD file to
68 configure the http and ftp proxy in /etc/environment and
69 /etc/apt/apt.conf. I decided to update the proxy setup using a DHCP
70 hook to ensure that the client stops using the Debian Edu proxy when
71 it is moved outside the Debian Edu network, and instead uses any local
72 proxy present on the new network when it moves around.&lt;/p&gt;
73
74 &lt;p&gt;The DNS names of the LDAP, Kerberos and syslog server and related
75 configuration are generated using DNS information at boot. First the
76 installer looks for a host named ldap in the current DNS domain. If
77 not found, it looks for _ldap._tcp SRV records in DNS instead. If an
78 LDAP server is found, its root DSE entry is requested and the
79 attributes namingContexts and defaultNamingContext are used to
80 determine which LDAP base to use for NSS. If there are several
81 namingContexts attibutes and the defaultNamingContext is present, that
82 LDAP subtree is used as the base. If defaultNamingContext is missing,
83 the subtrees listed as namingContexts are searched in sequence for any
84 object with class posixAccount or posixGroup, and the first one with
85 such an object is used as the LDAP base. For Kerberos, a similar
86 search is done by first looking for a host named kerberos, and then
87 for the _kerberos._tcp SRV record. I&#39;ve been unable to find a way to
88 look up the Kerberos realm, so for this the upper case string of the
89 current DNS domain is used.&lt;/p&gt;
90
91 &lt;p&gt;For the syslog server, the hosts syslog and loghost are searched
92 for, and the _syslog._udp SRV record is consulted if no such host is
93 found. This algorithm works for both Debian Edu and the University of
94 Oslo. A similar strategy would work for locating the sitesummary
95 server, but have not been implemented yet. I decided to fetch and
96 save these settings during installation, to make sure moving to a
97 different network does not change the set of users being allowed to
98 log in nor the passwords required to log in. Usernames and passwords
99 will be cached by sssd when the user logs in on the Debian Edu
100 network, and will not change as the laptop move around. For a
101 non-roaming machine, there is no caching, but given that it is
102 supposed to stay in place it should not matter much. Perhaps we
103 should switch those to use sssd too?&lt;/p&gt;
104
105 &lt;p&gt;The user&#39;s SMB mount point for the network home directory is
106 located when the user logs in for the first time. The LDAP server is
107 consulted to look for the user&#39;s LDAP object and the sambaHomePath
108 attribute is used if found. If it isn&#39;t found, the home directory
109 path fetched from NSS is used instead. Assuming the path is of the
110 form /site/server/directory/username, the second part is looked up in
111 DNS and used to generate a SMB URL of the form
112 smb://server.domain/username. This algorithm works for both Debian
113 edu and the University of Oslo. Perhaps there are better attributes
114 to use or a better algorithm that works for more sites, but this will
115 do for now. :)&lt;/p&gt;
116
117 &lt;p&gt;This work should make it easier to integrate the Debian Edu clients
118 into any LDAP/Kerberos infrastructure, and make the current setup even
119 more flexible than before. I suspect it will also work for thin
120 client servers, allowing one to easily set up LTSP and hook it into a
121 existing network infrastructure, but I have not had time to test this
122 yet.&lt;/p&gt;
123
124 &lt;p&gt;If you want to help out with implementing these things for Debian
125 Edu, please contact us on debian-edu@lists.debian.org.&lt;/p&gt;
126
127 &lt;p&gt;Update 2010-08-09: Simon Farnsworth gave me a heads-up on how to
128 detect Kerberos realm from DNS, by looking for _kerberos TXT entries
129 before falling back to the upper case DNS domain name. Will have to
130 implement it for Debian Edu. :)&lt;/p&gt;
131 </description>
132 </item>
133
134 <item>
135 <title>Testing if a file system can be used for home directories...</title>
136 <link>http://people.skolelinux.org/pere/blog/Testing_if_a_file_system_can_be_used_for_home_directories___.html</link>
137 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Testing_if_a_file_system_can_be_used_for_home_directories___.html</guid>
138 <pubDate>Sun, 8 Aug 2010 21:20:00 +0200</pubDate>
139 <description>
140 &lt;p&gt;A few years ago, I was involved in a project planning to use
141 Windows file servers as home directory servers for Debian
142 Edu/Skolelinux machines. This was thought to be no problem, as the
143 access would be through the SMB network file system protocol, and we
144 knew other sites used SMB with unix and samba as the file server to
145 mount home directories without any problems. But, after months of
146 struggling, we had to conclude that our goal was impossible.&lt;/p&gt;
147
148 &lt;p&gt;The reason is simply that while SMB can be used for home
149 directories when the file server is Samba running on Unix, this only
150 work because of Samba have some extensions and the fact that the
151 underlying file system is a unix file system. When using a Windows
152 file server, the underlying file system do not have POSIX semantics,
153 and several programs will fail if the users home directory where they
154 want to store their configuration lack POSIX semantics.&lt;/p&gt;
155
156 &lt;p&gt;As part of this work, I wrote a small C program I want to share
157 with you all, to replicate a few of the problematic applications (like
158 OpenOffice.org and GCompris) and see if the file system was working as
159 it should. If you find yourself in spooky file system land, it might
160 help you find your way out again. This is the fs-test.c source:&lt;/p&gt;
161
162 &lt;pre&gt;
163 /*
164 * Some tests to check the file system sematics. Used to verify that
165 * CIFS from a windows server do not work properly as a linux home
166 * directory.
167 * License: GPL v2 or later
168 *
169 * needs libsqlite3-dev and build-essential installed
170 * compile with: gcc -Wall -lsqlite3 -DTEST_SQLITE fs-test.c -o fs-test
171 */
172
173 #define _FILE_OFFSET_BITS 64
174 #define _LARGEFILE_SOURCE 1
175 #define _LARGEFILE64_SOURCE 1
176
177 #define _GNU_SOURCE /* for asprintf() */
178
179 #include &amp;lt;errno.h&gt;
180 #include &amp;lt;fcntl.h&gt;
181 #include &amp;lt;stdio.h&gt;
182 #include &amp;lt;string.h&gt;
183 #include &amp;lt;stdlib.h&gt;
184 #include &amp;lt;sys/file.h&gt;
185 #include &amp;lt;sys/stat.h&gt;
186 #include &amp;lt;sys/types.h&gt;
187 #include &amp;lt;unistd.h&gt;
188
189 #ifdef TEST_SQLITE
190 /*
191 * Test sqlite open, as done by gcompris require the libsqlite3-dev
192 * package and linking with -lsqlite3. A more low level test is
193 * below.
194 * See also &amp;lt;URL: http://www.sqlite.org./faq.html#q5 &gt;.
195 */
196 #include &amp;lt;sqlite3.h&gt;
197 #define CREATE_TABLE_USERS \
198 &quot;CREATE TABLE users (user_id INT UNIQUE, login TEXT, lastname TEXT, firstname TEXT, birthdate TEXT, class_id INT ); &quot;
199 int test_sqlite_open(void) {
200 char *zErrMsg;
201 char *name = &quot;testsqlite.db&quot;;
202 sqlite3 *db=NULL;
203 unlink(name);
204 int rc = sqlite3_open(name, &amp;db);
205 if( rc ){
206 printf(&quot;error: sqlite open of %s failed: %s\n&quot;, name, sqlite3_errmsg(db));
207 sqlite3_close(db);
208 return -1;
209 }
210
211 /* create tables */
212 rc = sqlite3_exec(db,CREATE_TABLE_USERS, NULL, 0, &amp;zErrMsg);
213 if( rc != SQLITE_OK ){
214 printf(&quot;error: sqlite table create failed: %s\n&quot;, zErrMsg);
215 sqlite3_close(db);
216 return -1;
217 }
218 printf(&quot;info: sqlite worked\n&quot;);
219 sqlite3_close(db);
220 return 0;
221 }
222 #endif /* TEST_SQLITE */
223
224 /*
225 * Demonstrate locking issue found in gcompris using sqlite3. This
226 * work with ext3, but not with cifs server on Windows 2003. This is
227 * done in the sqlite3 library.
228 * See also
229 * &amp;lt;URL:http://www.cygwin.com/ml/cygwin/2001-08/msg00854.html&gt; and the
230 * POSIX specification
231 * &amp;lt;URL:http://www.opengroup.org/onlinepubs/009695399/functions/fcntl.html&gt;.
232 */
233 int test_gcompris_locking(void) {
234 struct flock fl;
235 char *name = &quot;testsqlite.db&quot;;
236 unlink(name);
237 int fd = open(name, O_RDWR|O_CREAT|O_LARGEFILE, 0644);
238 printf(&quot;info: testing fcntl locking\n&quot;);
239
240 fl.l_whence = SEEK_SET;
241 fl.l_pid = getpid();
242 printf(&quot; Read-locking 1 byte from 1073741824&quot;);
243 fl.l_start = 1073741824;
244 fl.l_len = 1;
245 fl.l_type = F_RDLCK;
246 if (0 != fcntl(fd, F_SETLK, &amp;fl) ) printf(&quot; - error!\n&quot;); else printf(&quot;\n&quot;);
247
248 printf(&quot; Read-locking 510 byte from 1073741826&quot;);
249 fl.l_start = 1073741826;
250 fl.l_len = 510;
251 fl.l_type = F_RDLCK;
252 if (0 != fcntl(fd, F_SETLK, &amp;fl) ) printf(&quot; - error!\n&quot;); else printf(&quot;\n&quot;);
253
254 printf(&quot; Unlocking 1 byte from 1073741824&quot;);
255 fl.l_start = 1073741824;
256 fl.l_len = 1;
257 fl.l_type = F_UNLCK;
258 if (0 != fcntl(fd, F_SETLK, &amp;fl) ) printf(&quot; - error!\n&quot;); else printf(&quot;\n&quot;);
259
260 printf(&quot; Write-locking 1 byte from 1073741824&quot;);
261 fl.l_start = 1073741824;
262 fl.l_len = 1;
263 fl.l_type = F_WRLCK;
264 if (0 != fcntl(fd, F_SETLK, &amp;fl) ) printf(&quot; - error!\n&quot;); else printf(&quot;\n&quot;);
265
266 printf(&quot; Write-locking 510 byte from 1073741826&quot;);
267 fl.l_start = 1073741826;
268 fl.l_len = 510;
269 if (0 != fcntl(fd, F_SETLK, &amp;fl) ) printf(&quot; - error!\n&quot;); else printf(&quot;\n&quot;);
270
271 printf(&quot; Unlocking 2 byte from 1073741824&quot;);
272 fl.l_start = 1073741824;
273 fl.l_len = 2;
274 fl.l_type = F_UNLCK;
275 if (0 != fcntl(fd, F_SETLK, &amp;fl) ) printf(&quot; - error!\n&quot;); else printf(&quot;\n&quot;);
276
277 close(fd);
278 return 0;
279 }
280
281 /*
282 * Test if permissions of freshly created directories allow entries
283 * below them. This was a problem with OpenOffice.org and gcompris.
284 * Mounting with option &#39;sync&#39; seem to solve this problem while
285 * slowing down file operations.
286 */
287 int test_subdirectory_creation(void) {
288 #define LEVELS 5
289 char *path = strdup(&quot;test&quot;);
290 char *dirs[LEVELS];
291 int level;
292 printf(&quot;info: testing subdirectory creation\n&quot;);
293 for (level = 0; level &amp;lt; LEVELS; level++) {
294 char *newpath = NULL;
295 if (-1 == mkdir(path, 0777)) {
296 printf(&quot; error: Unable to create directory &#39;%s&#39;: %s\n&quot;,
297 path, strerror(errno));
298 break;
299 }
300 asprintf(&amp;newpath, &quot;%s/%s&quot;, path, &quot;test&quot;);
301 free(path);
302 path = newpath;
303 }
304 return 0;
305 }
306
307 /*
308 * Test if symlinks can be created. This was a problem detected with
309 * KDE.
310 */
311 int test_symlinks(void) {
312 printf(&quot;info: testing symlink creation\n&quot;);
313 unlink(&quot;symlink&quot;);
314 if (-1 == symlink(&quot;file&quot;, &quot;symlink&quot;))
315 printf(&quot; error: Unable to create symlink\n&quot;);
316 return 0;
317 }
318
319 int main(int argc, char **argv) {
320 printf(&quot;Testing POSIX/Unix sematics on file system\n&quot;);
321 test_symlinks();
322 test_subdirectory_creation();
323 #ifdef TEST_SQLITE
324 test_sqlite_open();
325 #endif /* TEST_SQLITE */
326 test_gcompris_locking();
327 return 0;
328 }
329 &lt;/pre&gt;
330
331 &lt;p&gt;When everything is working, it should print something like
332 this:&lt;/p&gt;
333
334 &lt;pre&gt;
335 Testing POSIX/Unix sematics on file system
336 info: testing symlink creation
337 info: testing subdirectory creation
338 info: sqlite worked
339 info: testing fcntl locking
340 Read-locking 1 byte from 1073741824
341 Read-locking 510 byte from 1073741826
342 Unlocking 1 byte from 1073741824
343 Write-locking 1 byte from 1073741824
344 Write-locking 510 byte from 1073741826
345 Unlocking 2 byte from 1073741824
346 &lt;/pre&gt;
347
348 &lt;p&gt;I do not remember the exact details of the problems we saw, but one
349 of them was with locking, where if I remember correctly, POSIX allow a
350 read-only lock to be upgraded to a read-write lock without unlocking
351 the read-only lock (while Windows do not). Another was a bug in the
352 CIFS/SMB client implementation in the Linux kernel where directory
353 meta information would be wrong for a fraction of a second, making
354 OpenOffice.org fail to create its deep directory tree because it was
355 not allowed to create files in its freshly created directory.&lt;/p&gt;
356
357 &lt;p&gt;Anyway, here is a nice tool for your tool box, might you never need
358 it. :)&lt;/p&gt;
359 </description>
360 </item>
361
362 <item>
363 <title>Autodetecting Client setup for roaming workstations in Debian Edu</title>
364 <link>http://people.skolelinux.org/pere/blog/Autodetecting_Client_setup_for_roaming_workstations_in_Debian_Edu.html</link>
365 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Autodetecting_Client_setup_for_roaming_workstations_in_Debian_Edu.html</guid>
366 <pubDate>Sat, 7 Aug 2010 14:45:00 +0200</pubDate>
367 <description>
368 &lt;p&gt;A few days ago, I
369 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Debian_Edu_roaming_workstation___at_the_university_of_Oslo.html&quot;&gt;tried
370 to install&lt;/a&gt; a Roaming workation profile from Debian Edu/Squeeze
371 while on the university network here at the University of Oslo, and
372 noticed how much had to change to get it operational using the
373 university infrastructure. It was fairly easy, but it occured to me
374 that Debian Edu would improve a lot if I could get the client to
375 connect without any changes at all, and thus let the client configure
376 itself during installation and first boot to use the infrastructure
377 around it. Now I am a huge step further along that road.&lt;/p&gt;
378
379 &lt;p&gt;With our current squeeze-test packages, I can select the roaming
380 workstation profile and get a working laptop connecting to the
381 university LDAP server for user and group and our active directory
382 servers for Kerberos authentication. All this without any
383 configuration at all during installation. My users home directory got
384 a bookmark in the KDE menu to mount it via SMB, with the correct URL.
385 In short, openldap and sssd is correctly configured. In addition to
386 this, the client look for http://wpad/wpad.dat to configure a web
387 proxy, and when it fail to find it no proxy settings are stored in
388 /etc/environment and /etc/apt/apt.conf. Iceweasel and KDE is
389 configured to look for the same wpad configuration and also do not use
390 a proxy when at the university network. If the machine is moved to a
391 network with such wpad setup, it would automatically use it when DHCP
392 gave it a IP address.&lt;/p&gt;
393
394 &lt;p&gt;The LDAP server is located using DNS, by first looking for the DNS
395 entry ldap.$domain. If this do not exist, it look for the
396 _ldap._tcp.$domain SRV records and use the first one as the LDAP
397 server. Next, it connects to the LDAP server and search all
398 namingContexts entries for posixAccount or posixGroup objects, and
399 pick the first one as the LDAP base. For Kerberos, a similar
400 algorithm is used to locate the LDAP server, and the realm is the
401 uppercase version of $domain.&lt;/p&gt;
402
403 &lt;p&gt;So, what is not working, you might ask. SMB mounting my home
404 directory do not work. No idea why, but suspected the incorrect
405 Kerberos settings in /etc/krb5.conf and /etc/samba/smb.conf might be
406 the cause. These are not properly configured during installation, and
407 had to be hand-edited to get the correct Kerberos realm and server,
408 but SMB mounting still do not work. :(&lt;/p&gt;
409
410 &lt;p&gt;With this automatic configuration in place, I expect a Debian Edu
411 roaming profile installation would be able to automatically detect and
412 connect to any site using LDAP and Kerberos for NSS directory and PAM
413 authentication. It should also work out of the box in a Active
414 Directory environment providing posixAccount and posixGroup objects
415 with UID and GID values.&lt;/p&gt;
416
417 &lt;p&gt;If you want to help out with implementing these things for Debian
418 Edu, please contact us on debian-edu@lists.debian.org.&lt;/p&gt;
419 </description>
420 </item>
421
422 <item>
423 <title>Debian Edu roaming workstation - at the university of Oslo</title>
424 <link>http://people.skolelinux.org/pere/blog/Debian_Edu_roaming_workstation___at_the_university_of_Oslo.html</link>
425 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Debian_Edu_roaming_workstation___at_the_university_of_Oslo.html</guid>
426 <pubDate>Tue, 3 Aug 2010 23:30:00 +0200</pubDate>
427 <description>
428 &lt;p&gt;The new roaming workstation profile in Debian Edu/Squeeze is fairly
429 similar to the laptop setup am I working on using Ubuntu for the
430 University of Oslo, and just for the heck of it, I tested today how
431 hard it would be to integrate that profile into the university
432 infrastructure. In this case, it is the university LDAP server,
433 Active Directory Kerberos server and SMB mounting from the Netapp file
434 servers.&lt;/p&gt;
435
436 &lt;p&gt;I was pleasantly surprised that the only three files needed to be
437 changed (/etc/sssd/sssd.conf, /etc/ldap.conf and
438 /etc/mklocaluser.d/20-debian-edu-config) and one file had to be added
439 (/usr/share/perl5/Debian/Edu_Local.pm), to get the client working.
440 Most of the changes were to get the client to use the university LDAP
441 for NSS and Kerberos server for PAM, but one was to change a hard
442 coded DNS domain name in the mklocaluser hook from .intern to
443 .uio.no.&lt;/p&gt;
444
445 &lt;p&gt;This testing was so encouraging, that I went ahead and adjusted the
446 Debian Edu scripts and setup in subversion to centralise the roaming
447 workstation setup a bit more and avoid the hardcoded DNS domain name,
448 so that when I test this tomorrow, I expect to get away with modifying
449 only /etc/sssd/sssd.conf and /etc/ldap.conf to get it to use the
450 university servers.&lt;/p&gt;
451
452 &lt;p&gt;My goal is to get the clients to have no hardcoded settings and
453 fetch all their initial setup during installation and first boot, to
454 allow them to be inserted also into environments where the default
455 setup in Debian Edu has been changed or as with the university, where
456 the environment is different but provides the protocols Debian Edu
457 uses.&lt;/p&gt;
458 </description>
459 </item>
460
461 <item>
462 <title>Circular package dependencies harms apt recovery</title>
463 <link>http://people.skolelinux.org/pere/blog/Circular_package_dependencies_harms_apt_recovery.html</link>
464 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Circular_package_dependencies_harms_apt_recovery.html</guid>
465 <pubDate>Tue, 27 Jul 2010 23:50:00 +0200</pubDate>
466 <description>
467 &lt;p&gt;I discovered this while doing
468 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Automatic_upgrade_testing_from_Lenny_to_Squeeze.html&quot;&gt;automated
469 testing of upgrades from Debian Lenny to Squeeze&lt;/a&gt;. A few packages
470 in Debian still got circular dependencies, and it is often claimed
471 that apt and aptitude should be able to handle this just fine, but
472 some times these dependency loops causes apt to fail.&lt;/p&gt;
473
474 &lt;p&gt;An example is from todays
475 &lt;a href=&quot;http://people.skolelinux.org/~pere/debian-upgrade-testing//test-20100727-lenny-squeeze-kde-aptitude.txt&quot;&gt;upgrade
476 of KDE using aptitude&lt;/a&gt;. In it, a bug in kdebase-workspace-data
477 causes perl-modules to fail to upgrade. The cause is simple. If a
478 package fail to unpack, then only part of packages with the circular
479 dependency might end up being unpacked when unpacking aborts, and the
480 ones already unpacked will fail to configure in the recovery phase
481 because its dependencies are unavailable.&lt;/p&gt;
482
483 &lt;p&gt;In this log, the problem manifest itself with this error:&lt;/p&gt;
484
485 &lt;blockquote&gt;&lt;pre&gt;
486 dpkg: dependency problems prevent configuration of perl-modules:
487 perl-modules depends on perl (&gt;= 5.10.1-1); however:
488 Version of perl on system is 5.10.0-19lenny2.
489 dpkg: error processing perl-modules (--configure):
490 dependency problems - leaving unconfigured
491 &lt;/pre&gt;&lt;/blockquote&gt;
492
493 &lt;p&gt;The perl/perl-modules circular dependency is already
494 &lt;a href=&quot;http://bugs.debian.org/527917&quot;&gt;reported as a bug&lt;/a&gt;, and will
495 hopefully be solved as soon as possible, but it is not the only one,
496 and each one of these loops in the dependency tree can cause similar
497 failures. Of course, they only occur when there are bugs in other
498 packages causing the unpacking to fail, but it is rather nasty when
499 the failure of one package causes the problem to become worse because
500 of dependency loops.&lt;/p&gt;
501
502 &lt;p&gt;Thanks to
503 &lt;a href=&quot;http://lists.debian.org/debian-devel/2010/06/msg00116.html&quot;&gt;the
504 tireless effort by Bill Allombert&lt;/a&gt;, the number of circular
505 dependencies
506 &lt;a href=&quot;http://debian.semistable.com/debgraph.out.html&quot;&gt;left in Debian
507 is dropping&lt;/a&gt;, and perhaps it will reach zero one day. :)&lt;/p&gt;
508
509 &lt;p&gt;Todays testing also exposed a bug in
510 &lt;a href=&quot;http://bugs.debian.org/590605&quot;&gt;update-notifier&lt;/a&gt; and
511 &lt;a href=&quot;http://bugs.debian.org/590604&quot;&gt;different behaviour&lt;/a&gt; between
512 apt-get and aptitude, the latter possibly caused by some circular
513 dependency. Reported both to BTS to try to get someone to look at
514 it.&lt;/p&gt;
515 </description>
516 </item>
517
518 <item>
519 <title>First Debian Edu test release (alpha0) based on Squeeze is released</title>
520 <link>http://people.skolelinux.org/pere/blog/First_Debian_Edu_test_release__alpha0__based_on_Squeeze_is_released.html</link>
521 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/First_Debian_Edu_test_release__alpha0__based_on_Squeeze_is_released.html</guid>
522 <pubDate>Tue, 27 Jul 2010 17:45:00 +0200</pubDate>
523 <description>
524 &lt;p&gt;I just posted this announcement culminating several months of work
525 with the next Debian Edu release. Not nearly done, but one major step
526 completed.&lt;/p&gt;
527
528 &lt;blockquote&gt;
529 &lt;p&gt;This is the first test release based on Squeeze. The focus of this
530 release is to test the user application selection. To have a look,
531 install the standalone profile and let the developers know if the set
532 of installed packages i.e. applications should be modified. If some
533 user application is missing, or if there are some applications that no
534 longer make sense to be included in Debian Edu, please let us know.
535 Also, if a useful application is missing the translation for your
536 language of choice, please let us know too.&lt;/p&gt;
537
538 &lt;p&gt;In addition, feedback and help to polish the desktop (menus,
539 artwork, starters, etc.) is appreciated. We would like to ship a nice
540 and handy KDE4 desktop targeted for schools out of the box.&lt;/p&gt;
541
542 &lt;p&gt;The other profiles should be installable, but there is a lot more
543 work left to be done before they are ready, so do not expect to
544 much.&lt;/p&gt;
545
546 &lt;p&gt;Changes compared to the lenny based version&lt;/p&gt;
547
548 &lt;ul&gt;
549 &lt;li&gt;Everything from Debian Squeeze
550 &lt;ul&gt;
551 &lt;li&gt;Desktop environment KDE 4.4 =&gt; the new KDE desktop in
552 combination with some new artwork
553 &lt;li&gt;Web browser Iceweasel 3.5
554 &lt;li&gt;OpenOffice.org 3.2
555 &lt;li&gt;Educational toolbox GCompris 9.3
556 &lt;li&gt;Music creator Rosegarden 10.04.2
557 &lt;li&gt;Image editor Gimp 2.6.10
558 &lt;li&gt;Virtual universe Celestia 1.6.0
559 &lt;li&gt;Virtual stargazer Stellarium 0.10.4
560 &lt;li&gt;3D modeler Blender 2.49.2 (new application)
561 &lt;li&gt;Video editor Kdenlive 0.7.7 (new application)
562 &lt;/ul&gt;&lt;/li&gt;
563 &lt;li&gt;Now using Kerberos for password checking (migration not finished).
564 Enabled for:
565 &lt;ul&gt;
566 &lt;li&gt;PAM
567 &lt;li&gt;LDAP
568 &lt;li&gt;IMAP
569 &lt;li&gt;SMTP (sender verification)
570 &lt;/ul&gt;
571 &lt;/li&gt;
572 &lt;li&gt;New experimental roaming workstation profile for laptops.&lt;/li&gt;
573 &lt;li&gt;Show welcome page to users when they first log in. The URL is
574 fetched from LDAP.&lt;/li&gt;
575 &lt;li&gt;New LXDE desktop option, in addition to KDE (default) and Gnome.&lt;/li&gt;
576 &lt;li&gt;General cleanup (not finished)&lt;/li&gt;
577 &lt;/ul&gt;
578 &lt;p&gt;The following features are not working as they should&lt;/p&gt;
579
580 &lt;ul&gt;
581 &lt;li&gt;No web based administration tool for creating users and groups. The
582 scripts ldap-createuser-krb and ldap-add-user-to-group can be used
583 for testing.&lt;/li&gt;
584 &lt;li&gt;DVD installs are missing debian-installer images for the PXE boot,
585 and do not set up the PXE menu on eth0 because of this. LTSP
586 clients should still boot from eth1 on thin client servers.&lt;/li&gt;
587 &lt;li&gt;The restructured KDE menu is not implemented.&lt;/li&gt;
588 &lt;li&gt;The LDAP server setup need to be reviewed for security.&lt;/li&gt;
589 &lt;li&gt;The LDAP directory structure need to be reworked.&lt;/li&gt;
590 &lt;li&gt;Different sets of packages are installed when using the DVD and the
591 netinst CD. More packages are installed using the netinst CD.&lt;/li&gt;
592 &lt;li&gt;The jackd package fail to install. This is believed to be caused by
593 some ongoing transition, and hopefully should be solved soon. The
594 jackd1 package can be installed manually for those that need it.&lt;/li&gt;
595 &lt;li&gt;Some packages lack translations. See
596 http://wiki.debian.org/DebianEdu/Status/Squeeze for updated status,
597 and help out with translations.&lt;/li&gt;
598 &lt;/ul&gt;
599
600 &lt;p&gt;To download this multiarch netinstall release you can use&lt;/p&gt;
601
602 &lt;ul&gt;
603 &lt;li&gt;&lt;a href=&quot;ftp://ftp.skolelinux.org/skolelinux-cd/squeeze-alpha/debian-edu-6.0.0+edua0-CD.iso&quot;&gt;ftp://ftp.skolelinux.org/skolelinux-cd/squeeze-alpha/debian-edu-6.0.0+edua0-CD.iso&lt;/a&gt;&lt;/li&gt;
604 &lt;li&gt;&lt;a href=&quot;http://ftp.skolelinux.org/skolelinux-cd/squeeze-alpha/debian-edu-6.0.0+edua0-CD.iso&quot;&gt;http://ftp.skolelinux.org/skolelinux-cd/squeeze-alpha/debian-edu-6.0.0+edua0-CD.iso&lt;/a&gt;&lt;/li&gt;
605 &lt;li&gt;rsync -avzP ftp.skolelinux.org::skolelinux-cd/squeeze-alpha/debian-edu-6.0.0+edua0-CD.iso&lt;/li&gt;
606 &lt;/ul&gt;
607 &lt;p&gt;To download this multiarch dvd release you can use&lt;/p&gt;
608
609 &lt;ul&gt;
610 &lt;li&gt;&lt;a href=&quot;ftp://ftp.skolelinux.org/skolelinux-cd/squeeze-alpha/debian-edu-6.0.0+edua0-DVD.iso&quot;&gt;ftp://ftp.skolelinux.org/skolelinux-cd/squeeze-alpha/debian-edu-6.0.0+edua0-DVD.iso&lt;/a&gt;&lt;/li&gt;
611 &lt;li&gt;&lt;a href=&quot;http://ftp.skolelinux.org/skolelinux-cd/squeeze-alpha/debian-edu-6.0.0+edua0-DVD.iso&quot;&gt;http://ftp.skolelinux.org/skolelinux-cd/squeeze-alpha/debian-edu-6.0.0+edua0-DVD.iso&lt;/a&gt;&lt;/li&gt;
612 &lt;li&gt;rsync -avzP ftp.skolelinux.org::skolelinux-cd/squeeze-alpha/debian-edu-6.0.0+edua0-DVD.iso&lt;/li&gt;
613 &lt;/ul&gt;
614
615 &lt;p&gt;There is no source DVD available yet. It will be prepared when we
616 get closer to the final release.&lt;/p&gt;
617
618 &lt;p&gt;The MD5SUM of these images are&lt;/p&gt;
619
620 &lt;ul&gt;
621 &lt;li&gt;3dbf45d59f42a53518b6e3c9ec3b5eb6 debian-edu-6.0.0+edua0-CD.iso&lt;/li&gt;
622 &lt;li&gt;22f2cbfce281d1c6e478be452638675d debian-edu-6.0.0+edua0-DVD.iso&lt;/li&gt;
623 &lt;/ul&gt;
624
625 &lt;p&gt;The SHA1SUM of these images are&lt;/p&gt;
626 &lt;ul&gt;
627 &lt;li&gt;c53d1b69b40cf37cd27aefaf33f6f6a3821bedf0 debian-edu-6.0.0+edua0-CD.iso&lt;/li&gt;
628 &lt;li&gt;2ec29d7db676d59d32197b05c277ffe16348376c debian-edu-6.0.0+edua0-DVD.iso&lt;/li&gt;
629 &lt;/ul&gt;
630 &lt;p&gt;How to report bugs:
631 http://wiki.debian.org/DebianEdu/HowTo/ReportBugsInBugzilla&lt;/p&gt;
632
633 &lt;p&gt;Please direct replies to debian-edu@lists.debian.org&lt;/p&gt;
634 &lt;/blockquote&gt;
635 </description>
636 </item>
637
638 <item>
639 <title>One step closer to single signon in Debian Edu</title>
640 <link>http://people.skolelinux.org/pere/blog/One_step_closer_to_single_signon_in_Debian_Edu.html</link>
641 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/One_step_closer_to_single_signon_in_Debian_Edu.html</guid>
642 <pubDate>Sun, 25 Jul 2010 10:00:00 +0200</pubDate>
643 <description>
644 &lt;p&gt;The last few months me and the other Debian Edu developers have
645 been working hard to get the Debian/Squeeze based version of Debian
646 Edu/Skolelinux into shape. This future version will use Kerberos for
647 authentication, and services are slowly migrated to single signon,
648 getting rid of password questions one at the time.&lt;/p&gt;
649
650 &lt;p&gt;It will also feature a roaming workstation profile with local home
651 directory, for laptops that are only some times on the Skolelinux
652 network, and for this profile a shortcut is created in Gnome and KDE
653 to gain access to the users home directory on the file server. This
654 shortcut uses SMB at the moment, and yesterday I had time to test if
655 SMB mounting had started working in KDE after we added the cifs-utils
656 package. I was pleasantly surprised how well it worked.&lt;/p&gt;
657
658 &lt;p&gt;Thanks to the recent changes to our samba configuration to get it
659 to use Kerberos for authentication, there were no question about user
660 password when mounting the SMB volume. A simple click on the shortcut
661 in the KDE menu, and a window with the home directory popped
662 up. :)&lt;/p&gt;
663
664 &lt;p&gt;One step closer to a single signon solution out of the box in
665 Debian Edu. We already had PAM, LDAP, IMAP and SMTP in place, and now
666 also Samba. Next step is Cups and hopefully also NFS.&lt;/p&gt;
667
668 &lt;p&gt;We had planned a alpha0 release of Debian Edu for today, but thanks
669 to the autobuilder administrators for some architectures being slow to
670 sign packages, we are still missing the fixed LTSP package we need for
671 the release. It was uploaded three days ago with urgency=high, and if
672 it had entered testing yesterday we would have been able to test it in
673 time for a alpha0 release today. As the binaries for ia64 and powerpc
674 still not uploaded to the Debian archive, we need to delay the alpha
675 release another day.&lt;/p&gt;
676
677 &lt;p&gt;If you want to help out with implementing Kerberos for Debian Edu,
678 please contact us on debian-edu@lists.debian.org.&lt;/p&gt;
679 </description>
680 </item>
681
682 <item>
683 <title>Digitale restriksjonsmekanismer fikk meg til å slutte å kjøpe musikk</title>
684 <link>http://people.skolelinux.org/pere/blog/Digitale_restriksjonsmekanismer_fikk_meg_til____slutte____kj__pe_musikk.html</link>
685 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Digitale_restriksjonsmekanismer_fikk_meg_til____slutte____kj__pe_musikk.html</guid>
686 <pubDate>Thu, 22 Jul 2010 23:50:00 +0200</pubDate>
687 <description>
688 &lt;p&gt;For mange år siden slutte jeg å kjøpe musikk-CDer. Årsaken var at
689 musikkbransjen var godt i gang med å selge platene sine med DRM som
690 gjorde at jeg ikke fikk spilt av musikken jeg kjøpte på utstyret jeg
691 hadde tilgjengelig, dvs. min datamaskin. Det var umulig å se på en
692 plate om den var ødelagt eller ikke, og jeg hadde jo allerede en
693 anseelig samling med plater, så jeg bestemme meg for å slutte å gi
694 penger til en bransje som åpenbart ikke respekterte meg.&lt;/p&gt;
695
696 &lt;p&gt;Jeg har mange titalls dager med musikk på CD i dag. Det meste er
697 lagt i et stort arkiv som kan spilles av fra husets datamaskiner (har
698 ikke rukket rippe alt). Jeg ser dermed ikke behovet for å skaffe mer
699 musikk. De fleste av mine favoritter er i hus, og jeg er dermed godt
700 fornøyd.&lt;/p&gt;
701
702 &lt;p&gt;Hvis musikkbransjen ønsker mine penger, så må de demonstrere at de
703 setter pris på meg som kunde, og ikke skremme meg bort med DRM og
704 antydninger om at kundene er kriminelle.&lt;/p&gt;
705
706 &lt;p&gt;Filmbransjen er like ille, men mens musikk gjerne varer lenge, er
707 filmer mer ferskvare. Har dermed ikke helt sluttet å kjøpe filmer, men
708 holder meg til DVD-filmer som kan spilles av på mine Linuxbokser.
709 Kommer neppe til å ta i bruk Blueray, og ei heller de nye DRM-greiene
710 «Ultraviolet» som be annonsert her om dagen.&lt;/p&gt;
711 </description>
712 </item>
713
714 <item>
715 <title>OpenStreetmap one step closer to having routing on its front page</title>
716 <link>http://people.skolelinux.org/pere/blog/OpenStreetmap_one_step_closer_to_having_routing_on_its_front_page.html</link>
717 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/OpenStreetmap_one_step_closer_to_having_routing_on_its_front_page.html</guid>
718 <pubDate>Sun, 18 Jul 2010 16:45:00 +0200</pubDate>
719 <description>
720 &lt;p&gt;Thanks to
721 &lt;a href=&quot;http://feedproxy.google.com/~r/Opengeodata/~3/wUTCzDZk3lc/project-of-the-week-which-way-home&quot;&gt;todays
722 opengeodata blog entry&lt;/a&gt;, I just discovered that the
723 OpenStreetmap.org site have gotten
724 &lt;a href=&quot;http://nroets.dev.openstreetmap.org/demo/index.html?layers=B000FTFTT&quot;&gt;support
725 for calculating routes&lt;/a&gt;. The support is still experimental and
726 only available from the development server, until more experience is
727 gathered on the user interface and any scalability issues.&lt;/p&gt;
728
729 &lt;p&gt;Earlier, the routing I knew about using the OpenStreetmap.org data
730 was provided by &lt;a href=&quot;http://maps.cloudmade.com/&quot;&gt;Cloudmade&lt;/a&gt;,
731 but having it on the main page is required to make everyone aware of
732 the issue. I&#39;ve had people reject Openstreetmap.org as a viable
733 alternative for them because the front page lacked routing support,
734 and I hope their needs will be catered for when routing show up on the
735 www.openstreetmap.org front page.&lt;/p&gt;
736 </description>
737 </item>
738
739 <item>
740 <title>What are they searching for - PowerDNS and ISC DHCP in LDAP</title>
741 <link>http://people.skolelinux.org/pere/blog/What_are_they_searching_for___PowerDNS_and_ISC_DHCP_in_LDAP.html</link>
742 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/What_are_they_searching_for___PowerDNS_and_ISC_DHCP_in_LDAP.html</guid>
743 <pubDate>Sat, 17 Jul 2010 21:00:00 +0200</pubDate>
744 <description>
745 &lt;p&gt;This is a
746 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Time_for_new__LDAP_schemas_replacing_RFC_2307_.html&quot;&gt;followup&lt;/a&gt;
747 on my
748 &lt;a href=&quot;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&quot;&gt;previous
749 work&lt;/a&gt; on
750 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Combining_PowerDNS_and_ISC_DHCP_LDAP_objects.html&quot;&gt;merging
751 all&lt;/a&gt; the computer related LDAP objects in Debian Edu.&lt;/p&gt;
752
753 &lt;p&gt;As a step to try to see if it possible to merge the DNS and DHCP
754 LDAP objects, I have had a look at how the packages pdns-backend-ldap
755 and dhcp3-server-ldap in Debian use the LDAP server. The two
756 implementations are quite different in how they use LDAP.&lt;/p&gt;
757
758 To get this information, I started slapd with debugging enabled and
759 dumped the debug output to a file to get the LDAP searches performed
760 on a Debian Edu main-server. Here is a summary.
761
762 &lt;p&gt;&lt;strong&gt;powerdns&lt;/strong&gt;&lt;/p&gt;
763
764 &lt;a href=&quot;http://www.linuxnetworks.de/doc/index.php/PowerDNS_LDAP_Backend&quot;&gt;Clues
765 on how to&lt;/a&gt; set up PowerDNS to use a LDAP backend is available on
766 the web.
767
768 &lt;p&gt;PowerDNS have two modes of operation using LDAP as its backend.
769 One &quot;strict&quot; mode where the forward and reverse DNS lookups are done
770 using the same LDAP objects, and a &quot;tree&quot; mode where the forward and
771 reverse entries are in two different subtrees in LDAP with a structure
772 based on the DNS names, as in tjener.intern and
773 2.2.0.10.in-addr.arpa.&lt;/p&gt;
774
775 &lt;p&gt;In tree mode, the server is set up to use a LDAP subtree as its
776 base, and uses a &quot;base&quot; scoped search for the DNS name by adding
777 &quot;dc=tjener,dc=intern,&quot; to the base with a filter for
778 &quot;(associateddomain=tjener.intern)&quot; for the forward entry and
779 &quot;dc=2,dc=2,dc=0,dc=10,dc=in-addr,dc=arpa,&quot; with a filter for
780 &quot;(associateddomain=2.2.0.10.in-addr.arpa)&quot; for the reverse entry. For
781 forward entries, it is looking for attributes named dnsttl, arecord,
782 nsrecord, cnamerecord, soarecord, ptrrecord, hinforecord, mxrecord,
783 txtrecord, rprecord, afsdbrecord, keyrecord, aaaarecord, locrecord,
784 srvrecord, naptrrecord, kxrecord, certrecord, dsrecord, sshfprecord,
785 ipseckeyrecord, rrsigrecord, nsecrecord, dnskeyrecord, dhcidrecord,
786 spfrecord and modifytimestamp. For reverse entries it is looking for
787 the attributes dnsttl, arecord, nsrecord, cnamerecord, soarecord,
788 ptrrecord, hinforecord, mxrecord, txtrecord, rprecord, aaaarecord,
789 locrecord, srvrecord, naptrrecord and modifytimestamp. The equivalent
790 ldapsearch commands could look like this:&lt;/p&gt;
791
792 &lt;blockquote&gt;&lt;pre&gt;
793 ldapsearch -h ldap \
794 -b dc=tjener,dc=intern,ou=hosts,dc=skole,dc=skolelinux,dc=no \
795 -s base -x &#39;(associateddomain=tjener.intern)&#39; dNSTTL aRecord nSRecord \
796 cNAMERecord sOARecord pTRRecord hInfoRecord mXRecord tXTRecord \
797 rPRecord aFSDBRecord KeyRecord aAAARecord lOCRecord sRVRecord \
798 nAPTRRecord kXRecord certRecord dSRecord sSHFPRecord iPSecKeyRecord \
799 rRSIGRecord nSECRecord dNSKeyRecord dHCIDRecord sPFRecord modifyTimestamp
800
801 ldapsearch -h ldap \
802 -b dc=2,dc=2,dc=0,dc=10,dc=in-addr,dc=arpa,ou=hosts,dc=skole,dc=skolelinux,dc=no \
803 -s base -x &#39;(associateddomain=2.2.0.10.in-addr.arpa)&#39;
804 dnsttl, arecord, nsrecord, cnamerecord soarecord ptrrecord \
805 hinforecord mxrecord txtrecord rprecord aaaarecord locrecord \
806 srvrecord naptrrecord modifytimestamp
807 &lt;/pre&gt;&lt;/blockquote&gt;
808
809 &lt;p&gt;In Debian Edu/Lenny, the PowerDNS tree mode is used with
810 ou=hosts,dc=skole,dc=skolelinux,dc=no as the base, and these are two
811 example LDAP objects used there. In addition to these objects, the
812 parent objects all th way up to ou=hosts,dc=skole,dc=skolelinux,dc=no
813 also exist.&lt;/p&gt;
814
815 &lt;blockquote&gt;&lt;pre&gt;
816 dn: dc=tjener,dc=intern,ou=hosts,dc=skole,dc=skolelinux,dc=no
817 objectclass: top
818 objectclass: dnsdomain
819 objectclass: domainrelatedobject
820 dc: tjener
821 arecord: 10.0.2.2
822 associateddomain: tjener.intern
823
824 dn: dc=2,dc=2,dc=0,dc=10,dc=in-addr,dc=arpa,ou=hosts,dc=skole,dc=skolelinux,dc=no
825 objectclass: top
826 objectclass: dnsdomain2
827 objectclass: domainrelatedobject
828 dc: 2
829 ptrrecord: tjener.intern
830 associateddomain: 2.2.0.10.in-addr.arpa
831 &lt;/pre&gt;&lt;/blockquote&gt;
832
833 &lt;p&gt;In strict mode, the server behaves differently. When looking for
834 forward DNS entries, it is doing a &quot;subtree&quot; scoped search with the
835 same base as in the tree mode for a object with filter
836 &quot;(associateddomain=tjener.intern)&quot; and requests the attributes dnsttl,
837 arecord, nsrecord, cnamerecord, soarecord, ptrrecord, hinforecord,
838 mxrecord, txtrecord, rprecord, aaaarecord, locrecord, srvrecord,
839 naptrrecord and modifytimestamp. For reverse entires it also do a
840 subtree scoped search but this time the filter is &quot;(arecord=10.0.2.2)&quot;
841 and the requested attributes are associateddomain, dnsttl and
842 modifytimestamp. In short, in strict mode the objects with ptrrecord
843 go away, and the arecord attribute in the forward object is used
844 instead.&lt;/p&gt;
845
846 &lt;p&gt;The forward and reverse searches can be simulated using ldapsearch
847 like this:&lt;/p&gt;
848
849 &lt;blockquote&gt;&lt;pre&gt;
850 ldapsearch -h ldap -b ou=hosts,dc=skole,dc=skolelinux,dc=no -s sub -x \
851 &#39;(associateddomain=tjener.intern)&#39; dNSTTL aRecord nSRecord \
852 cNAMERecord sOARecord pTRRecord hInfoRecord mXRecord tXTRecord \
853 rPRecord aFSDBRecord KeyRecord aAAARecord lOCRecord sRVRecord \
854 nAPTRRecord kXRecord certRecord dSRecord sSHFPRecord iPSecKeyRecord \
855 rRSIGRecord nSECRecord dNSKeyRecord dHCIDRecord sPFRecord modifyTimestamp
856
857 ldapsearch -h ldap -b ou=hosts,dc=skole,dc=skolelinux,dc=no -s sub -x \
858 &#39;(arecord=10.0.2.2)&#39; associateddomain dnsttl modifytimestamp
859 &lt;/pre&gt;&lt;/blockquote&gt;
860
861 &lt;p&gt;In addition to the forward and reverse searches , there is also a
862 search for SOA records, which behave similar to the forward and
863 reverse lookups.&lt;/p&gt;
864
865 &lt;p&gt;A thing to note with the PowerDNS behaviour is that it do not
866 specify any objectclass names, and instead look for the attributes it
867 need to generate a DNS reply. This make it able to work with any
868 objectclass that provide the needed attributes.&lt;/p&gt;
869
870 &lt;p&gt;The attributes are normally provided in the cosine (RFC 1274) and
871 dnsdomain2 schemas. The latter is used for reverse entries like
872 ptrrecord and recent DNS additions like aaaarecord and srvrecord.&lt;/p&gt;
873
874 &lt;p&gt;In Debian Edu, we have created DNS objects using the object classes
875 dcobject (for dc), dnsdomain or dnsdomain2 (structural, for the DNS
876 attributes) and domainrelatedobject (for associatedDomain). The use
877 of structural object classes make it impossible to combine these
878 classes with the object classes used by DHCP.&lt;/p&gt;
879
880 &lt;p&gt;There are other schemas that could be used too, for example the
881 dnszone structural object class used by Gosa and bind-sdb for the DNS
882 attributes combined with the domainrelatedobject object class, but in
883 this case some unused attributes would have to be included as well
884 (zonename and relativedomainname).&lt;/p&gt;
885
886 &lt;p&gt;My proposal for Debian Edu would be to switch PowerDNS to strict
887 mode and not use any of the existing objectclasses (dnsdomain,
888 dnsdomain2 and dnszone) when one want to combine the DNS information
889 with DHCP information, and instead create a auxiliary object class
890 defined something like this (using the attributes defined for
891 dnsdomain and dnsdomain2 or dnszone):&lt;/p&gt;
892
893 &lt;blockquote&gt;&lt;pre&gt;
894 objectclass ( some-oid NAME &#39;dnsDomainAux&#39;
895 SUP top
896 AUXILIARY
897 MAY ( ARecord $ MDRecord $ MXRecord $ NSRecord $ SOARecord $ CNAMERecord $
898 DNSTTL $ DNSClass $ PTRRecord $ HINFORecord $ MINFORecord $
899 TXTRecord $ SIGRecord $ KEYRecord $ AAAARecord $ LOCRecord $
900 NXTRecord $ SRVRecord $ NAPTRRecord $ KXRecord $ CERTRecord $
901 A6Record $ DNAMERecord
902 ))
903 &lt;/pre&gt;&lt;/blockquote&gt;
904
905 &lt;p&gt;This will allow any object to become a DNS entry when combined with
906 the domainrelatedobject object class, and allow any entity to include
907 all the attributes PowerDNS wants. I&#39;ve sent an email to the PowerDNS
908 developers asking for their view on this schema and if they are
909 interested in providing such schema with PowerDNS, and I hope my
910 message will be accepted into their mailing list soon.&lt;/p&gt;
911
912 &lt;p&gt;&lt;strong&gt;ISC dhcp&lt;/strong&gt;&lt;/p&gt;
913
914 &lt;p&gt;The DHCP server searches for specific objectclass and requests all
915 the object attributes, and then uses the attributes it want. This
916 make it harder to figure out exactly what attributes are used, but
917 thanks to the working example in Debian Edu I can at least get an idea
918 what is needed without having to read the source code.&lt;/p&gt;
919
920 &lt;p&gt;In the DHCP server configuration, the LDAP base to use and the
921 search filter to use to locate the correct dhcpServer entity is
922 stored. These are the relevant entries from
923 /etc/dhcp3/dhcpd.conf:&lt;/p&gt;
924
925 &lt;blockquote&gt;&lt;pre&gt;
926 ldap-base-dn &quot;dc=skole,dc=skolelinux,dc=no&quot;;
927 ldap-dhcp-server-cn &quot;dhcp&quot;;
928 &lt;/pre&gt;&lt;/blockquote&gt;
929
930 &lt;p&gt;The DHCP server uses this information to nest all the DHCP
931 configuration it need. The cn &quot;dhcp&quot; is located using the given LDAP
932 base and the filter &quot;(&amp;(objectClass=dhcpServer)(cn=dhcp))&quot;. The
933 search result is this entry:&lt;/p&gt;
934
935 &lt;blockquote&gt;&lt;pre&gt;
936 dn: cn=dhcp,dc=skole,dc=skolelinux,dc=no
937 cn: dhcp
938 objectClass: top
939 objectClass: dhcpServer
940 dhcpServiceDN: cn=DHCP Config,dc=skole,dc=skolelinux,dc=no
941 &lt;/pre&gt;&lt;/blockquote&gt;
942
943 &lt;p&gt;The content of the dhcpServiceDN attribute is next used to locate the
944 subtree with DHCP configuration. The DHCP configuration subtree base
945 is located using a base scope search with base &quot;cn=DHCP
946 Config,dc=skole,dc=skolelinux,dc=no&quot; and filter
947 &quot;(&amp;(objectClass=dhcpService)(|(dhcpPrimaryDN=cn=dhcp,dc=skole,dc=skolelinux,dc=no)(dhcpSecondaryDN=cn=dhcp,dc=skole,dc=skolelinux,dc=no)))&quot;.
948 The search result is this entry:&lt;/p&gt;
949
950 &lt;blockquote&gt;&lt;pre&gt;
951 dn: cn=DHCP Config,dc=skole,dc=skolelinux,dc=no
952 cn: DHCP Config
953 objectClass: top
954 objectClass: dhcpService
955 objectClass: dhcpOptions
956 dhcpPrimaryDN: cn=dhcp, dc=skole,dc=skolelinux,dc=no
957 dhcpStatements: ddns-update-style none
958 dhcpStatements: authoritative
959 dhcpOption: smtp-server code 69 = array of ip-address
960 dhcpOption: www-server code 72 = array of ip-address
961 dhcpOption: wpad-url code 252 = text
962 &lt;/pre&gt;&lt;/blockquote&gt;
963
964 &lt;p&gt;Next, the entire subtree is processed, one level at the time. When
965 all the DHCP configuration is loaded, it is ready to receive requests.
966 The subtree in Debian Edu contain objects with object classes
967 top/dhcpService/dhcpOptions, top/dhcpSharedNetwork/dhcpOptions,
968 top/dhcpSubnet, top/dhcpGroup and top/dhcpHost. These provide options
969 and information about netmasks, dynamic range etc. Leaving out the
970 details here because it is not relevant for the focus of my
971 investigation, which is to see if it is possible to merge dns and dhcp
972 related computer objects.&lt;/p&gt;
973
974 &lt;p&gt;When a DHCP request come in, LDAP is searched for the MAC address
975 of the client (00:00:00:00:00:00 in this example), using a subtree
976 scoped search with &quot;cn=DHCP Config,dc=skole,dc=skolelinux,dc=no&quot; as
977 the base and &quot;(&amp;(objectClass=dhcpHost)(dhcpHWAddress=ethernet
978 00:00:00:00:00:00))&quot; as the filter. This is what a host object look
979 like:&lt;/p&gt;
980
981 &lt;blockquote&gt;&lt;pre&gt;
982 dn: cn=hostname,cn=group1,cn=THINCLIENTS,cn=DHCP Config,dc=skole,dc=skolelinux,dc=no
983 cn: hostname
984 objectClass: top
985 objectClass: dhcpHost
986 dhcpHWAddress: ethernet 00:00:00:00:00:00
987 dhcpStatements: fixed-address hostname
988 &lt;/pre&gt;&lt;/blockquote&gt;
989
990 &lt;p&gt;There is less flexiblity in the way LDAP searches are done here.
991 The object classes need to have fixed names, and the configuration
992 need to be stored in a fairly specific LDAP structure. On the
993 positive side, the invidiual dhcpHost entires can be anywhere without
994 the DN pointed to by the dhcpServer entries. The latter should make
995 it possible to group all host entries in a subtree next to the
996 configuration entries, and this subtree can also be shared with the
997 DNS server if the schema proposed above is combined with the dhcpHost
998 structural object class.
999
1000 &lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;
1001
1002 &lt;p&gt;The PowerDNS implementation seem to be very flexible when it come
1003 to which LDAP schemas to use. While its &quot;tree&quot; mode is rigid when it
1004 come to the the LDAP structure, the &quot;strict&quot; mode is very flexible,
1005 allowing DNS objects to be stored anywhere under the base cn specified
1006 in the configuration.&lt;/p&gt;
1007
1008 &lt;p&gt;The DHCP implementation on the other hand is very inflexible, both
1009 regarding which LDAP schemas to use and which LDAP structure to use.
1010 I guess one could implement ones own schema, as long as the
1011 objectclasses and attributes have the names used, but this do not
1012 really help when the DHCP subtree need to have a fairly fixed
1013 structure.&lt;/p&gt;
1014
1015 &lt;p&gt;Based on the observed behaviour, I suspect a LDAP structure like
1016 this might work for Debian Edu:&lt;/p&gt;
1017
1018 &lt;blockquote&gt;&lt;pre&gt;
1019 ou=services
1020 cn=machine-info (dhcpService) - dhcpServiceDN points here
1021 cn=dhcp (dhcpServer)
1022 cn=dhcp-internal (dhcpSharedNetwork/dhcpOptions)
1023 cn=10.0.2.0 (dhcpSubnet)
1024 cn=group1 (dhcpGroup/dhcpOptions)
1025 cn=dhcp-thinclients (dhcpSharedNetwork/dhcpOptions)
1026 cn=192.168.0.0 (dhcpSubnet)
1027 cn=group1 (dhcpGroup/dhcpOptions)
1028 ou=machines - PowerDNS base points here
1029 cn=hostname (dhcpHost/domainrelatedobject/dnsDomainAux)
1030 &lt;/pre&gt;&lt;/blockquote&gt;
1031
1032 &lt;P&gt;This is not tested yet. If the DHCP server require the dhcpHost
1033 entries to be in the dhcpGroup subtrees, the entries can be stored
1034 there instead of a common machines subtree, and the PowerDNS base
1035 would have to be moved one level up to the machine-info subtree.&lt;/p&gt;
1036
1037 &lt;p&gt;The combined object under the machines subtree would look something
1038 like this:&lt;/p&gt;
1039
1040 &lt;blockquote&gt;&lt;pre&gt;
1041 dn: dc=hostname,ou=machines,cn=machine-info,dc=skole,dc=skolelinux,dc=no
1042 dc: hostname
1043 objectClass: top
1044 objectClass: dhcpHost
1045 objectclass: domainrelatedobject
1046 objectclass: dnsDomainAux
1047 associateddomain: hostname.intern
1048 arecord: 10.11.12.13
1049 dhcpHWAddress: ethernet 00:00:00:00:00:00
1050 dhcpStatements: fixed-address hostname.intern
1051 &lt;/pre&gt;&lt;/blockquote&gt;
1052
1053 &lt;/p&gt;One could even add the LTSP configuration associated with a given
1054 machine, as long as the required attributes are available in a
1055 auxiliary object class.&lt;/p&gt;
1056 </description>
1057 </item>
1058
1059 </channel>
1060 </rss>