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>One step closer to single signon in Debian Edu
</title>
11 <link>http://people.skolelinux.org/pere/blog/One_step_closer_to_single_signon_in_Debian_Edu.html
</link>
12 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/One_step_closer_to_single_signon_in_Debian_Edu.html
</guid>
13 <pubDate>Sun,
25 Jul
2010 10:
00:
00 +
0200</pubDate>
15 <p
>The last few months me and the other Debian Edu developers have
16 been working hard to get the Debian/Squeeze based version of Debian
17 Edu/Skolelinux into shape. This future version will use Kerberos for
18 authentication, and services are slowly migrated to single signon,
19 getting rid of password questions one at the time.
</p
>
21 <p
>It will also feature a roaming workstation profile with local home
22 directory, for laptops that are only some times on the Skolelinux
23 network, and for this profile a shortcut is created in Gnome and KDE
24 to gain access to the users home directory on the file server. This
25 shortcut uses SMB at the moment, and yesterday I had time to test if
26 SMB mounting had started working in KDE after we added the cifs-utils
27 package. I was pleasantly surprised how well it worked.
</p
>
29 <p
>Thanks to the recent changes to our samba configuration to get it
30 to use Kerberos for authentication, there were no question about user
31 password when mounting the SMB volume. A simple click on the shortcut
32 in the KDE menu, and a window with the home directory popped
35 <p
>One step closer to a single signon solution out of the box in
36 Debian Edu. We already had PAM, LDAP, IMAP and SMTP in place, and now
37 also Samba. Next step is Cups and hopefully also NFS.
</p
>
39 <p
>We had planned a alpha0 release of Debian Edu for today, but thanks
40 to the autobuilder administrators for some architectures being slow to
41 sign packages, we are still missing the fixed LTSP package we need for
42 the release. It was uploaded three days ago with urgency=high, and if
43 it had entered testing yesterday we would have been able to test it in
44 time for a alpha0 release today. As the binaries for ia64 and powerpc
45 still not uploaded to the Debian archive, we need to delay the alpha
46 release another day.
</p
>
48 <p
>If you want to help out with implementing Kerberos for Debian Edu,
49 please contact us on debian-edu@lists.debian.org.
</p
>
54 <title>Digitale restriksjonsmekanismer fikk meg til å slutte å kjøpe musikk
</title>
55 <link>http://people.skolelinux.org/pere/blog/Digitale_restriksjonsmekanismer_fikk_meg_til____slutte____kj__pe_musikk.html
</link>
56 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Digitale_restriksjonsmekanismer_fikk_meg_til____slutte____kj__pe_musikk.html
</guid>
57 <pubDate>Thu,
22 Jul
2010 23:
50:
00 +
0200</pubDate>
59 <p
>For mange år siden slutte jeg å kjøpe musikk-CDer. Årsaken var at
60 musikkbransjen var godt i gang med å selge platene sine med DRM som
61 gjorde at jeg ikke fikk spilt av musikken jeg kjøpte på utstyret jeg
62 hadde tilgjengelig, dvs. min datamaskin. Det var umulig å se på en
63 plate om den var ødelagt eller ikke, og jeg hadde jo allerede en
64 anseelig samling med plater, så jeg bestemme meg for å slutte å gi
65 penger til en bransje som åpenbart ikke respekterte meg.
</p
>
67 <p
>Jeg har mange titalls dager med musikk på CD i dag. Det meste er
68 lagt i et stort arkiv som kan spilles av fra husets datamaskiner (har
69 ikke rukket rippe alt). Jeg ser dermed ikke behovet for å skaffe mer
70 musikk. De fleste av mine favoritter er i hus, og jeg er dermed godt
73 <p
>Hvis musikkbransjen ønsker mine penger, så må de demonstrere at de
74 setter pris på meg som kunde, og ikke skremme meg bort med DRM og
75 antydninger om at kundene er kriminelle.
</p
>
77 <p
>Filmbransjen er like ille, men mens musikk gjerne varer lenge, er
78 filmer mer ferskvare. Har dermed ikke helt sluttet å kjøpe filmer, men
79 holder meg til DVD-filmer som kan spilles av på mine Linuxbokser.
80 Kommer neppe til å ta i bruk Blueray, og ei heller de nye DRM-greiene
81 «Ultraviolet» som be annonsert her om dagen.
</p
>
86 <title>OpenStreetmap one step closer to having routing on its front page
</title>
87 <link>http://people.skolelinux.org/pere/blog/OpenStreetmap_one_step_closer_to_having_routing_on_its_front_page.html
</link>
88 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/OpenStreetmap_one_step_closer_to_having_routing_on_its_front_page.html
</guid>
89 <pubDate>Sun,
18 Jul
2010 16:
45:
00 +
0200</pubDate>
92 <a href=
"http://feedproxy.google.com/~r/Opengeodata/~
3/wUTCzDZk3lc/project-of-the-week-which-way-home
">todays
93 opengeodata blog entry
</a
>, I just discovered that the
94 OpenStreetmap.org site have gotten
95 <a href=
"http://nroets.dev.openstreetmap.org/demo/index.html?layers=B000FTFTT
">support
96 for calculating routes
</a
>. The support is still experimental and
97 only available from the development server, until more experience is
98 gathered on the user interface and any scalability issues.
</p
>
100 <p
>Earlier, the routing I knew about using the OpenStreetmap.org data
101 was provided by
<a href=
"http://maps.cloudmade.com/
">Cloudmade
</a
>,
102 but having it on the main page is required to make everyone aware of
103 the issue. I
've had people reject Openstreetmap.org as a viable
104 alternative for them because the front page lacked routing support,
105 and I hope their needs will be catered for when routing show up on the
106 www.openstreetmap.org front page.
</p
>
111 <title>What are they searching for - PowerDNS and ISC DHCP in LDAP
</title>
112 <link>http://people.skolelinux.org/pere/blog/What_are_they_searching_for___PowerDNS_and_ISC_DHCP_in_LDAP.html
</link>
113 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/What_are_they_searching_for___PowerDNS_and_ISC_DHCP_in_LDAP.html
</guid>
114 <pubDate>Sat,
17 Jul
2010 21:
00:
00 +
0200</pubDate>
117 <a href=
"http://people.skolelinux.org/pere/blog/Time_for_new__LDAP_schemas_replacing_RFC_2307_.html
">followup
</a
>
119 <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
121 <a href=
"http://people.skolelinux.org/pere/blog/Combining_PowerDNS_and_ISC_DHCP_LDAP_objects.html
">merging
122 all
</a
> the computer related LDAP objects in Debian Edu.
</p
>
124 <p
>As a step to try to see if it possible to merge the DNS and DHCP
125 LDAP objects, I have had a look at how the packages pdns-backend-ldap
126 and dhcp3-server-ldap in Debian use the LDAP server. The two
127 implementations are quite different in how they use LDAP.
</p
>
129 To get this information, I started slapd with debugging enabled and
130 dumped the debug output to a file to get the LDAP searches performed
131 on a Debian Edu main-server. Here is a summary.
133 <p
><strong
>powerdns
</strong
></p
>
135 <a href=
"http://www.linuxnetworks.de/doc/index.php/PowerDNS_LDAP_Backend
">Clues
136 on how to
</a
> set up PowerDNS to use a LDAP backend is available on
139 <p
>PowerDNS have two modes of operation using LDAP as its backend.
140 One
"strict
" mode where the forward and reverse DNS lookups are done
141 using the same LDAP objects, and a
"tree
" mode where the forward and
142 reverse entries are in two different subtrees in LDAP with a structure
143 based on the DNS names, as in tjener.intern and
144 2.2.0.10.in-addr.arpa.
</p
>
146 <p
>In tree mode, the server is set up to use a LDAP subtree as its
147 base, and uses a
"base
" scoped search for the DNS name by adding
148 "dc=tjener,dc=intern,
" to the base with a filter for
149 "(associateddomain=tjener.intern)
" for the forward entry and
150 "dc=
2,dc=
2,dc=
0,dc=
10,dc=in-addr,dc=arpa,
" with a filter for
151 "(associateddomain=
2.2.0.10.in-addr.arpa)
" for the reverse entry. For
152 forward entries, it is looking for attributes named dnsttl, arecord,
153 nsrecord, cnamerecord, soarecord, ptrrecord, hinforecord, mxrecord,
154 txtrecord, rprecord, afsdbrecord, keyrecord, aaaarecord, locrecord,
155 srvrecord, naptrrecord, kxrecord, certrecord, dsrecord, sshfprecord,
156 ipseckeyrecord, rrsigrecord, nsecrecord, dnskeyrecord, dhcidrecord,
157 spfrecord and modifytimestamp. For reverse entries it is looking for
158 the attributes dnsttl, arecord, nsrecord, cnamerecord, soarecord,
159 ptrrecord, hinforecord, mxrecord, txtrecord, rprecord, aaaarecord,
160 locrecord, srvrecord, naptrrecord and modifytimestamp. The equivalent
161 ldapsearch commands could look like this:
</p
>
163 <blockquote
><pre
>
165 -b dc=tjener,dc=intern,ou=hosts,dc=skole,dc=skolelinux,dc=no \
166 -s base -x
'(associateddomain=tjener.intern)
' dNSTTL aRecord nSRecord \
167 cNAMERecord sOARecord pTRRecord hInfoRecord mXRecord tXTRecord \
168 rPRecord aFSDBRecord KeyRecord aAAARecord lOCRecord sRVRecord \
169 nAPTRRecord kXRecord certRecord dSRecord sSHFPRecord iPSecKeyRecord \
170 rRSIGRecord nSECRecord dNSKeyRecord dHCIDRecord sPFRecord modifyTimestamp
173 -b dc=
2,dc=
2,dc=
0,dc=
10,dc=in-addr,dc=arpa,ou=hosts,dc=skole,dc=skolelinux,dc=no \
174 -s base -x
'(associateddomain=
2.2.0.10.in-addr.arpa)
'
175 dnsttl, arecord, nsrecord, cnamerecord soarecord ptrrecord \
176 hinforecord mxrecord txtrecord rprecord aaaarecord locrecord \
177 srvrecord naptrrecord modifytimestamp
178 </pre
></blockquote
>
180 <p
>In Debian Edu/Lenny, the PowerDNS tree mode is used with
181 ou=hosts,dc=skole,dc=skolelinux,dc=no as the base, and these are two
182 example LDAP objects used there. In addition to these objects, the
183 parent objects all th way up to ou=hosts,dc=skole,dc=skolelinux,dc=no
184 also exist.
</p
>
186 <blockquote
><pre
>
187 dn: dc=tjener,dc=intern,ou=hosts,dc=skole,dc=skolelinux,dc=no
189 objectclass: dnsdomain
190 objectclass: domainrelatedobject
193 associateddomain: tjener.intern
195 dn: dc=
2,dc=
2,dc=
0,dc=
10,dc=in-addr,dc=arpa,ou=hosts,dc=skole,dc=skolelinux,dc=no
197 objectclass: dnsdomain2
198 objectclass: domainrelatedobject
200 ptrrecord: tjener.intern
201 associateddomain:
2.2.0.10.in-addr.arpa
202 </pre
></blockquote
>
204 <p
>In strict mode, the server behaves differently. When looking for
205 forward DNS entries, it is doing a
"subtree
" scoped search with the
206 same base as in the tree mode for a object with filter
207 "(associateddomain=tjener.intern)
" and requests the attributes dnsttl,
208 arecord, nsrecord, cnamerecord, soarecord, ptrrecord, hinforecord,
209 mxrecord, txtrecord, rprecord, aaaarecord, locrecord, srvrecord,
210 naptrrecord and modifytimestamp. For reverse entires it also do a
211 subtree scoped search but this time the filter is
"(arecord=
10.0.2.2)
"
212 and the requested attributes are associateddomain, dnsttl and
213 modifytimestamp. In short, in strict mode the objects with ptrrecord
214 go away, and the arecord attribute in the forward object is used
217 <p
>The forward and reverse searches can be simulated using ldapsearch
220 <blockquote
><pre
>
221 ldapsearch -h ldap -b ou=hosts,dc=skole,dc=skolelinux,dc=no -s sub -x \
222 '(associateddomain=tjener.intern)
' dNSTTL aRecord nSRecord \
223 cNAMERecord sOARecord pTRRecord hInfoRecord mXRecord tXTRecord \
224 rPRecord aFSDBRecord KeyRecord aAAARecord lOCRecord sRVRecord \
225 nAPTRRecord kXRecord certRecord dSRecord sSHFPRecord iPSecKeyRecord \
226 rRSIGRecord nSECRecord dNSKeyRecord dHCIDRecord sPFRecord modifyTimestamp
228 ldapsearch -h ldap -b ou=hosts,dc=skole,dc=skolelinux,dc=no -s sub -x \
229 '(arecord=
10.0.2.2)
' associateddomain dnsttl modifytimestamp
230 </pre
></blockquote
>
232 <p
>In addition to the forward and reverse searches , there is also a
233 search for SOA records, which behave similar to the forward and
234 reverse lookups.
</p
>
236 <p
>A thing to note with the PowerDNS behaviour is that it do not
237 specify any objectclass names, and instead look for the attributes it
238 need to generate a DNS reply. This make it able to work with any
239 objectclass that provide the needed attributes.
</p
>
241 <p
>The attributes are normally provided in the cosine (RFC
1274) and
242 dnsdomain2 schemas. The latter is used for reverse entries like
243 ptrrecord and recent DNS additions like aaaarecord and srvrecord.
</p
>
245 <p
>In Debian Edu, we have created DNS objects using the object classes
246 dcobject (for dc), dnsdomain or dnsdomain2 (structural, for the DNS
247 attributes) and domainrelatedobject (for associatedDomain). The use
248 of structural object classes make it impossible to combine these
249 classes with the object classes used by DHCP.
</p
>
251 <p
>There are other schemas that could be used too, for example the
252 dnszone structural object class used by Gosa and bind-sdb for the DNS
253 attributes combined with the domainrelatedobject object class, but in
254 this case some unused attributes would have to be included as well
255 (zonename and relativedomainname).
</p
>
257 <p
>My proposal for Debian Edu would be to switch PowerDNS to strict
258 mode and not use any of the existing objectclasses (dnsdomain,
259 dnsdomain2 and dnszone) when one want to combine the DNS information
260 with DHCP information, and instead create a auxiliary object class
261 defined something like this (using the attributes defined for
262 dnsdomain and dnsdomain2 or dnszone):
</p
>
264 <blockquote
><pre
>
265 objectclass ( some-oid NAME
'dnsDomainAux
'
268 MAY ( ARecord $ MDRecord $ MXRecord $ NSRecord $ SOARecord $ CNAMERecord $
269 DNSTTL $ DNSClass $ PTRRecord $ HINFORecord $ MINFORecord $
270 TXTRecord $ SIGRecord $ KEYRecord $ AAAARecord $ LOCRecord $
271 NXTRecord $ SRVRecord $ NAPTRRecord $ KXRecord $ CERTRecord $
272 A6Record $ DNAMERecord
274 </pre
></blockquote
>
276 <p
>This will allow any object to become a DNS entry when combined with
277 the domainrelatedobject object class, and allow any entity to include
278 all the attributes PowerDNS wants. I
've sent an email to the PowerDNS
279 developers asking for their view on this schema and if they are
280 interested in providing such schema with PowerDNS, and I hope my
281 message will be accepted into their mailing list soon.
</p
>
283 <p
><strong
>ISC dhcp
</strong
></p
>
285 <p
>The DHCP server searches for specific objectclass and requests all
286 the object attributes, and then uses the attributes it want. This
287 make it harder to figure out exactly what attributes are used, but
288 thanks to the working example in Debian Edu I can at least get an idea
289 what is needed without having to read the source code.
</p
>
291 <p
>In the DHCP server configuration, the LDAP base to use and the
292 search filter to use to locate the correct dhcpServer entity is
293 stored. These are the relevant entries from
294 /etc/dhcp3/dhcpd.conf:
</p
>
296 <blockquote
><pre
>
297 ldap-base-dn
"dc=skole,dc=skolelinux,dc=no
";
298 ldap-dhcp-server-cn
"dhcp
";
299 </pre
></blockquote
>
301 <p
>The DHCP server uses this information to nest all the DHCP
302 configuration it need. The cn
"dhcp
" is located using the given LDAP
303 base and the filter
"(
&(objectClass=dhcpServer)(cn=dhcp))
". The
304 search result is this entry:
</p
>
306 <blockquote
><pre
>
307 dn: cn=dhcp,dc=skole,dc=skolelinux,dc=no
310 objectClass: dhcpServer
311 dhcpServiceDN: cn=DHCP Config,dc=skole,dc=skolelinux,dc=no
312 </pre
></blockquote
>
314 <p
>The content of the dhcpServiceDN attribute is next used to locate the
315 subtree with DHCP configuration. The DHCP configuration subtree base
316 is located using a base scope search with base
"cn=DHCP
317 Config,dc=skole,dc=skolelinux,dc=no
" and filter
318 "(
&(objectClass=dhcpService)(|(dhcpPrimaryDN=cn=dhcp,dc=skole,dc=skolelinux,dc=no)(dhcpSecondaryDN=cn=dhcp,dc=skole,dc=skolelinux,dc=no)))
".
319 The search result is this entry:
</p
>
321 <blockquote
><pre
>
322 dn: cn=DHCP Config,dc=skole,dc=skolelinux,dc=no
325 objectClass: dhcpService
326 objectClass: dhcpOptions
327 dhcpPrimaryDN: cn=dhcp, dc=skole,dc=skolelinux,dc=no
328 dhcpStatements: ddns-update-style none
329 dhcpStatements: authoritative
330 dhcpOption: smtp-server code
69 = array of ip-address
331 dhcpOption: www-server code
72 = array of ip-address
332 dhcpOption: wpad-url code
252 = text
333 </pre
></blockquote
>
335 <p
>Next, the entire subtree is processed, one level at the time. When
336 all the DHCP configuration is loaded, it is ready to receive requests.
337 The subtree in Debian Edu contain objects with object classes
338 top/dhcpService/dhcpOptions, top/dhcpSharedNetwork/dhcpOptions,
339 top/dhcpSubnet, top/dhcpGroup and top/dhcpHost. These provide options
340 and information about netmasks, dynamic range etc. Leaving out the
341 details here because it is not relevant for the focus of my
342 investigation, which is to see if it is possible to merge dns and dhcp
343 related computer objects.
</p
>
345 <p
>When a DHCP request come in, LDAP is searched for the MAC address
346 of the client (
00:
00:
00:
00:
00:
00 in this example), using a subtree
347 scoped search with
"cn=DHCP Config,dc=skole,dc=skolelinux,dc=no
" as
348 the base and
"(
&(objectClass=dhcpHost)(dhcpHWAddress=ethernet
349 00:
00:
00:
00:
00:
00))
" as the filter. This is what a host object look
352 <blockquote
><pre
>
353 dn: cn=hostname,cn=group1,cn=THINCLIENTS,cn=DHCP Config,dc=skole,dc=skolelinux,dc=no
356 objectClass: dhcpHost
357 dhcpHWAddress: ethernet
00:
00:
00:
00:
00:
00
358 dhcpStatements: fixed-address hostname
359 </pre
></blockquote
>
361 <p
>There is less flexiblity in the way LDAP searches are done here.
362 The object classes need to have fixed names, and the configuration
363 need to be stored in a fairly specific LDAP structure. On the
364 positive side, the invidiual dhcpHost entires can be anywhere without
365 the DN pointed to by the dhcpServer entries. The latter should make
366 it possible to group all host entries in a subtree next to the
367 configuration entries, and this subtree can also be shared with the
368 DNS server if the schema proposed above is combined with the dhcpHost
369 structural object class.
371 <p
><strong
>Conclusion
</strong
></p
>
373 <p
>The PowerDNS implementation seem to be very flexible when it come
374 to which LDAP schemas to use. While its
"tree
" mode is rigid when it
375 come to the the LDAP structure, the
"strict
" mode is very flexible,
376 allowing DNS objects to be stored anywhere under the base cn specified
377 in the configuration.
</p
>
379 <p
>The DHCP implementation on the other hand is very inflexible, both
380 regarding which LDAP schemas to use and which LDAP structure to use.
381 I guess one could implement ones own schema, as long as the
382 objectclasses and attributes have the names used, but this do not
383 really help when the DHCP subtree need to have a fairly fixed
386 <p
>Based on the observed behaviour, I suspect a LDAP structure like
387 this might work for Debian Edu:
</p
>
389 <blockquote
><pre
>
391 cn=machine-info (dhcpService) - dhcpServiceDN points here
393 cn=dhcp-internal (dhcpSharedNetwork/dhcpOptions)
394 cn=
10.0.2.0 (dhcpSubnet)
395 cn=group1 (dhcpGroup/dhcpOptions)
396 cn=dhcp-thinclients (dhcpSharedNetwork/dhcpOptions)
397 cn=
192.168.0.0 (dhcpSubnet)
398 cn=group1 (dhcpGroup/dhcpOptions)
399 ou=machines - PowerDNS base points here
400 cn=hostname (dhcpHost/domainrelatedobject/dnsDomainAux)
401 </pre
></blockquote
>
403 <P
>This is not tested yet. If the DHCP server require the dhcpHost
404 entries to be in the dhcpGroup subtrees, the entries can be stored
405 there instead of a common machines subtree, and the PowerDNS base
406 would have to be moved one level up to the machine-info subtree.
</p
>
408 <p
>The combined object under the machines subtree would look something
411 <blockquote
><pre
>
412 dn: dc=hostname,ou=machines,cn=machine-info,dc=skole,dc=skolelinux,dc=no
415 objectClass: dhcpHost
416 objectclass: domainrelatedobject
417 objectclass: dnsDomainAux
418 associateddomain: hostname.intern
420 dhcpHWAddress: ethernet
00:
00:
00:
00:
00:
00
421 dhcpStatements: fixed-address hostname.intern
422 </pre
></blockquote
>
424 </p
>One could even add the LTSP configuration associated with a given
425 machine, as long as the required attributes are available in a
426 auxiliary object class.
</p
>
431 <title>Combining PowerDNS and ISC DHCP LDAP objects
</title>
432 <link>http://people.skolelinux.org/pere/blog/Combining_PowerDNS_and_ISC_DHCP_LDAP_objects.html
</link>
433 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Combining_PowerDNS_and_ISC_DHCP_LDAP_objects.html
</guid>
434 <pubDate>Wed,
14 Jul
2010 23:
45:
00 +
0200</pubDate>
436 <p
>For a while now, I have wanted to find a way to change the DNS and
437 DHCP services in Debian Edu to use the same LDAP objects for a given
438 computer, to avoid the possibility of having a inconsistent state for
439 a computer in LDAP (as in DHCP but no DNS entry or the other way
440 around) and make it easier to add computers to LDAP.
</p
>
442 <p
>I
've looked at how powerdns and dhcpd is using LDAP, and using this
443 information finally found a solution that seem to work.
</p
>
445 <p
>The old setup required three LDAP objects for a given computer.
446 One forward DNS entry, one reverse DNS entry and one DHCP entry. If
447 we switch powerdns to use its strict LDAP method (ldap-method=strict
448 in pdns-debian-edu.conf), the forward and reverse DNS entries are
449 merged into one while making it impossible to transfer the reverse map
450 to a slave DNS server.
</p
>
452 <p
>If we also replace the object class used to get the DNS related
453 attributes to one allowing these attributes to be combined with the
454 dhcphost object class, we can merge the DNS and DHCP entries into one.
455 I
've written such object class in the dnsdomainaux.schema file (need
456 proper OIDs, but that is a minor issue), and tested the setup. It
457 seem to work.
</p
>
459 <p
>With this test setup in place, we can get away with one LDAP object
460 for both DNS and DHCP, and even the LTSP configuration I suggested in
461 an earlier email. The combined LDAP object will look something like
464 <blockquote
><pre
>
465 dn: cn=hostname,cn=group1,cn=THINCLIENTS,cn=DHCP Config,dc=skole,dc=skolelinux,dc=no
467 objectClass: dhcphost
468 objectclass: domainrelatedobject
469 objectclass: dnsdomainaux
470 associateddomain: hostname.intern
472 dhcphwaddress: ethernet
00:
00:
00:
00:
00:
00
473 dhcpstatements: fixed-address hostname
475 </pre
></blockquote
>
477 <p
>The DNS server uses the associateddomain and arecord entries, while
478 the DHCP server uses the dhcphwaddress and dhcpstatements entries
479 before asking DNS to resolve the fixed-adddress. LTSP will use
480 dhcphwaddress or associateddomain and the ldapconfig* attributes.
</p
>
482 <p
>I am not yet sure if I can get the DHCP server to look for its
483 dhcphost in a different location, to allow us to put the objects
484 outside the
"DHCP Config
" subtree, but hope to figure out a way to do
485 that. If I can
't figure out a way to do that, we can still get rid of
486 the hosts subtree and move all its content into the DHCP Config tree
487 (which probably should be renamed to be more related to the new
488 content. I suspect cn=dnsdhcp,ou=services or something like that
489 might be a good place to put it.
</p
>
491 <p
>If you want to help out with implementing this for Debian Edu,
492 please contact us on debian-edu@lists.debian.org.
</p
>
497 <title>Idea for storing LTSP configuration in LDAP
</title>
498 <link>http://people.skolelinux.org/pere/blog/Idea_for_storing_LTSP_configuration_in_LDAP.html
</link>
499 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Idea_for_storing_LTSP_configuration_in_LDAP.html
</guid>
500 <pubDate>Sun,
11 Jul
2010 22:
00:
00 +
0200</pubDate>
502 <p
>Vagrant mentioned on IRC today that ltsp_config now support
503 sourcing files from /usr/share/ltsp/ltsp_config.d/ on the thin
504 clients, and that this can be used to fetch configuration from LDAP if
505 Debian Edu choose to store configuration there.
</p
>
507 <p
>Armed with this information, I got inspired and wrote a test module
508 to get configuration from LDAP. The idea is to look up the MAC
509 address of the client in LDAP, and look for attributes on the form
510 ltspconfigsetting=value, and use this to export SETTING=value to the
511 LTSP clients.
</p
>
513 <p
>The goal is to be able to store the LTSP configuration attributes
514 in a
"computer
" LDAP object used by both DNS and DHCP, and thus
515 allowing us to store all information about a computer in one place.
</p
>
517 <p
>This is a untested draft implementation, and I welcome feedback on
518 this approach. A real LDAP schema for the ltspClientAux objectclass
519 need to be written. Comments, suggestions, etc?
</p
>
521 <blockquote
><pre
>
522 # Store in /opt/ltsp/$arch/usr/share/ltsp/ltsp_config.d/ldap-config
524 # Fetch LTSP client settings from LDAP based on MAC address
526 # Uses ethernet address as stored in the dhcpHost objectclass using
527 # the dhcpHWAddress attribute or ethernet address stored in the
528 # ieee802Device objectclass with the macAddress attribute.
530 # This module is written to be schema agnostic, and only depend on the
531 # existence of attribute names.
533 # The LTSP configuration variables are saved directly using a
534 # ltspConfig prefix and uppercasing the rest of the attribute name.
535 # To set the SERVER variable, set the ltspConfigServer attribute.
537 # Some LDAP schema should be created with all the relevant
538 # configuration settings. Something like this should work:
540 # objectclass (
1.1.2.2 NAME
'ltspClientAux
'
543 # MAY ( ltspConfigServer $ ltsConfigSound $ ... )
545 LDAPSERVER=$(debian-edu-ldapserver)
546 if [
"$LDAPSERVER
" ] ; then
547 LDAPBASE=$(debian-edu-ldapserver -b)
548 for MAC in $(LANG=C ifconfig |grep -i hwaddr| awk
'{print $
5}
'|sort -u) ; do
549 filter=
"(|(dhcpHWAddress=ethernet $MAC)(macAddress=$MAC))
"
550 ldapsearch -h
"$LDAPSERVER
" -b
"$LDAPBASE
" -v -x
"$filter
" | \
551 grep
'^ltspConfig
' | while read attr value ; do
552 # Remove prefix and convert to upper case
553 attr=$(echo $attr | sed
's/^ltspConfig//i
' | tr a-z A-Z)
554 # bass value on to clients
555 eval
"$attr=$value; export $attr
"
559 </pre
></blockquote
>
561 <p
>I
'm not sure this shell construction will work, because I suspect
562 the while block might end up in a subshell causing the variables set
563 there to not show up in ltsp-config, but if that is the case I am sure
564 the code can be restructured to make sure the variables are passed on.
565 I expect that can be solved with some testing. :)
</p
>
567 <p
>If you want to help out with implementing this for Debian Edu,
568 please contact us on debian-edu@lists.debian.org.
</p
>
570 <p
>Update
2010-
07-
17: I am aware of another effort to store LTSP
571 configuration in LDAP that was created around year
2000 by
572 <a href=
"http://www.pcxperience.com/thinclient/documentation/ldap.html
">PC
573 Xperience, Inc.,
2000</a
>. I found its
574 <a href=
"http://people.redhat.com/alikins/ltsp/ldap/
">files
</a
> on a
575 personal home page over at redhat.com.
</p
>
580 <title>jXplorer, a very nice LDAP GUI
</title>
581 <link>http://people.skolelinux.org/pere/blog/jXplorer__a_very_nice_LDAP_GUI.html
</link>
582 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/jXplorer__a_very_nice_LDAP_GUI.html
</guid>
583 <pubDate>Fri,
9 Jul
2010 12:
55:
00 +
0200</pubDate>
586 <a href=
"http://people.skolelinux.org/pere/blog/LUMA__a_very_nice_LDAP_GUI.html
">my
587 last post
</a
> about available LDAP tools in Debian, I was told about a
588 LDAP GUI that is even better than luma. The java application
589 <a href=
"http://jxplorer.org/
">jXplorer
</a
> is claimed to be capable of
590 moving LDAP objects and subtrees using drag-and-drop, and can
591 authenticate using Kerberos. I have only tested the Kerberos
592 authentication, but do not have a LDAP setup allowing me to rewrite
593 LDAP with my test user yet. It is
594 <a href=
"http://packages.qa.debian.org/j/jxplorer.html
">available in
595 Debian
</a
> testing and unstable at the moment. The only problem I
596 have with it is how it handle errors. If something go wrong, its
597 non-intuitive behaviour require me to go through some query work list
598 and remove the failing query. Nothing big, but very annoying.
</p
>
603 <title>MS Word krøller det til for politiet?
</title>
604 <link>http://people.skolelinux.org/pere/blog/MS_Word_kr__ller_det_til_for_politiet_.html
</link>
605 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/MS_Word_kr__ller_det_til_for_politiet_.html
</guid>
606 <pubDate>Thu,
8 Jul
2010 14:
00:
00 +
0200</pubDate>
608 <p
>De siste dagene har Aftenposten
609 <a href=
"http://www.aftenposten.no/nyheter/iriks/article3718597.ece
">fortalt
</a
>
610 <a href=
"http://www.aftenposten.no/nyheter/iriks/article3724249.ece
">hvordan
</a
>
611 politet har brukt skriveverktøy som ikke håndterer arabisk tekst og
612 tekst som skal skrives fra høyre mot venstre når de har laget
613 løpeseddel for å be om informasjon fra publikum. Resultatet har vært
614 en uleselig arabisk-bit på løpeseddelen. Feilen har oppstått når
615 teksten har blitt
"kopiert inn i programvare som ikke har støtte for
616 språk som skrives fra høyre mot venstre
", og jeg er ganske sikker på
617 at det er snakk om Microsoft Office i dette tilfellet. Er det slik at
618 MS Office i norsk språkdrakt ikke har støtte for tekst som skal
619 skrives fra høyre mot venstre? Jeg tror alle utgaver av
620 OpenOffice.org har slik støtte, og det er jo ikke veldig vanskelig å
621 la slik støtte finnes i alle utgaver av et program hvis støtten først
622 er utviklet. Aftenpostens melding får meg til å undre om problemet
623 ville vært unngått hvis politiet brukte OpenOffice.org i stedet for MS
626 <p
>Mon tro om det er flere eksempler på at MS Office har ødelagt for
627 offentlig myndighet?
</p
>
632 <title>Lenny-
>Squeeze upgrades, apt vs aptitude with the Gnome desktop
</title>
633 <link>http://people.skolelinux.org/pere/blog/Lenny__Squeeze_upgrades__apt_vs_aptitude_with_the_Gnome_desktop.html
</link>
634 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Lenny__Squeeze_upgrades__apt_vs_aptitude_with_the_Gnome_desktop.html
</guid>
635 <pubDate>Sat,
3 Jul
2010 23:
55:
00 +
0200</pubDate>
637 <p
>Here is a short update on my
<a
638 href=
"http://people.skolelinux.org/~pere/debian-upgrade-testing/
">my
639 Debian Lenny-
>Squeeze upgrade testing
</a
>. Here is a summary of the
640 difference for Gnome when it is upgraded by apt-get and aptitude. I
'm
641 not reporting the status for KDE, because the upgrade crashes when
642 aptitude try because of missing conflicts
643 (
<a href=
"http://bugs.debian.org/
584861">#
584861</a
> and
644 <a href=
"http://bugs.debian.org/
585716">#
585716</a
>).
</p
>
646 <p
>At the end of the upgrade test script, dpkg -l is executed to get a
647 complete list of the installed packages. Based on this I see these
648 differences when I did a test run today. As usual, I do not really
649 know what the correct set of packages would be, but thought it best to
650 publish the difference.
</p
>
652 <p
>Installed using apt-get, missing with aptitude
</p
>
654 <blockquote
><p
>
655 at-spi cpp-
4.3 finger gnome-spell gstreamer0.10-gnomevfs
656 libatspi1.0-
0 libcupsys2 libeel2-data libgail-common libgdl-
1-common
657 libgnomeprint2.2-data libgnomeprintui2.2-common libgnomevfs2-bin
658 libgtksourceview-common libpt-
1.10.10-plugins-alsa
659 libpt-
1.10.10-plugins-v4l libservlet2.4-java libxalan2-java
660 libxerces2-java openoffice.org-writer2latex openssl-blacklist p7zip
661 python-
4suite-xml python-eggtrayicon python-gtkhtml2
662 python-gtkmozembed svgalibg1 xserver-xephyr zip
663 </p
></blockquote
>
665 <p
>Installed using apt-get, removed with aptitude
</p
>
667 <blockquote
><p
>
668 bluez-utils dhcdbd djvulibre-desktop epiphany-gecko
669 gnome-app-install gnome-mount gnome-vfs-obexftp gnome-volume-manager
670 libao2 libavahi-compat-libdnssd1 libavahi-core5 libbind9-
50
671 libbluetooth2 libcamel1.2-
11 libcdio7 libcucul0 libcurl3
672 libdirectfb-
1.0-
0 libdvdread3 libedata-cal1.2-
6 libedataserver1.2-
9
673 libeel2-
2.20 libepc-
1.0-
1 libepc-ui-
1.0-
1 libexchange-storage1.2-
3
674 libfaad0 libgd2-noxpm libgda3-
3 libgda3-common libggz2 libggzcore9
675 libggzmod4 libgksu1.2-
0 libgksuui1.0-
1 libgmyth0 libgnome-desktop-
2
676 libgnome-pilot2 libgnomecups1.0-
1 libgnomeprint2.2-
0
677 libgnomeprintui2.2-
0 libgpod3 libgraphviz4 libgtkhtml2-
0
678 libgtksourceview1.0-
0 libgucharmap6 libhesiod0 libicu38 libisccc50
679 libisccfg50 libiw29 libkpathsea4 libltdl3 liblwres50 libmagick++
10
680 libmagick10 libmalaga7 libmtp7 libmysqlclient15off libnautilus-burn4
681 libneon27 libnm-glib0 libnm-util0 libopal-
2.2 libosp5
682 libparted1.8-
10 libpisock9 libpisync1 libpoppler-glib3 libpoppler3
683 libpt-
1.10.10 libraw1394-
8 libsensors3 libsmbios2 libsoup2.2-
8
684 libssh2-
1 libsuitesparse-
3.1.0 libswfdec-
0.6-
90 libtalloc1
685 libtotem-plparser10 libtrackerclient0 libvoikko1 libxalan2-java-gcj
686 libxerces2-java-gcj libxklavier12 libxtrap6 libxxf86misc1 libzephyr3
687 mysql-common swfdec-gnome totem-gstreamer wodim
688 </p
></blockquote
>
690 <p
>Installed using aptitude, missing with apt-get
</p
>
692 <blockquote
><p
>
693 gnome gnome-desktop-environment hamster-applet python-gnomeapplet
694 python-gnomekeyring python-wnck rhythmbox-plugins xorg
695 xserver-xorg-input-all xserver-xorg-input-evdev
696 xserver-xorg-input-kbd xserver-xorg-input-mouse
697 xserver-xorg-input-synaptics xserver-xorg-video-all
698 xserver-xorg-video-apm xserver-xorg-video-ark xserver-xorg-video-ati
699 xserver-xorg-video-chips xserver-xorg-video-cirrus
700 xserver-xorg-video-dummy xserver-xorg-video-fbdev
701 xserver-xorg-video-glint xserver-xorg-video-i128
702 xserver-xorg-video-i740 xserver-xorg-video-mach64
703 xserver-xorg-video-mga xserver-xorg-video-neomagic
704 xserver-xorg-video-nouveau xserver-xorg-video-nv
705 xserver-xorg-video-r128 xserver-xorg-video-radeon
706 xserver-xorg-video-radeonhd xserver-xorg-video-rendition
707 xserver-xorg-video-s3 xserver-xorg-video-s3virge
708 xserver-xorg-video-savage xserver-xorg-video-siliconmotion
709 xserver-xorg-video-sis xserver-xorg-video-sisusb
710 xserver-xorg-video-tdfx xserver-xorg-video-tga
711 xserver-xorg-video-trident xserver-xorg-video-tseng
712 xserver-xorg-video-vesa xserver-xorg-video-vmware
713 xserver-xorg-video-voodoo
714 </p
></blockquote
>
716 <p
>Installed using aptitude, removed with apt-get
</p
>
718 <blockquote
><p
>
719 deskbar-applet xserver-xorg xserver-xorg-core
720 xserver-xorg-input-wacom xserver-xorg-video-intel
721 xserver-xorg-video-openchrome
722 </p
></blockquote
>
724 <p
>I was told on IRC that the xorg-xserver package was
725 <a href=
"http://git.debian.org/?p=pkg-xorg/xserver/xorg-server.git;a=commit;h=
9c8080d06c457932d3bfec021c69ac000aa60120
">changed
726 in git
</a
> today to try to get apt-get to not remove xorg completely.
727 No idea when it hits Squeeze, but when it does I hope it will reduce
728 the difference somewhat.
733 <title>Caching password, user and group on a roaming Debian laptop
</title>
734 <link>http://people.skolelinux.org/pere/blog/Caching_password__user_and_group_on_a_roaming_Debian_laptop.html
</link>
735 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Caching_password__user_and_group_on_a_roaming_Debian_laptop.html
</guid>
736 <pubDate>Thu,
1 Jul
2010 11:
40:
00 +
0200</pubDate>
738 <p
>For a laptop, centralized user directories and password checking is
739 a bit troubling. Laptops are typically used also when not connected
740 to the network, and it is vital for a user to be able to log in or
741 unlock the screen saver also when a central server is unavailable.
742 This is possible by caching passwords and directory information (user
743 and group attributes) locally, and the packages to do so are available
744 in Debian. Here follow two recipes to set this up in Debian/Squeeze.
745 It is also possible to set up in Debian/Lenny, but require more manual
746 setup there because pam-auth-update is missing in Lenny.
</p
>
748 <h2
>LDAP/Kerberos + nscd + libpam-ccreds + libpam-mklocaluser/pam_mkhomedir
</h2
>
750 This is the traditional method with a twist. The password caching is
751 provided by libpam-ccreds (version
10-
4 or later is needed on
752 Squeeze), and the directory caching is done by nscd. The directory
753 lookup and password checking is done using LDAP. If one want to use
754 Kerberos for password checking the libpam-ldapd package can be
755 replaced with libpam-krb5 or libpam-heimdal. If one is happy having a
756 local home directory with the path listed in LDAP, one can use the
757 pam_mkhomedir module from pam-modules to make this happen instead of
758 using libpam-mklocaluser. A setup for pam-auth-update to enable
759 pam_mkhomedir will have to be written until a fix for
760 <a href=
"http://bugs.debian.org/
568577">bug #
568577</a
> is in the
761 archive. Because I believe it is a bad idea to have local home
762 directories using misleading paths like /site/server/partition/, I
763 prefer to create a local user with the home directory in /home/. This
764 is done using the libpam-mklocaluser package.
</p
>
766 <p
>These packages need to be installed and configured
</p
>
768 <blockquote
><pre
>
769 libnss-ldapd libpam-ldapd nscd libpam-ccreds libpam-mklocaluser
770 </pre
></blockquote
>
772 <p
>The ldapd packages will ask for LDAP connection information, and
773 one have to fill in the values that fits ones own site. Make sure the
774 PAM part uses encrypted connections, to make sure the password is not
775 sent in clear text to the LDAP server. I
've been unable to get TLS
776 certificate checking for a self signed certificate working, which make
777 LDAP authentication unsafe for Debian Edu (nslcd is not checking if it
778 is talking to the correct LDAP server), and very much welcome feedback
779 on how to get this working.
</p
>
781 <p
>Because nscd do not have a default configuration fit for offline
782 caching until
<a href=
"http://bugs.debian.org/
485282">bug #
485282</a
>
783 is fixed, this configuration should be used instead of the one
784 currently in /etc/nscd.conf. The changes are in the fields
785 reload-count and positive-time-to-live, and is based on the
786 instructions I found in the
787 <a href=
"http://www.flyn.org/laptopldap/
">LDAP for Mobile Laptops
</a
>
788 instructions by Flyn Computing.
</p
>
790 <blockquote
><pre
>
792 reload-count unlimited
795 enable-cache passwd yes
796 positive-time-to-live passwd
2592000
797 negative-time-to-live passwd
20
798 suggested-size passwd
211
799 check-files passwd yes
800 persistent passwd yes
802 max-db-size passwd
33554432
803 auto-propagate passwd yes
805 enable-cache group yes
806 positive-time-to-live group
2592000
807 negative-time-to-live group
20
808 suggested-size group
211
809 check-files group yes
812 max-db-size group
33554432
813 auto-propagate group yes
815 enable-cache hosts no
816 positive-time-to-live hosts
2592000
817 negative-time-to-live hosts
20
818 suggested-size hosts
211
819 check-files hosts yes
822 max-db-size hosts
33554432
824 enable-cache services yes
825 positive-time-to-live services
2592000
826 negative-time-to-live services
20
827 suggested-size services
211
828 check-files services yes
829 persistent services yes
831 max-db-size services
33554432
832 </pre
></blockquote
>
834 <p
>While we wait for a mechanism to update /etc/nsswitch.conf
835 automatically like the one provided in
836 <a href=
"http://bugs.debian.org/
496915">bug #
496915</a
>, the file
837 content need to be manually replaced to ensure LDAP is used as the
838 directory service on the machine. /etc/nsswitch.conf should normally
839 look like this:
</p
>
841 <blockquote
><pre
>
845 hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
852 </pre
></blockquote
>
854 <p
>The important parts are that ldap is listed last for passwd, group,
855 shadow and netgroup.
</p
>
857 <p
>With these changes in place, any user in LDAP will be able to log
858 in locally on the machine using for example kdm, get a local home
859 directory created and have the password as well as user and group
862 <h2
>LDAP/Kerberos + nss-updatedb + libpam-ccreds +
863 libpam-mklocaluser/pam_mkhomedir
</h2
>
865 <p
>Because nscd have had its share of problems, and seem to have
866 problems doing proper caching, I
've seen suggestions and recipes to
867 use nss-updatedb to copy parts of the LDAP database locally when the
868 LDAP database is available. I have not tested such setup, because I
869 discovered sssd.
</p
>
871 <h2
>LDAP/Kerberos + sssd + libpam-mklocaluser
</h2
>
873 <p
>A more flexible and robust setup than the nscd combination
874 mentioned earlier that has shown up recently, is the
875 <a href=
"https://fedorahosted.org/sssd/
">sssd
</a
> package from Redhat.
876 It is part of the
<a href=
"http://www.freeipa.org/
">FreeIPA
</A
> project
877 to provide a Active Directory like directory service for Linux
878 machines. The sssd system combines the caching of passwords and user
879 information into one package, and remove the need for nscd and
880 libpam-ccreds. It support LDAP and Kerberos, but not NIS. Version
881 1.2 do not support netgroups, but it is said that it will support this
882 in version
1.5 expected to show up later in
2010. Because the
883 <a href=
"http://packages.qa.debian.org/s/sssd.html
">sssd package
</a
>
884 was missing in Debian, I ended up co-maintaining it with Werner, and
885 version
1.2 is now in testing.
887 <p
>These packages need to be installed and configured to get the
888 roaming setup I want
</p
>
890 <blockquote
><pre
>
891 libpam-sss libnss-sss libpam-mklocaluser
892 </pre
></blockquote
>
894 The complete setup of sssd is done by editing/creating
895 <tt
>/etc/sssd/sssd.conf
</tt
>.
897 <blockquote
><pre
>
899 config_file_version =
2
900 reconnection_retries =
3
908 reconnection_retries =
3
911 reconnection_retries =
3
915 cache_credentials = true
919 chpass_provider = ldap
921 ldap_uri = ldap://ldap
922 ldap_search_base = dc=skole,dc=skolelinux,dc=no
923 ldap_tls_reqcert = never
924 ldap_tls_cacert = /etc/ssl/certs/ca-certificates.crt
925 </pre
></blockquote
>
927 <p
>I got the same problem here with certificate checking. Had to set
928 "ldap_tls_reqcert = never
" to get it working.
</p
>
930 <p
>With the libnss-sss package in testing at the moment, the
931 nsswitch.conf file is update automatically, so there is no need to
932 modify it manually.
</p
>
934 <p
>If you want to help out with implementing this for Debian Edu,
935 please contact us on debian-edu@lists.debian.org.
</p
>