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>Debian Edu roaming workstation - at the university of Oslo
</title>
11 <link>http://people.skolelinux.org/pere/blog/Debian_Edu_roaming_workstation___at_the_university_of_Oslo.html
</link>
12 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Debian_Edu_roaming_workstation___at_the_university_of_Oslo.html
</guid>
13 <pubDate>Tue,
3 Aug
2010 23:
30:
00 +
0200</pubDate>
15 <p
>The new roaming workstation profile in Debian Edu/Squeeze is fairly
16 similar to the laptop setup am I working on using Ubuntu for the
17 University of Oslo, and just for the heck of it, I tested today how
18 hard it would be to integrate that profile into the university
19 infrastructure. In this case, it is the university LDAP server,
20 Active Directory Kerberos server and SMB mounting from the Netapp file
23 <p
>I was pleasantly surprised that the only three files needed to be
24 changed (/etc/sssd/sssd.conf, /etc/ldap.conf and
25 /etc/mklocaluser.d/
20-debian-edu-config) and one file had to be added
26 (/usr/share/perl5/Debian/Edu_Local.pm), to get the client working.
27 Most of the changes were to get the client to use the university LDAP
28 for NSS and Kerberos server for PAM, but one was to change a hard
29 coded DNS domain name in the mklocaluser hook from .intern to
32 <p
>This testing was so encouraging, that I went ahead and adjusted the
33 Debian Edu scripts and setup in subversion to centralise the roaming
34 workstation setup a bit more and avoid the hardcoded DNS domain name,
35 so that when I test this tomorrow, I expect to get away with modifying
36 only /etc/sssd/sssd.conf and /etc/ldap.conf to get it to use the
37 university servers.
</p
>
39 <p
>My goal is to get the clients to have no hardcoded settings and
40 fetch all their initial setup during installation and first boot, to
41 allow them to be inserted also into environments where the default
42 setup in Debian Edu has been changed or as with the university, where
43 the environment is different but provides the protocols Debian Edu
49 <title>Circular package dependencies harms apt recovery
</title>
50 <link>http://people.skolelinux.org/pere/blog/Circular_package_dependencies_harms_apt_recovery.html
</link>
51 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Circular_package_dependencies_harms_apt_recovery.html
</guid>
52 <pubDate>Tue,
27 Jul
2010 23:
50:
00 +
0200</pubDate>
54 <p
>I discovered this while doing
55 <a href=
"http://people.skolelinux.org/pere/blog/Automatic_upgrade_testing_from_Lenny_to_Squeeze.html
">automated
56 testing of upgrades from Debian Lenny to Squeeze
</a
>. A few packages
57 in Debian still got circular dependencies, and it is often claimed
58 that apt and aptitude should be able to handle this just fine, but
59 some times these dependency loops causes apt to fail.
</p
>
61 <p
>An example is from todays
62 <a href=
"http://people.skolelinux.org/~pere/debian-upgrade-testing//test-
20100727-lenny-squeeze-kde-aptitude.txt
">upgrade
63 of KDE using aptitude
</a
>. In it, a bug in kdebase-workspace-data
64 causes perl-modules to fail to upgrade. The cause is simple. If a
65 package fail to unpack, then only part of packages with the circular
66 dependency might end up being unpacked when unpacking aborts, and the
67 ones already unpacked will fail to configure in the recovery phase
68 because its dependencies are unavailable.
</p
>
70 <p
>In this log, the problem manifest itself with this error:
</p
>
72 <blockquote
><pre
>
73 dpkg: dependency problems prevent configuration of perl-modules:
74 perl-modules depends on perl (
>=
5.10.1-
1); however:
75 Version of perl on system is
5.10.0-
19lenny
2.
76 dpkg: error processing perl-modules (--configure):
77 dependency problems - leaving unconfigured
78 </pre
></blockquote
>
80 <p
>The perl/perl-modules circular dependency is already
81 <a href=
"http://bugs.debian.org/
527917">reported as a bug
</a
>, and will
82 hopefully be solved as soon as possible, but it is not the only one,
83 and each one of these loops in the dependency tree can cause similar
84 failures. Of course, they only occur when there are bugs in other
85 packages causing the unpacking to fail, but it is rather nasty when
86 the failure of one package causes the problem to become worse because
87 of dependency loops.
</p
>
90 <a href=
"http://lists.debian.org/debian-devel/
2010/
06/msg00116.html
">the
91 tireless effort by Bill Allombert
</a
>, the number of circular
93 <a href=
"http://debian.semistable.com/debgraph.out.html
">left in Debian
94 is dropping
</a
>, and perhaps it will reach zero one day. :)
</p
>
96 <p
>Todays testing also exposed a bug in
97 <a href=
"http://bugs.debian.org/
590605">update-notifier
</a
> and
98 <a href=
"http://bugs.debian.org/
590604">different behaviour
</a
> between
99 apt-get and aptitude, the latter possibly caused by some circular
100 dependency. Reported both to BTS to try to get someone to look at
106 <title>First Debian Edu test release (alpha0) based on Squeeze is released
</title>
107 <link>http://people.skolelinux.org/pere/blog/First_Debian_Edu_test_release__alpha0__based_on_Squeeze_is_released.html
</link>
108 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/First_Debian_Edu_test_release__alpha0__based_on_Squeeze_is_released.html
</guid>
109 <pubDate>Tue,
27 Jul
2010 17:
45:
00 +
0200</pubDate>
111 <p
>I just posted this announcement culminating several months of work
112 with the next Debian Edu release. Not nearly done, but one major step
116 <p
>This is the first test release based on Squeeze. The focus of this
117 release is to test the user application selection. To have a look,
118 install the standalone profile and let the developers know if the set
119 of installed packages i.e. applications should be modified. If some
120 user application is missing, or if there are some applications that no
121 longer make sense to be included in Debian Edu, please let us know.
122 Also, if a useful application is missing the translation for your
123 language of choice, please let us know too.
</p
>
125 <p
>In addition, feedback and help to polish the desktop (menus,
126 artwork, starters, etc.) is appreciated. We would like to ship a nice
127 and handy KDE4 desktop targeted for schools out of the box.
</p
>
129 <p
>The other profiles should be installable, but there is a lot more
130 work left to be done before they are ready, so do not expect to
133 <p
>Changes compared to the lenny based version
</p
>
136 <li
>Everything from Debian Squeeze
138 <li
>Desktop environment KDE
4.4 =
> the new KDE desktop in
139 combination with some new artwork
140 <li
>Web browser Iceweasel
3.5
141 <li
>OpenOffice.org
3.2
142 <li
>Educational toolbox GCompris
9.3
143 <li
>Music creator Rosegarden
10.04.2
144 <li
>Image editor Gimp
2.6.10
145 <li
>Virtual universe Celestia
1.6.0
146 <li
>Virtual stargazer Stellarium
0.10.4
147 <li
>3D modeler Blender
2.49.2 (new application)
148 <li
>Video editor Kdenlive
0.7.7 (new application)
149 </ul
></li
>
150 <li
>Now using Kerberos for password checking (migration not finished).
156 <li
>SMTP (sender verification)
159 <li
>New experimental roaming workstation profile for laptops.
</li
>
160 <li
>Show welcome page to users when they first log in. The URL is
161 fetched from LDAP.
</li
>
162 <li
>New LXDE desktop option, in addition to KDE (default) and Gnome.
</li
>
163 <li
>General cleanup (not finished)
</li
>
165 <p
>The following features are not working as they should
</p
>
168 <li
>No web based administration tool for creating users and groups. The
169 scripts ldap-createuser-krb and ldap-add-user-to-group can be used
170 for testing.
</li
>
171 <li
>DVD installs are missing debian-installer images for the PXE boot,
172 and do not set up the PXE menu on eth0 because of this. LTSP
173 clients should still boot from eth1 on thin client servers.
</li
>
174 <li
>The restructured KDE menu is not implemented.
</li
>
175 <li
>The LDAP server setup need to be reviewed for security.
</li
>
176 <li
>The LDAP directory structure need to be reworked.
</li
>
177 <li
>Different sets of packages are installed when using the DVD and the
178 netinst CD. More packages are installed using the netinst CD.
</li
>
179 <li
>The jackd package fail to install. This is believed to be caused by
180 some ongoing transition, and hopefully should be solved soon. The
181 jackd1 package can be installed manually for those that need it.
</li
>
182 <li
>Some packages lack translations. See
183 http://wiki.debian.org/DebianEdu/Status/Squeeze for updated status,
184 and help out with translations.
</li
>
187 <p
>To download this multiarch netinstall release you can use
</p
>
190 <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
>
191 <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
>
192 <li
>rsync -avzP ftp.skolelinux.org::skolelinux-cd/squeeze-alpha/debian-edu-
6.0.0+edua0-CD.iso
</li
>
194 <p
>To download this multiarch dvd release you can use
</p
>
197 <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
>
198 <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
>
199 <li
>rsync -avzP ftp.skolelinux.org::skolelinux-cd/squeeze-alpha/debian-edu-
6.0.0+edua0-DVD.iso
</li
>
202 <p
>There is no source DVD available yet. It will be prepared when we
203 get closer to the final release.
</p
>
205 <p
>The MD5SUM of these images are
</p
>
208 <li
>3dbf45d59f42a53518b6e3c9ec3b5eb6 debian-edu-
6.0.0+edua0-CD.iso
</li
>
209 <li
>22f2cbfce281d1c6e478be452638675d debian-edu-
6.0.0+edua0-DVD.iso
</li
>
212 <p
>The SHA1SUM of these images are
</p
>
214 <li
>c53d1b69b40cf37cd27aefaf33f6f6a3821bedf0 debian-edu-
6.0.0+edua0-CD.iso
</li
>
215 <li
>2ec29d7db676d59d32197b05c277ffe16348376c debian-edu-
6.0.0+edua0-DVD.iso
</li
>
217 <p
>How to report bugs:
218 http://wiki.debian.org/DebianEdu/HowTo/ReportBugsInBugzilla
</p
>
220 <p
>Please direct replies to debian-edu@lists.debian.org
</p
>
226 <title>One step closer to single signon in Debian Edu
</title>
227 <link>http://people.skolelinux.org/pere/blog/One_step_closer_to_single_signon_in_Debian_Edu.html
</link>
228 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/One_step_closer_to_single_signon_in_Debian_Edu.html
</guid>
229 <pubDate>Sun,
25 Jul
2010 10:
00:
00 +
0200</pubDate>
231 <p
>The last few months me and the other Debian Edu developers have
232 been working hard to get the Debian/Squeeze based version of Debian
233 Edu/Skolelinux into shape. This future version will use Kerberos for
234 authentication, and services are slowly migrated to single signon,
235 getting rid of password questions one at the time.
</p
>
237 <p
>It will also feature a roaming workstation profile with local home
238 directory, for laptops that are only some times on the Skolelinux
239 network, and for this profile a shortcut is created in Gnome and KDE
240 to gain access to the users home directory on the file server. This
241 shortcut uses SMB at the moment, and yesterday I had time to test if
242 SMB mounting had started working in KDE after we added the cifs-utils
243 package. I was pleasantly surprised how well it worked.
</p
>
245 <p
>Thanks to the recent changes to our samba configuration to get it
246 to use Kerberos for authentication, there were no question about user
247 password when mounting the SMB volume. A simple click on the shortcut
248 in the KDE menu, and a window with the home directory popped
251 <p
>One step closer to a single signon solution out of the box in
252 Debian Edu. We already had PAM, LDAP, IMAP and SMTP in place, and now
253 also Samba. Next step is Cups and hopefully also NFS.
</p
>
255 <p
>We had planned a alpha0 release of Debian Edu for today, but thanks
256 to the autobuilder administrators for some architectures being slow to
257 sign packages, we are still missing the fixed LTSP package we need for
258 the release. It was uploaded three days ago with urgency=high, and if
259 it had entered testing yesterday we would have been able to test it in
260 time for a alpha0 release today. As the binaries for ia64 and powerpc
261 still not uploaded to the Debian archive, we need to delay the alpha
262 release another day.
</p
>
264 <p
>If you want to help out with implementing Kerberos for Debian Edu,
265 please contact us on debian-edu@lists.debian.org.
</p
>
270 <title>Digitale restriksjonsmekanismer fikk meg til å slutte å kjøpe musikk
</title>
271 <link>http://people.skolelinux.org/pere/blog/Digitale_restriksjonsmekanismer_fikk_meg_til____slutte____kj__pe_musikk.html
</link>
272 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Digitale_restriksjonsmekanismer_fikk_meg_til____slutte____kj__pe_musikk.html
</guid>
273 <pubDate>Thu,
22 Jul
2010 23:
50:
00 +
0200</pubDate>
275 <p
>For mange år siden slutte jeg å kjøpe musikk-CDer. Årsaken var at
276 musikkbransjen var godt i gang med å selge platene sine med DRM som
277 gjorde at jeg ikke fikk spilt av musikken jeg kjøpte på utstyret jeg
278 hadde tilgjengelig, dvs. min datamaskin. Det var umulig å se på en
279 plate om den var ødelagt eller ikke, og jeg hadde jo allerede en
280 anseelig samling med plater, så jeg bestemme meg for å slutte å gi
281 penger til en bransje som åpenbart ikke respekterte meg.
</p
>
283 <p
>Jeg har mange titalls dager med musikk på CD i dag. Det meste er
284 lagt i et stort arkiv som kan spilles av fra husets datamaskiner (har
285 ikke rukket rippe alt). Jeg ser dermed ikke behovet for å skaffe mer
286 musikk. De fleste av mine favoritter er i hus, og jeg er dermed godt
289 <p
>Hvis musikkbransjen ønsker mine penger, så må de demonstrere at de
290 setter pris på meg som kunde, og ikke skremme meg bort med DRM og
291 antydninger om at kundene er kriminelle.
</p
>
293 <p
>Filmbransjen er like ille, men mens musikk gjerne varer lenge, er
294 filmer mer ferskvare. Har dermed ikke helt sluttet å kjøpe filmer, men
295 holder meg til DVD-filmer som kan spilles av på mine Linuxbokser.
296 Kommer neppe til å ta i bruk Blueray, og ei heller de nye DRM-greiene
297 «Ultraviolet» som be annonsert her om dagen.
</p
>
302 <title>OpenStreetmap one step closer to having routing on its front page
</title>
303 <link>http://people.skolelinux.org/pere/blog/OpenStreetmap_one_step_closer_to_having_routing_on_its_front_page.html
</link>
304 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/OpenStreetmap_one_step_closer_to_having_routing_on_its_front_page.html
</guid>
305 <pubDate>Sun,
18 Jul
2010 16:
45:
00 +
0200</pubDate>
308 <a href=
"http://feedproxy.google.com/~r/Opengeodata/~
3/wUTCzDZk3lc/project-of-the-week-which-way-home
">todays
309 opengeodata blog entry
</a
>, I just discovered that the
310 OpenStreetmap.org site have gotten
311 <a href=
"http://nroets.dev.openstreetmap.org/demo/index.html?layers=B000FTFTT
">support
312 for calculating routes
</a
>. The support is still experimental and
313 only available from the development server, until more experience is
314 gathered on the user interface and any scalability issues.
</p
>
316 <p
>Earlier, the routing I knew about using the OpenStreetmap.org data
317 was provided by
<a href=
"http://maps.cloudmade.com/
">Cloudmade
</a
>,
318 but having it on the main page is required to make everyone aware of
319 the issue. I
've had people reject Openstreetmap.org as a viable
320 alternative for them because the front page lacked routing support,
321 and I hope their needs will be catered for when routing show up on the
322 www.openstreetmap.org front page.
</p
>
327 <title>What are they searching for - PowerDNS and ISC DHCP in LDAP
</title>
328 <link>http://people.skolelinux.org/pere/blog/What_are_they_searching_for___PowerDNS_and_ISC_DHCP_in_LDAP.html
</link>
329 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/What_are_they_searching_for___PowerDNS_and_ISC_DHCP_in_LDAP.html
</guid>
330 <pubDate>Sat,
17 Jul
2010 21:
00:
00 +
0200</pubDate>
333 <a href=
"http://people.skolelinux.org/pere/blog/Time_for_new__LDAP_schemas_replacing_RFC_2307_.html
">followup
</a
>
335 <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
337 <a href=
"http://people.skolelinux.org/pere/blog/Combining_PowerDNS_and_ISC_DHCP_LDAP_objects.html
">merging
338 all
</a
> the computer related LDAP objects in Debian Edu.
</p
>
340 <p
>As a step to try to see if it possible to merge the DNS and DHCP
341 LDAP objects, I have had a look at how the packages pdns-backend-ldap
342 and dhcp3-server-ldap in Debian use the LDAP server. The two
343 implementations are quite different in how they use LDAP.
</p
>
345 To get this information, I started slapd with debugging enabled and
346 dumped the debug output to a file to get the LDAP searches performed
347 on a Debian Edu main-server. Here is a summary.
349 <p
><strong
>powerdns
</strong
></p
>
351 <a href=
"http://www.linuxnetworks.de/doc/index.php/PowerDNS_LDAP_Backend
">Clues
352 on how to
</a
> set up PowerDNS to use a LDAP backend is available on
355 <p
>PowerDNS have two modes of operation using LDAP as its backend.
356 One
"strict
" mode where the forward and reverse DNS lookups are done
357 using the same LDAP objects, and a
"tree
" mode where the forward and
358 reverse entries are in two different subtrees in LDAP with a structure
359 based on the DNS names, as in tjener.intern and
360 2.2.0.10.in-addr.arpa.
</p
>
362 <p
>In tree mode, the server is set up to use a LDAP subtree as its
363 base, and uses a
"base
" scoped search for the DNS name by adding
364 "dc=tjener,dc=intern,
" to the base with a filter for
365 "(associateddomain=tjener.intern)
" for the forward entry and
366 "dc=
2,dc=
2,dc=
0,dc=
10,dc=in-addr,dc=arpa,
" with a filter for
367 "(associateddomain=
2.2.0.10.in-addr.arpa)
" for the reverse entry. For
368 forward entries, it is looking for attributes named dnsttl, arecord,
369 nsrecord, cnamerecord, soarecord, ptrrecord, hinforecord, mxrecord,
370 txtrecord, rprecord, afsdbrecord, keyrecord, aaaarecord, locrecord,
371 srvrecord, naptrrecord, kxrecord, certrecord, dsrecord, sshfprecord,
372 ipseckeyrecord, rrsigrecord, nsecrecord, dnskeyrecord, dhcidrecord,
373 spfrecord and modifytimestamp. For reverse entries it is looking for
374 the attributes dnsttl, arecord, nsrecord, cnamerecord, soarecord,
375 ptrrecord, hinforecord, mxrecord, txtrecord, rprecord, aaaarecord,
376 locrecord, srvrecord, naptrrecord and modifytimestamp. The equivalent
377 ldapsearch commands could look like this:
</p
>
379 <blockquote
><pre
>
381 -b dc=tjener,dc=intern,ou=hosts,dc=skole,dc=skolelinux,dc=no \
382 -s base -x
'(associateddomain=tjener.intern)
' dNSTTL aRecord nSRecord \
383 cNAMERecord sOARecord pTRRecord hInfoRecord mXRecord tXTRecord \
384 rPRecord aFSDBRecord KeyRecord aAAARecord lOCRecord sRVRecord \
385 nAPTRRecord kXRecord certRecord dSRecord sSHFPRecord iPSecKeyRecord \
386 rRSIGRecord nSECRecord dNSKeyRecord dHCIDRecord sPFRecord modifyTimestamp
389 -b dc=
2,dc=
2,dc=
0,dc=
10,dc=in-addr,dc=arpa,ou=hosts,dc=skole,dc=skolelinux,dc=no \
390 -s base -x
'(associateddomain=
2.2.0.10.in-addr.arpa)
'
391 dnsttl, arecord, nsrecord, cnamerecord soarecord ptrrecord \
392 hinforecord mxrecord txtrecord rprecord aaaarecord locrecord \
393 srvrecord naptrrecord modifytimestamp
394 </pre
></blockquote
>
396 <p
>In Debian Edu/Lenny, the PowerDNS tree mode is used with
397 ou=hosts,dc=skole,dc=skolelinux,dc=no as the base, and these are two
398 example LDAP objects used there. In addition to these objects, the
399 parent objects all th way up to ou=hosts,dc=skole,dc=skolelinux,dc=no
400 also exist.
</p
>
402 <blockquote
><pre
>
403 dn: dc=tjener,dc=intern,ou=hosts,dc=skole,dc=skolelinux,dc=no
405 objectclass: dnsdomain
406 objectclass: domainrelatedobject
409 associateddomain: tjener.intern
411 dn: dc=
2,dc=
2,dc=
0,dc=
10,dc=in-addr,dc=arpa,ou=hosts,dc=skole,dc=skolelinux,dc=no
413 objectclass: dnsdomain2
414 objectclass: domainrelatedobject
416 ptrrecord: tjener.intern
417 associateddomain:
2.2.0.10.in-addr.arpa
418 </pre
></blockquote
>
420 <p
>In strict mode, the server behaves differently. When looking for
421 forward DNS entries, it is doing a
"subtree
" scoped search with the
422 same base as in the tree mode for a object with filter
423 "(associateddomain=tjener.intern)
" and requests the attributes dnsttl,
424 arecord, nsrecord, cnamerecord, soarecord, ptrrecord, hinforecord,
425 mxrecord, txtrecord, rprecord, aaaarecord, locrecord, srvrecord,
426 naptrrecord and modifytimestamp. For reverse entires it also do a
427 subtree scoped search but this time the filter is
"(arecord=
10.0.2.2)
"
428 and the requested attributes are associateddomain, dnsttl and
429 modifytimestamp. In short, in strict mode the objects with ptrrecord
430 go away, and the arecord attribute in the forward object is used
433 <p
>The forward and reverse searches can be simulated using ldapsearch
436 <blockquote
><pre
>
437 ldapsearch -h ldap -b ou=hosts,dc=skole,dc=skolelinux,dc=no -s sub -x \
438 '(associateddomain=tjener.intern)
' dNSTTL aRecord nSRecord \
439 cNAMERecord sOARecord pTRRecord hInfoRecord mXRecord tXTRecord \
440 rPRecord aFSDBRecord KeyRecord aAAARecord lOCRecord sRVRecord \
441 nAPTRRecord kXRecord certRecord dSRecord sSHFPRecord iPSecKeyRecord \
442 rRSIGRecord nSECRecord dNSKeyRecord dHCIDRecord sPFRecord modifyTimestamp
444 ldapsearch -h ldap -b ou=hosts,dc=skole,dc=skolelinux,dc=no -s sub -x \
445 '(arecord=
10.0.2.2)
' associateddomain dnsttl modifytimestamp
446 </pre
></blockquote
>
448 <p
>In addition to the forward and reverse searches , there is also a
449 search for SOA records, which behave similar to the forward and
450 reverse lookups.
</p
>
452 <p
>A thing to note with the PowerDNS behaviour is that it do not
453 specify any objectclass names, and instead look for the attributes it
454 need to generate a DNS reply. This make it able to work with any
455 objectclass that provide the needed attributes.
</p
>
457 <p
>The attributes are normally provided in the cosine (RFC
1274) and
458 dnsdomain2 schemas. The latter is used for reverse entries like
459 ptrrecord and recent DNS additions like aaaarecord and srvrecord.
</p
>
461 <p
>In Debian Edu, we have created DNS objects using the object classes
462 dcobject (for dc), dnsdomain or dnsdomain2 (structural, for the DNS
463 attributes) and domainrelatedobject (for associatedDomain). The use
464 of structural object classes make it impossible to combine these
465 classes with the object classes used by DHCP.
</p
>
467 <p
>There are other schemas that could be used too, for example the
468 dnszone structural object class used by Gosa and bind-sdb for the DNS
469 attributes combined with the domainrelatedobject object class, but in
470 this case some unused attributes would have to be included as well
471 (zonename and relativedomainname).
</p
>
473 <p
>My proposal for Debian Edu would be to switch PowerDNS to strict
474 mode and not use any of the existing objectclasses (dnsdomain,
475 dnsdomain2 and dnszone) when one want to combine the DNS information
476 with DHCP information, and instead create a auxiliary object class
477 defined something like this (using the attributes defined for
478 dnsdomain and dnsdomain2 or dnszone):
</p
>
480 <blockquote
><pre
>
481 objectclass ( some-oid NAME
'dnsDomainAux
'
484 MAY ( ARecord $ MDRecord $ MXRecord $ NSRecord $ SOARecord $ CNAMERecord $
485 DNSTTL $ DNSClass $ PTRRecord $ HINFORecord $ MINFORecord $
486 TXTRecord $ SIGRecord $ KEYRecord $ AAAARecord $ LOCRecord $
487 NXTRecord $ SRVRecord $ NAPTRRecord $ KXRecord $ CERTRecord $
488 A6Record $ DNAMERecord
490 </pre
></blockquote
>
492 <p
>This will allow any object to become a DNS entry when combined with
493 the domainrelatedobject object class, and allow any entity to include
494 all the attributes PowerDNS wants. I
've sent an email to the PowerDNS
495 developers asking for their view on this schema and if they are
496 interested in providing such schema with PowerDNS, and I hope my
497 message will be accepted into their mailing list soon.
</p
>
499 <p
><strong
>ISC dhcp
</strong
></p
>
501 <p
>The DHCP server searches for specific objectclass and requests all
502 the object attributes, and then uses the attributes it want. This
503 make it harder to figure out exactly what attributes are used, but
504 thanks to the working example in Debian Edu I can at least get an idea
505 what is needed without having to read the source code.
</p
>
507 <p
>In the DHCP server configuration, the LDAP base to use and the
508 search filter to use to locate the correct dhcpServer entity is
509 stored. These are the relevant entries from
510 /etc/dhcp3/dhcpd.conf:
</p
>
512 <blockquote
><pre
>
513 ldap-base-dn
"dc=skole,dc=skolelinux,dc=no
";
514 ldap-dhcp-server-cn
"dhcp
";
515 </pre
></blockquote
>
517 <p
>The DHCP server uses this information to nest all the DHCP
518 configuration it need. The cn
"dhcp
" is located using the given LDAP
519 base and the filter
"(
&(objectClass=dhcpServer)(cn=dhcp))
". The
520 search result is this entry:
</p
>
522 <blockquote
><pre
>
523 dn: cn=dhcp,dc=skole,dc=skolelinux,dc=no
526 objectClass: dhcpServer
527 dhcpServiceDN: cn=DHCP Config,dc=skole,dc=skolelinux,dc=no
528 </pre
></blockquote
>
530 <p
>The content of the dhcpServiceDN attribute is next used to locate the
531 subtree with DHCP configuration. The DHCP configuration subtree base
532 is located using a base scope search with base
"cn=DHCP
533 Config,dc=skole,dc=skolelinux,dc=no
" and filter
534 "(
&(objectClass=dhcpService)(|(dhcpPrimaryDN=cn=dhcp,dc=skole,dc=skolelinux,dc=no)(dhcpSecondaryDN=cn=dhcp,dc=skole,dc=skolelinux,dc=no)))
".
535 The search result is this entry:
</p
>
537 <blockquote
><pre
>
538 dn: cn=DHCP Config,dc=skole,dc=skolelinux,dc=no
541 objectClass: dhcpService
542 objectClass: dhcpOptions
543 dhcpPrimaryDN: cn=dhcp, dc=skole,dc=skolelinux,dc=no
544 dhcpStatements: ddns-update-style none
545 dhcpStatements: authoritative
546 dhcpOption: smtp-server code
69 = array of ip-address
547 dhcpOption: www-server code
72 = array of ip-address
548 dhcpOption: wpad-url code
252 = text
549 </pre
></blockquote
>
551 <p
>Next, the entire subtree is processed, one level at the time. When
552 all the DHCP configuration is loaded, it is ready to receive requests.
553 The subtree in Debian Edu contain objects with object classes
554 top/dhcpService/dhcpOptions, top/dhcpSharedNetwork/dhcpOptions,
555 top/dhcpSubnet, top/dhcpGroup and top/dhcpHost. These provide options
556 and information about netmasks, dynamic range etc. Leaving out the
557 details here because it is not relevant for the focus of my
558 investigation, which is to see if it is possible to merge dns and dhcp
559 related computer objects.
</p
>
561 <p
>When a DHCP request come in, LDAP is searched for the MAC address
562 of the client (
00:
00:
00:
00:
00:
00 in this example), using a subtree
563 scoped search with
"cn=DHCP Config,dc=skole,dc=skolelinux,dc=no
" as
564 the base and
"(
&(objectClass=dhcpHost)(dhcpHWAddress=ethernet
565 00:
00:
00:
00:
00:
00))
" as the filter. This is what a host object look
568 <blockquote
><pre
>
569 dn: cn=hostname,cn=group1,cn=THINCLIENTS,cn=DHCP Config,dc=skole,dc=skolelinux,dc=no
572 objectClass: dhcpHost
573 dhcpHWAddress: ethernet
00:
00:
00:
00:
00:
00
574 dhcpStatements: fixed-address hostname
575 </pre
></blockquote
>
577 <p
>There is less flexiblity in the way LDAP searches are done here.
578 The object classes need to have fixed names, and the configuration
579 need to be stored in a fairly specific LDAP structure. On the
580 positive side, the invidiual dhcpHost entires can be anywhere without
581 the DN pointed to by the dhcpServer entries. The latter should make
582 it possible to group all host entries in a subtree next to the
583 configuration entries, and this subtree can also be shared with the
584 DNS server if the schema proposed above is combined with the dhcpHost
585 structural object class.
587 <p
><strong
>Conclusion
</strong
></p
>
589 <p
>The PowerDNS implementation seem to be very flexible when it come
590 to which LDAP schemas to use. While its
"tree
" mode is rigid when it
591 come to the the LDAP structure, the
"strict
" mode is very flexible,
592 allowing DNS objects to be stored anywhere under the base cn specified
593 in the configuration.
</p
>
595 <p
>The DHCP implementation on the other hand is very inflexible, both
596 regarding which LDAP schemas to use and which LDAP structure to use.
597 I guess one could implement ones own schema, as long as the
598 objectclasses and attributes have the names used, but this do not
599 really help when the DHCP subtree need to have a fairly fixed
602 <p
>Based on the observed behaviour, I suspect a LDAP structure like
603 this might work for Debian Edu:
</p
>
605 <blockquote
><pre
>
607 cn=machine-info (dhcpService) - dhcpServiceDN points here
609 cn=dhcp-internal (dhcpSharedNetwork/dhcpOptions)
610 cn=
10.0.2.0 (dhcpSubnet)
611 cn=group1 (dhcpGroup/dhcpOptions)
612 cn=dhcp-thinclients (dhcpSharedNetwork/dhcpOptions)
613 cn=
192.168.0.0 (dhcpSubnet)
614 cn=group1 (dhcpGroup/dhcpOptions)
615 ou=machines - PowerDNS base points here
616 cn=hostname (dhcpHost/domainrelatedobject/dnsDomainAux)
617 </pre
></blockquote
>
619 <P
>This is not tested yet. If the DHCP server require the dhcpHost
620 entries to be in the dhcpGroup subtrees, the entries can be stored
621 there instead of a common machines subtree, and the PowerDNS base
622 would have to be moved one level up to the machine-info subtree.
</p
>
624 <p
>The combined object under the machines subtree would look something
627 <blockquote
><pre
>
628 dn: dc=hostname,ou=machines,cn=machine-info,dc=skole,dc=skolelinux,dc=no
631 objectClass: dhcpHost
632 objectclass: domainrelatedobject
633 objectclass: dnsDomainAux
634 associateddomain: hostname.intern
636 dhcpHWAddress: ethernet
00:
00:
00:
00:
00:
00
637 dhcpStatements: fixed-address hostname.intern
638 </pre
></blockquote
>
640 </p
>One could even add the LTSP configuration associated with a given
641 machine, as long as the required attributes are available in a
642 auxiliary object class.
</p
>
647 <title>Combining PowerDNS and ISC DHCP LDAP objects
</title>
648 <link>http://people.skolelinux.org/pere/blog/Combining_PowerDNS_and_ISC_DHCP_LDAP_objects.html
</link>
649 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Combining_PowerDNS_and_ISC_DHCP_LDAP_objects.html
</guid>
650 <pubDate>Wed,
14 Jul
2010 23:
45:
00 +
0200</pubDate>
652 <p
>For a while now, I have wanted to find a way to change the DNS and
653 DHCP services in Debian Edu to use the same LDAP objects for a given
654 computer, to avoid the possibility of having a inconsistent state for
655 a computer in LDAP (as in DHCP but no DNS entry or the other way
656 around) and make it easier to add computers to LDAP.
</p
>
658 <p
>I
've looked at how powerdns and dhcpd is using LDAP, and using this
659 information finally found a solution that seem to work.
</p
>
661 <p
>The old setup required three LDAP objects for a given computer.
662 One forward DNS entry, one reverse DNS entry and one DHCP entry. If
663 we switch powerdns to use its strict LDAP method (ldap-method=strict
664 in pdns-debian-edu.conf), the forward and reverse DNS entries are
665 merged into one while making it impossible to transfer the reverse map
666 to a slave DNS server.
</p
>
668 <p
>If we also replace the object class used to get the DNS related
669 attributes to one allowing these attributes to be combined with the
670 dhcphost object class, we can merge the DNS and DHCP entries into one.
671 I
've written such object class in the dnsdomainaux.schema file (need
672 proper OIDs, but that is a minor issue), and tested the setup. It
673 seem to work.
</p
>
675 <p
>With this test setup in place, we can get away with one LDAP object
676 for both DNS and DHCP, and even the LTSP configuration I suggested in
677 an earlier email. The combined LDAP object will look something like
680 <blockquote
><pre
>
681 dn: cn=hostname,cn=group1,cn=THINCLIENTS,cn=DHCP Config,dc=skole,dc=skolelinux,dc=no
683 objectClass: dhcphost
684 objectclass: domainrelatedobject
685 objectclass: dnsdomainaux
686 associateddomain: hostname.intern
688 dhcphwaddress: ethernet
00:
00:
00:
00:
00:
00
689 dhcpstatements: fixed-address hostname
691 </pre
></blockquote
>
693 <p
>The DNS server uses the associateddomain and arecord entries, while
694 the DHCP server uses the dhcphwaddress and dhcpstatements entries
695 before asking DNS to resolve the fixed-adddress. LTSP will use
696 dhcphwaddress or associateddomain and the ldapconfig* attributes.
</p
>
698 <p
>I am not yet sure if I can get the DHCP server to look for its
699 dhcphost in a different location, to allow us to put the objects
700 outside the
"DHCP Config
" subtree, but hope to figure out a way to do
701 that. If I can
't figure out a way to do that, we can still get rid of
702 the hosts subtree and move all its content into the DHCP Config tree
703 (which probably should be renamed to be more related to the new
704 content. I suspect cn=dnsdhcp,ou=services or something like that
705 might be a good place to put it.
</p
>
707 <p
>If you want to help out with implementing this for Debian Edu,
708 please contact us on debian-edu@lists.debian.org.
</p
>
713 <title>Idea for storing LTSP configuration in LDAP
</title>
714 <link>http://people.skolelinux.org/pere/blog/Idea_for_storing_LTSP_configuration_in_LDAP.html
</link>
715 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Idea_for_storing_LTSP_configuration_in_LDAP.html
</guid>
716 <pubDate>Sun,
11 Jul
2010 22:
00:
00 +
0200</pubDate>
718 <p
>Vagrant mentioned on IRC today that ltsp_config now support
719 sourcing files from /usr/share/ltsp/ltsp_config.d/ on the thin
720 clients, and that this can be used to fetch configuration from LDAP if
721 Debian Edu choose to store configuration there.
</p
>
723 <p
>Armed with this information, I got inspired and wrote a test module
724 to get configuration from LDAP. The idea is to look up the MAC
725 address of the client in LDAP, and look for attributes on the form
726 ltspconfigsetting=value, and use this to export SETTING=value to the
727 LTSP clients.
</p
>
729 <p
>The goal is to be able to store the LTSP configuration attributes
730 in a
"computer
" LDAP object used by both DNS and DHCP, and thus
731 allowing us to store all information about a computer in one place.
</p
>
733 <p
>This is a untested draft implementation, and I welcome feedback on
734 this approach. A real LDAP schema for the ltspClientAux objectclass
735 need to be written. Comments, suggestions, etc?
</p
>
737 <blockquote
><pre
>
738 # Store in /opt/ltsp/$arch/usr/share/ltsp/ltsp_config.d/ldap-config
740 # Fetch LTSP client settings from LDAP based on MAC address
742 # Uses ethernet address as stored in the dhcpHost objectclass using
743 # the dhcpHWAddress attribute or ethernet address stored in the
744 # ieee802Device objectclass with the macAddress attribute.
746 # This module is written to be schema agnostic, and only depend on the
747 # existence of attribute names.
749 # The LTSP configuration variables are saved directly using a
750 # ltspConfig prefix and uppercasing the rest of the attribute name.
751 # To set the SERVER variable, set the ltspConfigServer attribute.
753 # Some LDAP schema should be created with all the relevant
754 # configuration settings. Something like this should work:
756 # objectclass (
1.1.2.2 NAME
'ltspClientAux
'
759 # MAY ( ltspConfigServer $ ltsConfigSound $ ... )
761 LDAPSERVER=$(debian-edu-ldapserver)
762 if [
"$LDAPSERVER
" ] ; then
763 LDAPBASE=$(debian-edu-ldapserver -b)
764 for MAC in $(LANG=C ifconfig |grep -i hwaddr| awk
'{print $
5}
'|sort -u) ; do
765 filter=
"(|(dhcpHWAddress=ethernet $MAC)(macAddress=$MAC))
"
766 ldapsearch -h
"$LDAPSERVER
" -b
"$LDAPBASE
" -v -x
"$filter
" | \
767 grep
'^ltspConfig
' | while read attr value ; do
768 # Remove prefix and convert to upper case
769 attr=$(echo $attr | sed
's/^ltspConfig//i
' | tr a-z A-Z)
770 # bass value on to clients
771 eval
"$attr=$value; export $attr
"
775 </pre
></blockquote
>
777 <p
>I
'm not sure this shell construction will work, because I suspect
778 the while block might end up in a subshell causing the variables set
779 there to not show up in ltsp-config, but if that is the case I am sure
780 the code can be restructured to make sure the variables are passed on.
781 I expect that can be solved with some testing. :)
</p
>
783 <p
>If you want to help out with implementing this for Debian Edu,
784 please contact us on debian-edu@lists.debian.org.
</p
>
786 <p
>Update
2010-
07-
17: I am aware of another effort to store LTSP
787 configuration in LDAP that was created around year
2000 by
788 <a href=
"http://www.pcxperience.com/thinclient/documentation/ldap.html
">PC
789 Xperience, Inc.,
2000</a
>. I found its
790 <a href=
"http://people.redhat.com/alikins/ltsp/ldap/
">files
</a
> on a
791 personal home page over at redhat.com.
</p
>
796 <title>jXplorer, a very nice LDAP GUI
</title>
797 <link>http://people.skolelinux.org/pere/blog/jXplorer__a_very_nice_LDAP_GUI.html
</link>
798 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/jXplorer__a_very_nice_LDAP_GUI.html
</guid>
799 <pubDate>Fri,
9 Jul
2010 12:
55:
00 +
0200</pubDate>
802 <a href=
"http://people.skolelinux.org/pere/blog/LUMA__a_very_nice_LDAP_GUI.html
">my
803 last post
</a
> about available LDAP tools in Debian, I was told about a
804 LDAP GUI that is even better than luma. The java application
805 <a href=
"http://jxplorer.org/
">jXplorer
</a
> is claimed to be capable of
806 moving LDAP objects and subtrees using drag-and-drop, and can
807 authenticate using Kerberos. I have only tested the Kerberos
808 authentication, but do not have a LDAP setup allowing me to rewrite
809 LDAP with my test user yet. It is
810 <a href=
"http://packages.qa.debian.org/j/jxplorer.html
">available in
811 Debian
</a
> testing and unstable at the moment. The only problem I
812 have with it is how it handle errors. If something go wrong, its
813 non-intuitive behaviour require me to go through some query work list
814 and remove the failing query. Nothing big, but very annoying.
</p
>