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