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>What are they searching for - PowerDNS and ISC DHCP in LDAP
</title>
11 <link>http://people.skolelinux.org/pere/blog/What_are_they_searching_for___PowerDNS_and_ISC_DHCP_in_LDAP.html
</link>
12 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/What_are_they_searching_for___PowerDNS_and_ISC_DHCP_in_LDAP.html
</guid>
13 <pubDate>Sat,
17 Jul
2010 21:
00:
00 +
0200</pubDate>
16 <a href=
"http://people.skolelinux.org/pere/blog/Time_for_new__LDAP_schemas_replacing_RFC_2307_.html
">followup
</a
>
18 <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
20 <a href=
"http://people.skolelinux.org/pere/blog/Combining_PowerDNS_and_ISC_DHCP_LDAP_objects.html
">merging
21 all
</a
> the computer related LDAP objects in Debian Edu.
</p
>
23 <p
>As a step to try to see if it possible to merge the DNS and DHCP
24 LDAP objects, I have had a look at how the packages pdns-backend-ldap
25 and dhcp3-server-ldap in Debian use the LDAP server. The two
26 implementations are quite different in how they use LDAP.
</p
>
28 To get this information, I started slapd with debugging enabled and
29 dumped the debug output to a file to get the LDAP searches performed
30 on a Debian Edu main-server. Here is a summary.
32 <p
><strong
>powerdns
</strong
></p
>
34 <a href=
"http://www.linuxnetworks.de/doc/index.php/PowerDNS_LDAP_Backend
">Clues
35 on how to
</a
> set up PowerDNS to use a LDAP backend is available on
38 <p
>PowerDNS have two modes of operation using LDAP as its backend.
39 One
"strict
" mode where the forward and reverse DNS lookups are done
40 using the same LDAP objects, and a
"tree
" mode where the forward and
41 reverse entries are in two different subtrees in LDAP with a structure
42 based on the DNS names, as in tjener.intern and
43 2.2.0.10.in-addr.arpa.
</p
>
45 <p
>In tree mode, the server is set up to use a LDAP subtree as its
46 base, and uses a
"base
" scoped search for the DNS name by adding
47 "dc=tjener,dc=intern,
" to the base with a filter for
48 "(associateddomain=tjener.intern)
" for the forward entry and
49 "dc=
2,dc=
2,dc=
0,dc=
10,dc=in-addr,dc=arpa,
" with a filter for
50 "(associateddomain=
2.2.0.10.in-addr.arpa)
" for the reverse entry. For
51 forward entries, it is looking for attributes named dnsttl, arecord,
52 nsrecord, cnamerecord, soarecord, ptrrecord, hinforecord, mxrecord,
53 txtrecord, rprecord, afsdbrecord, keyrecord, aaaarecord, locrecord,
54 srvrecord, naptrrecord, kxrecord, certrecord, dsrecord, sshfprecord,
55 ipseckeyrecord, rrsigrecord, nsecrecord, dnskeyrecord, dhcidrecord,
56 spfrecord and modifytimestamp. For reverse entries it is looking for
57 the attributes dnsttl, arecord, nsrecord, cnamerecord, soarecord,
58 ptrrecord, hinforecord, mxrecord, txtrecord, rprecord, aaaarecord,
59 locrecord, srvrecord, naptrrecord and modifytimestamp. The equivalent
60 ldapsearch commands could look like this:
</p
>
62 <blockquote
><pre
>
64 -b dc=tjener,dc=intern,ou=hosts,dc=skole,dc=skolelinux,dc=no \
65 -s base -x
'(associateddomain=tjener.intern)
' dNSTTL aRecord nSRecord \
66 cNAMERecord sOARecord pTRRecord hInfoRecord mXRecord tXTRecord \
67 rPRecord aFSDBRecord KeyRecord aAAARecord lOCRecord sRVRecord \
68 nAPTRRecord kXRecord certRecord dSRecord sSHFPRecord iPSecKeyRecord \
69 rRSIGRecord nSECRecord dNSKeyRecord dHCIDRecord sPFRecord modifyTimestamp
72 -b dc=
2,dc=
2,dc=
0,dc=
10,dc=in-addr,dc=arpa,ou=hosts,dc=skole,dc=skolelinux,dc=no \
73 -s base -x
'(associateddomain=
2.2.0.10.in-addr.arpa)
'
74 dnsttl, arecord, nsrecord, cnamerecord soarecord ptrrecord \
75 hinforecord mxrecord txtrecord rprecord aaaarecord locrecord \
76 srvrecord naptrrecord modifytimestamp
77 </pre
></blockquote
>
79 <p
>In Debian Edu/Lenny, the PowerDNS tree mode is used with
80 ou=hosts,dc=skole,dc=skolelinux,dc=no as the base, and these are two
81 example LDAP objects used there. In addition to these objects, the
82 parent objects all th way up to ou=hosts,dc=skole,dc=skolelinux,dc=no
85 <blockquote
><pre
>
86 dn: dc=tjener,dc=intern,ou=hosts,dc=skole,dc=skolelinux,dc=no
88 objectclass: dnsdomain
89 objectclass: domainrelatedobject
92 associateddomain: tjener.intern
94 dn: dc=
2,dc=
2,dc=
0,dc=
10,dc=in-addr,dc=arpa,ou=hosts,dc=skole,dc=skolelinux,dc=no
96 objectclass: dnsdomain2
97 objectclass: domainrelatedobject
99 ptrrecord: tjener.intern
100 associateddomain:
2.2.0.10.in-addr.arpa
101 </pre
></blockquote
>
103 <p
>In strict mode, the server behaves differently. When looking for
104 forward DNS entries, it is doing a
"subtree
" scoped search with the
105 same base as in the tree mode for a object with filter
106 "(associateddomain=tjener.intern)
" and requests the attributes dnsttl,
107 arecord, nsrecord, cnamerecord, soarecord, ptrrecord, hinforecord,
108 mxrecord, txtrecord, rprecord, aaaarecord, locrecord, srvrecord,
109 naptrrecord and modifytimestamp. For reverse entires it also do a
110 subtree scoped search but this time the filter is
"(arecord=
10.0.2.2)
"
111 and the requested attributes are associateddomain, dnsttl and
112 modifytimestamp. In short, in strict mode the objects with ptrrecord
113 go away, and the arecord attribute in the forward object is used
116 <p
>The forward and reverse searches can be simulated using ldapsearch
119 <blockquote
><pre
>
120 ldapsearch -h ldap -b ou=hosts,dc=skole,dc=skolelinux,dc=no -s sub -x \
121 '(associateddomain=tjener.intern)
' dNSTTL aRecord nSRecord \
122 cNAMERecord sOARecord pTRRecord hInfoRecord mXRecord tXTRecord \
123 rPRecord aFSDBRecord KeyRecord aAAARecord lOCRecord sRVRecord \
124 nAPTRRecord kXRecord certRecord dSRecord sSHFPRecord iPSecKeyRecord \
125 rRSIGRecord nSECRecord dNSKeyRecord dHCIDRecord sPFRecord modifyTimestamp
127 ldapsearch -h ldap -b ou=hosts,dc=skole,dc=skolelinux,dc=no -s sub -x \
128 '(arecord=
10.0.2.2)
' associateddomain dnsttl modifytimestamp
129 </pre
></blockquote
>
131 <p
>In addition to the forward and reverse searches , there is also a
132 search for SOA records, which behave similar to the forward and
133 reverse lookups.
</p
>
135 <p
>A thing to note with the PowerDNS behaviour is that it do not
136 specify any objectclass names, and instead look for the attributes it
137 need to generate a DNS reply. This make it able to work with any
138 objectclass that provide the needed attributes.
</p
>
140 <p
>The attributes are normally provided in the cosine (RFC
1274) and
141 dnsdomain2 schemas. The latter is used for reverse entries like
142 ptrrecord and recent DNS additions like aaaarecord and srvrecord.
</p
>
144 <p
>In Debian Edu, we have created DNS objects using the object classes
145 dcobject (for dc), dnsdomain or dnsdomain2 (structural, for the DNS
146 attributes) and domainrelatedobject (for associatedDomain). The use
147 of structural object classes make it impossible to combine these
148 classes with the object classes used by DHCP.
</p
>
150 <p
>There are other schemas that could be used too, for example the
151 dnszone structural object class used by Gosa and bind-sdb for the DNS
152 attributes combined with the domainrelatedobject object class, but in
153 this case some unused attributes would have to be included as well
154 (zonename and relativedomainname).
</p
>
156 <p
>My proposal for Debian Edu would be to switch PowerDNS to strict
157 mode and not use any of the existing objectclasses (dnsdomain,
158 dnsdomain2 and dnszone) when one want to combine the DNS information
159 with DHCP information, and instead create a auxiliary object class
160 defined something like this (using the attributes defined for
161 dnsdomain and dnsdomain2 or dnszone):
</p
>
163 <blockquote
><pre
>
164 objectclass ( some-oid NAME
'dnsDomainAux
'
167 MAY ( ARecord $ MDRecord $ MXRecord $ NSRecord $ SOARecord $ CNAMERecord $
168 DNSTTL $ DNSClass $ PTRRecord $ HINFORecord $ MINFORecord $
169 TXTRecord $ SIGRecord $ KEYRecord $ AAAARecord $ LOCRecord $
170 NXTRecord $ SRVRecord $ NAPTRRecord $ KXRecord $ CERTRecord $
171 A6Record $ DNAMERecord
173 </pre
></blockquote
>
175 <p
>This will allow any object to become a DNS entry when combined with
176 the domainrelatedobject object class, and allow any entity to include
177 all the attributes PowerDNS wants. I
've sent an email to the PowerDNS
178 developers asking for their view on this schema and if they are
179 interested in providing such schema with PowerDNS, and I hope my
180 message will be accepted into their mailing list soon.
</p
>
182 <p
><strong
>ISC dhcp
</strong
></p
>
184 <p
>The DHCP server searches for specific objectclass and requests all
185 the object attributes, and then uses the attributes it want. This
186 make it harder to figure out exactly what attributes are used, but
187 thanks to the working example in Debian Edu I can at least get an idea
188 what is needed without having to read the source code.
</p
>
190 <p
>In the DHCP server configuration, the LDAP base to use and the
191 search filter to use to locate the correct dhcpServer entity is
192 stored. These are the relevant entries from
193 /etc/dhcp3/dhcpd.conf:
</p
>
195 <blockquote
><pre
>
196 ldap-base-dn
"dc=skole,dc=skolelinux,dc=no
";
197 ldap-dhcp-server-cn
"dhcp
";
198 </pre
></blockquote
>
200 <p
>The DHCP server uses this information to nest all the DHCP
201 configuration it need. The cn
"dhcp
" is located using the given LDAP
202 base and the filter
"(
&(objectClass=dhcpServer)(cn=dhcp))
". The
203 search result is this entry:
</p
>
205 <blockquote
><pre
>
206 dn: cn=dhcp,dc=skole,dc=skolelinux,dc=no
209 objectClass: dhcpServer
210 dhcpServiceDN: cn=DHCP Config,dc=skole,dc=skolelinux,dc=no
211 </pre
></blockquote
>
213 <p
>The content of the dhcpServiceDN attribute is next used to locate the
214 subtree with DHCP configuration. The DHCP configuration subtree base
215 is located using a base scope search with base
"cn=DHCP
216 Config,dc=skole,dc=skolelinux,dc=no
" and filter
217 "(
&(objectClass=dhcpService)(|(dhcpPrimaryDN=cn=dhcp,dc=skole,dc=skolelinux,dc=no)(dhcpSecondaryDN=cn=dhcp,dc=skole,dc=skolelinux,dc=no)))
".
218 The search result is this entry:
</p
>
220 <blockquote
><pre
>
221 dn: cn=DHCP Config,dc=skole,dc=skolelinux,dc=no
224 objectClass: dhcpService
225 objectClass: dhcpOptions
226 dhcpPrimaryDN: cn=dhcp, dc=skole,dc=skolelinux,dc=no
227 dhcpStatements: ddns-update-style none
228 dhcpStatements: authoritative
229 dhcpOption: smtp-server code
69 = array of ip-address
230 dhcpOption: www-server code
72 = array of ip-address
231 dhcpOption: wpad-url code
252 = text
232 </pre
></blockquote
>
234 <p
>Next, the entire subtree is processed, one level at the time. When
235 all the DHCP configuration is loaded, it is ready to receive requests.
236 The subtree in Debian Edu contain objects with object classes
237 top/dhcpService/dhcpOptions, top/dhcpSharedNetwork/dhcpOptions,
238 top/dhcpSubnet, top/dhcpGroup and top/dhcpHost. These provide options
239 and information about netmasks, dynamic range etc. Leaving out the
240 details here because it is not relevant for the focus of my
241 investigation, which is to see if it is possible to merge dns and dhcp
242 related computer objects.
</p
>
244 <p
>When a DHCP request come in, LDAP is searched for the MAC address
245 of the client (
00:
00:
00:
00:
00:
00 in this example), using a subtree
246 scoped search with
"cn=DHCP Config,dc=skole,dc=skolelinux,dc=no
" as
247 the base and
"(
&(objectClass=dhcpHost)(dhcpHWAddress=ethernet
248 00:
00:
00:
00:
00:
00))
" as the filter. This is what a host object look
251 <blockquote
><pre
>
252 dn: cn=hostname,cn=group1,cn=THINCLIENTS,cn=DHCP Config,dc=skole,dc=skolelinux,dc=no
255 objectClass: dhcpHost
256 dhcpHWAddress: ethernet
00:
00:
00:
00:
00:
00
257 dhcpStatements: fixed-address hostname
258 </pre
></blockquote
>
260 <p
>There is less flexiblity in the way LDAP searches are done here.
261 The object classes need to have fixed names, and the configuration
262 need to be stored in a fairly specific LDAP structure. On the
263 positive side, the invidiual dhcpHost entires can be anywhere without
264 the DN pointed to by the dhcpServer entries. The latter should make
265 it possible to group all host entries in a subtree next to the
266 configuration entries, and this subtree can also be shared with the
267 DNS server if the schema proposed above is combined with the dhcpHost
268 structural object class.
270 <p
><strong
>Conclusion
</strong
></p
>
272 <p
>The PowerDNS implementation seem to be very flexible when it come
273 to which LDAP schemas to use. While its
"tree
" mode is rigid when it
274 come to the the LDAP structure, the
"strict
" mode is very flexible,
275 allowing DNS objects to be stored anywhere under the base cn specified
276 in the configuration.
</p
>
278 <p
>The DHCP implementation on the other hand is very inflexible, both
279 regarding which LDAP schemas to use and which LDAP structure to use.
280 I guess one could implement ones own schema, as long as the
281 objectclasses and attributes have the names used, but this do not
282 really help when the DHCP subtree need to have a fairly fixed
285 <p
>Based on the observed behaviour, I suspect a LDAP structure like
286 this might work for Debian Edu:
</p
>
288 <blockquote
><pre
>
290 cn=machine-info (dhcpService) - dhcpServiceDN points here
292 cn=dhcp-internal (dhcpSharedNetwork/dhcpOptions)
293 cn=
10.0.2.0 (dhcpSubnet)
294 cn=group1 (dhcpGroup/dhcpOptions)
295 cn=dhcp-thinclients (dhcpSharedNetwork/dhcpOptions)
296 cn=
192.168.0.0 (dhcpSubnet)
297 cn=group1 (dhcpGroup/dhcpOptions)
298 ou=machines - PowerDNS base points here
299 cn=hostname (dhcpHost/domainrelatedobject/dnsDomainAux)
300 </pre
></blockquote
>
302 <P
>This is not tested yet. If the DHCP server require the dhcpHost
303 entries to be in the dhcpGroup subtrees, the entries can be stored
304 there instead of a common machines subtree, and the PowerDNS base
305 would have to be moved one level up to the machine-info subtree.
</p
>
307 <p
>The combined object under the machines subtree would look something
310 <blockquote
><pre
>
311 dn: dc=hostname,ou=machines,cn=machine-info,dc=skole,dc=skolelinux,dc=no
314 objectClass: dhcpHost
315 objectclass: domainrelatedobject
316 objectclass: dnsDomainAux
317 associateddomain: hostname.intern
319 dhcpHWAddress: ethernet
00:
00:
00:
00:
00:
00
320 dhcpStatements: fixed-address hostname.intern
321 </pre
></blockquote
>
323 </p
>One could even add the LTSP configuration associated with a given
324 machine, as long as the required attributes are available in a
325 auxiliary object class.
</p
>
330 <title>Combining PowerDNS and ISC DHCP LDAP objects
</title>
331 <link>http://people.skolelinux.org/pere/blog/Combining_PowerDNS_and_ISC_DHCP_LDAP_objects.html
</link>
332 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Combining_PowerDNS_and_ISC_DHCP_LDAP_objects.html
</guid>
333 <pubDate>Wed,
14 Jul
2010 23:
45:
00 +
0200</pubDate>
335 <p
>For a while now, I have wanted to find a way to change the DNS and
336 DHCP services in Debian Edu to use the same LDAP objects for a given
337 computer, to avoid the possibility of having a inconsistent state for
338 a computer in LDAP (as in DHCP but no DNS entry or the other way
339 around) and make it easier to add computers to LDAP.
</p
>
341 <p
>I
've looked at how powerdns and dhcpd is using LDAP, and using this
342 information finally found a solution that seem to work.
</p
>
344 <p
>The old setup required three LDAP objects for a given computer.
345 One forward DNS entry, one reverse DNS entry and one DHCP entry. If
346 we switch powerdns to use its strict LDAP method (ldap-method=strict
347 in pdns-debian-edu.conf), the forward and reverse DNS entries are
348 merged into one while making it impossible to transfer the reverse map
349 to a slave DNS server.
</p
>
351 <p
>If we also replace the object class used to get the DNS related
352 attributes to one allowing these attributes to be combined with the
353 dhcphost object class, we can merge the DNS and DHCP entries into one.
354 I
've written such object class in the dnsdomainaux.schema file (need
355 proper OIDs, but that is a minor issue), and tested the setup. It
356 seem to work.
</p
>
358 <p
>With this test setup in place, we can get away with one LDAP object
359 for both DNS and DHCP, and even the LTSP configuration I suggested in
360 an earlier email. The combined LDAP object will look something like
363 <blockquote
><pre
>
364 dn: cn=hostname,cn=group1,cn=THINCLIENTS,cn=DHCP Config,dc=skole,dc=skolelinux,dc=no
366 objectClass: dhcphost
367 objectclass: domainrelatedobject
368 objectclass: dnsdomainaux
369 associateddomain: hostname.intern
371 dhcphwaddress: ethernet
00:
00:
00:
00:
00:
00
372 dhcpstatements: fixed-address hostname
374 </pre
></blockquote
>
376 <p
>The DNS server uses the associateddomain and arecord entries, while
377 the DHCP server uses the dhcphwaddress and dhcpstatements entries
378 before asking DNS to resolve the fixed-adddress. LTSP will use
379 dhcphwaddress or associateddomain and the ldapconfig* attributes.
</p
>
381 <p
>I am not yet sure if I can get the DHCP server to look for its
382 dhcphost in a different location, to allow us to put the objects
383 outside the
"DHCP Config
" subtree, but hope to figure out a way to do
384 that. If I can
't figure out a way to do that, we can still get rid of
385 the hosts subtree and move all its content into the DHCP Config tree
386 (which probably should be renamed to be more related to the new
387 content. I suspect cn=dnsdhcp,ou=services or something like that
388 might be a good place to put it.
</p
>
390 <p
>If you want to help out with implementing this for Debian Edu,
391 please contact us on debian-edu@lists.debian.org.
</p
>
396 <title>Idea for storing LTSP configuration in LDAP
</title>
397 <link>http://people.skolelinux.org/pere/blog/Idea_for_storing_LTSP_configuration_in_LDAP.html
</link>
398 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Idea_for_storing_LTSP_configuration_in_LDAP.html
</guid>
399 <pubDate>Sun,
11 Jul
2010 22:
00:
00 +
0200</pubDate>
401 <p
>Vagrant mentioned on IRC today that ltsp_config now support
402 sourcing files from /usr/share/ltsp/ltsp_config.d/ on the thin
403 clients, and that this can be used to fetch configuration from LDAP if
404 Debian Edu choose to store configuration there.
</p
>
406 <p
>Armed with this information, I got inspired and wrote a test module
407 to get configuration from LDAP. The idea is to look up the MAC
408 address of the client in LDAP, and look for attributes on the form
409 ltspconfigsetting=value, and use this to export SETTING=value to the
410 LTSP clients.
</p
>
412 <p
>The goal is to be able to store the LTSP configuration attributes
413 in a
"computer
" LDAP object used by both DNS and DHCP, and thus
414 allowing us to store all information about a computer in one place.
</p
>
416 <p
>This is a untested draft implementation, and I welcome feedback on
417 this approach. A real LDAP schema for the ltspClientAux objectclass
418 need to be written. Comments, suggestions, etc?
</p
>
420 <blockquote
><pre
>
421 # Store in /opt/ltsp/$arch/usr/share/ltsp/ltsp_config.d/ldap-config
423 # Fetch LTSP client settings from LDAP based on MAC address
425 # Uses ethernet address as stored in the dhcpHost objectclass using
426 # the dhcpHWAddress attribute or ethernet address stored in the
427 # ieee802Device objectclass with the macAddress attribute.
429 # This module is written to be schema agnostic, and only depend on the
430 # existence of attribute names.
432 # The LTSP configuration variables are saved directly using a
433 # ltspConfig prefix and uppercasing the rest of the attribute name.
434 # To set the SERVER variable, set the ltspConfigServer attribute.
436 # Some LDAP schema should be created with all the relevant
437 # configuration settings. Something like this should work:
439 # objectclass (
1.1.2.2 NAME
'ltspClientAux
'
442 # MAY ( ltspConfigServer $ ltsConfigSound $ ... )
444 LDAPSERVER=$(debian-edu-ldapserver)
445 if [
"$LDAPSERVER
" ] ; then
446 LDAPBASE=$(debian-edu-ldapserver -b)
447 for MAC in $(LANG=C ifconfig |grep -i hwaddr| awk
'{print $
5}
'|sort -u) ; do
448 filter=
"(|(dhcpHWAddress=ethernet $MAC)(macAddress=$MAC))
"
449 ldapsearch -h
"$LDAPSERVER
" -b
"$LDAPBASE
" -v -x
"$filter
" | \
450 grep
'^ltspConfig
' | while read attr value ; do
451 # Remove prefix and convert to upper case
452 attr=$(echo $attr | sed
's/^ltspConfig//i
' | tr a-z A-Z)
453 # bass value on to clients
454 eval
"$attr=$value; export $attr
"
458 </pre
></blockquote
>
460 <p
>I
'm not sure this shell construction will work, because I suspect
461 the while block might end up in a subshell causing the variables set
462 there to not show up in ltsp-config, but if that is the case I am sure
463 the code can be restructured to make sure the variables are passed on.
464 I expect that can be solved with some testing. :)
</p
>
466 <p
>If you want to help out with implementing this for Debian Edu,
467 please contact us on debian-edu@lists.debian.org.
</p
>
472 <title>jXplorer, a very nice LDAP GUI
</title>
473 <link>http://people.skolelinux.org/pere/blog/jXplorer__a_very_nice_LDAP_GUI.html
</link>
474 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/jXplorer__a_very_nice_LDAP_GUI.html
</guid>
475 <pubDate>Fri,
9 Jul
2010 12:
55:
00 +
0200</pubDate>
478 <a href=
"http://people.skolelinux.org/pere/blog/LUMA__a_very_nice_LDAP_GUI.html
">my
479 last post
</a
> about available LDAP tools in Debian, I was told about a
480 LDAP GUI that is even better than luma. The java application
481 <a href=
"http://jxplorer.org/
">jXplorer
</a
> is claimed to be capable of
482 moving LDAP objects and subtrees using drag-and-drop, and can
483 authenticate using Kerberos. I have only tested the Kerberos
484 authentication, but do not have a LDAP setup allowing me to rewrite
485 LDAP with my test user yet. It is
486 <a href=
"http://packages.qa.debian.org/j/jxplorer.html
">available in
487 Debian
</a
> testing and unstable at the moment. The only problem I
488 have with it is how it handle errors. If something go wrong, its
489 non-intuitive behaviour require me to go through some query work list
490 and remove the failing query. Nothing big, but very annoying.
</p
>
495 <title>MS Word krøller det til for politiet?
</title>
496 <link>http://people.skolelinux.org/pere/blog/MS_Word_kr__ller_det_til_for_politiet_.html
</link>
497 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/MS_Word_kr__ller_det_til_for_politiet_.html
</guid>
498 <pubDate>Thu,
8 Jul
2010 14:
00:
00 +
0200</pubDate>
500 <p
>De siste dagene har Aftenposten
501 <a href=
"http://www.aftenposten.no/nyheter/iriks/article3718597.ece
">fortalt
</a
>
502 <a href=
"http://www.aftenposten.no/nyheter/iriks/article3724249.ece
">hvordan
</a
>
503 politet har brukt skriveverktøy som ikke håndterer arabisk tekst og
504 tekst som skal skrives fra høyre mot venstre når de har laget
505 løpeseddel for å be om informasjon fra publikum. Resultatet har vært
506 en uleselig arabisk-bit på løpeseddelen. Feilen har oppstått når
507 teksten har blitt
"kopiert inn i programvare som ikke har støtte for
508 språk som skrives fra høyre mot venstre
", og jeg er ganske sikker på
509 at det er snakk om Microsoft Office i dette tilfellet. Er det slik at
510 MS Office i norsk språkdrakt ikke har støtte for tekst som skal
511 skrives fra høyre mot venstre? Jeg tror alle utgaver av
512 OpenOffice.org har slik støtte, og det er jo ikke veldig vanskelig å
513 la slik støtte finnes i alle utgaver av et program hvis støtten først
514 er utviklet. Aftenpostens melding får meg til å undre om problemet
515 ville vært unngått hvis politiet brukte OpenOffice.org i stedet for MS
518 <p
>Mon tro om det er flere eksempler på at MS Office har ødelagt for
519 offentlig myndighet?
</p
>
524 <title>Lenny-
>Squeeze upgrades, apt vs aptitude with the Gnome desktop
</title>
525 <link>http://people.skolelinux.org/pere/blog/Lenny__Squeeze_upgrades__apt_vs_aptitude_with_the_Gnome_desktop.html
</link>
526 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Lenny__Squeeze_upgrades__apt_vs_aptitude_with_the_Gnome_desktop.html
</guid>
527 <pubDate>Sat,
3 Jul
2010 23:
55:
00 +
0200</pubDate>
529 <p
>Here is a short update on my
<a
530 href=
"http://people.skolelinux.org/~pere/debian-upgrade-testing/
">my
531 Debian Lenny-
>Squeeze upgrade testing
</a
>. Here is a summary of the
532 difference for Gnome when it is upgraded by apt-get and aptitude. I
'm
533 not reporting the status for KDE, because the upgrade crashes when
534 aptitude try because of missing conflicts
535 (
<a href=
"http://bugs.debian.org/
584861">#
584861</a
> and
536 <a href=
"http://bugs.debian.org/
585716">#
585716</a
>).
</p
>
538 <p
>At the end of the upgrade test script, dpkg -l is executed to get a
539 complete list of the installed packages. Based on this I see these
540 differences when I did a test run today. As usual, I do not really
541 know what the correct set of packages would be, but thought it best to
542 publish the difference.
</p
>
544 <p
>Installed using apt-get, missing with aptitude
</p
>
546 <blockquote
><p
>
547 at-spi cpp-
4.3 finger gnome-spell gstreamer0.10-gnomevfs
548 libatspi1.0-
0 libcupsys2 libeel2-data libgail-common libgdl-
1-common
549 libgnomeprint2.2-data libgnomeprintui2.2-common libgnomevfs2-bin
550 libgtksourceview-common libpt-
1.10.10-plugins-alsa
551 libpt-
1.10.10-plugins-v4l libservlet2.4-java libxalan2-java
552 libxerces2-java openoffice.org-writer2latex openssl-blacklist p7zip
553 python-
4suite-xml python-eggtrayicon python-gtkhtml2
554 python-gtkmozembed svgalibg1 xserver-xephyr zip
555 </p
></blockquote
>
557 <p
>Installed using apt-get, removed with aptitude
</p
>
559 <blockquote
><p
>
560 bluez-utils dhcdbd djvulibre-desktop epiphany-gecko
561 gnome-app-install gnome-mount gnome-vfs-obexftp gnome-volume-manager
562 libao2 libavahi-compat-libdnssd1 libavahi-core5 libbind9-
50
563 libbluetooth2 libcamel1.2-
11 libcdio7 libcucul0 libcurl3
564 libdirectfb-
1.0-
0 libdvdread3 libedata-cal1.2-
6 libedataserver1.2-
9
565 libeel2-
2.20 libepc-
1.0-
1 libepc-ui-
1.0-
1 libexchange-storage1.2-
3
566 libfaad0 libgd2-noxpm libgda3-
3 libgda3-common libggz2 libggzcore9
567 libggzmod4 libgksu1.2-
0 libgksuui1.0-
1 libgmyth0 libgnome-desktop-
2
568 libgnome-pilot2 libgnomecups1.0-
1 libgnomeprint2.2-
0
569 libgnomeprintui2.2-
0 libgpod3 libgraphviz4 libgtkhtml2-
0
570 libgtksourceview1.0-
0 libgucharmap6 libhesiod0 libicu38 libisccc50
571 libisccfg50 libiw29 libkpathsea4 libltdl3 liblwres50 libmagick++
10
572 libmagick10 libmalaga7 libmtp7 libmysqlclient15off libnautilus-burn4
573 libneon27 libnm-glib0 libnm-util0 libopal-
2.2 libosp5
574 libparted1.8-
10 libpisock9 libpisync1 libpoppler-glib3 libpoppler3
575 libpt-
1.10.10 libraw1394-
8 libsensors3 libsmbios2 libsoup2.2-
8
576 libssh2-
1 libsuitesparse-
3.1.0 libswfdec-
0.6-
90 libtalloc1
577 libtotem-plparser10 libtrackerclient0 libvoikko1 libxalan2-java-gcj
578 libxerces2-java-gcj libxklavier12 libxtrap6 libxxf86misc1 libzephyr3
579 mysql-common swfdec-gnome totem-gstreamer wodim
580 </p
></blockquote
>
582 <p
>Installed using aptitude, missing with apt-get
</p
>
584 <blockquote
><p
>
585 gnome gnome-desktop-environment hamster-applet python-gnomeapplet
586 python-gnomekeyring python-wnck rhythmbox-plugins xorg
587 xserver-xorg-input-all xserver-xorg-input-evdev
588 xserver-xorg-input-kbd xserver-xorg-input-mouse
589 xserver-xorg-input-synaptics xserver-xorg-video-all
590 xserver-xorg-video-apm xserver-xorg-video-ark xserver-xorg-video-ati
591 xserver-xorg-video-chips xserver-xorg-video-cirrus
592 xserver-xorg-video-dummy xserver-xorg-video-fbdev
593 xserver-xorg-video-glint xserver-xorg-video-i128
594 xserver-xorg-video-i740 xserver-xorg-video-mach64
595 xserver-xorg-video-mga xserver-xorg-video-neomagic
596 xserver-xorg-video-nouveau xserver-xorg-video-nv
597 xserver-xorg-video-r128 xserver-xorg-video-radeon
598 xserver-xorg-video-radeonhd xserver-xorg-video-rendition
599 xserver-xorg-video-s3 xserver-xorg-video-s3virge
600 xserver-xorg-video-savage xserver-xorg-video-siliconmotion
601 xserver-xorg-video-sis xserver-xorg-video-sisusb
602 xserver-xorg-video-tdfx xserver-xorg-video-tga
603 xserver-xorg-video-trident xserver-xorg-video-tseng
604 xserver-xorg-video-vesa xserver-xorg-video-vmware
605 xserver-xorg-video-voodoo
606 </p
></blockquote
>
608 <p
>Installed using aptitude, removed with apt-get
</p
>
610 <blockquote
><p
>
611 deskbar-applet xserver-xorg xserver-xorg-core
612 xserver-xorg-input-wacom xserver-xorg-video-intel
613 xserver-xorg-video-openchrome
614 </p
></blockquote
>
616 <p
>I was told on IRC that the xorg-xserver package was
617 <a href=
"http://git.debian.org/?p=pkg-xorg/xserver/xorg-server.git;a=commit;h=
9c8080d06c457932d3bfec021c69ac000aa60120
">changed
618 in git
</a
> today to try to get apt-get to not remove xorg completely.
619 No idea when it hits Squeeze, but when it does I hope it will reduce
620 the difference somewhat.
625 <title>Caching password, user and group on a roaming Debian laptop
</title>
626 <link>http://people.skolelinux.org/pere/blog/Caching_password__user_and_group_on_a_roaming_Debian_laptop.html
</link>
627 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Caching_password__user_and_group_on_a_roaming_Debian_laptop.html
</guid>
628 <pubDate>Thu,
1 Jul
2010 11:
40:
00 +
0200</pubDate>
630 <p
>For a laptop, centralized user directories and password checking is
631 a bit troubling. Laptops are typically used also when not connected
632 to the network, and it is vital for a user to be able to log in or
633 unlock the screen saver also when a central server is unavailable.
634 This is possible by caching passwords and directory information (user
635 and group attributes) locally, and the packages to do so are available
636 in Debian. Here follow two recipes to set this up in Debian/Squeeze.
637 It is also possible to set up in Debian/Lenny, but require more manual
638 setup there because pam-auth-update is missing in Lenny.
</p
>
640 <h2
>LDAP/Kerberos + nscd + libpam-ccreds + libpam-mklocaluser/pam_mkhomedir
</h2
>
642 This is the traditional method with a twist. The password caching is
643 provided by libpam-ccreds (version
10-
4 or later is needed on
644 Squeeze), and the directory caching is done by nscd. The directory
645 lookup and password checking is done using LDAP. If one want to use
646 Kerberos for password checking the libpam-ldapd package can be
647 replaced with libpam-krb5 or libpam-heimdal. If one is happy having a
648 local home directory with the path listed in LDAP, one can use the
649 pam_mkhomedir module from pam-modules to make this happen instead of
650 using libpam-mklocaluser. A setup for pam-auth-update to enable
651 pam_mkhomedir will have to be written until a fix for
652 <a href=
"http://bugs.debian.org/
568577">bug #
568577</a
> is in the
653 archive. Because I believe it is a bad idea to have local home
654 directories using misleading paths like /site/server/partition/, I
655 prefer to create a local user with the home directory in /home/. This
656 is done using the libpam-mklocaluser package.
</p
>
658 <p
>These packages need to be installed and configured
</p
>
660 <blockquote
><pre
>
661 libnss-ldapd libpam-ldapd nscd libpam-ccreds libpam-mklocaluser
662 </pre
></blockquote
>
664 <p
>The ldapd packages will ask for LDAP connection information, and
665 one have to fill in the values that fits ones own site. Make sure the
666 PAM part uses encrypted connections, to make sure the password is not
667 sent in clear text to the LDAP server. I
've been unable to get TLS
668 certificate checking for a self signed certificate working, which make
669 LDAP authentication unsafe for Debian Edu (nslcd is not checking if it
670 is talking to the correct LDAP server), and very much welcome feedback
671 on how to get this working.
</p
>
673 <p
>Because nscd do not have a default configuration fit for offline
674 caching until
<a href=
"http://bugs.debian.org/
485282">bug #
485282</a
>
675 is fixed, this configuration should be used instead of the one
676 currently in /etc/nscd.conf. The changes are in the fields
677 reload-count and positive-time-to-live, and is based on the
678 instructions I found in the
679 <a href=
"http://www.flyn.org/laptopldap/
">LDAP for Mobile Laptops
</a
>
680 instructions by Flyn Computing.
</p
>
682 <blockquote
><pre
>
684 reload-count unlimited
687 enable-cache passwd yes
688 positive-time-to-live passwd
2592000
689 negative-time-to-live passwd
20
690 suggested-size passwd
211
691 check-files passwd yes
692 persistent passwd yes
694 max-db-size passwd
33554432
695 auto-propagate passwd yes
697 enable-cache group yes
698 positive-time-to-live group
2592000
699 negative-time-to-live group
20
700 suggested-size group
211
701 check-files group yes
704 max-db-size group
33554432
705 auto-propagate group yes
707 enable-cache hosts no
708 positive-time-to-live hosts
2592000
709 negative-time-to-live hosts
20
710 suggested-size hosts
211
711 check-files hosts yes
714 max-db-size hosts
33554432
716 enable-cache services yes
717 positive-time-to-live services
2592000
718 negative-time-to-live services
20
719 suggested-size services
211
720 check-files services yes
721 persistent services yes
723 max-db-size services
33554432
724 </pre
></blockquote
>
726 <p
>While we wait for a mechanism to update /etc/nsswitch.conf
727 automatically like the one provided in
728 <a href=
"http://bugs.debian.org/
496915">bug #
496915</a
>, the file
729 content need to be manually replaced to ensure LDAP is used as the
730 directory service on the machine. /etc/nsswitch.conf should normally
731 look like this:
</p
>
733 <blockquote
><pre
>
737 hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
744 </pre
></blockquote
>
746 <p
>The important parts are that ldap is listed last for passwd, group,
747 shadow and netgroup.
</p
>
749 <p
>With these changes in place, any user in LDAP will be able to log
750 in locally on the machine using for example kdm, get a local home
751 directory created and have the password as well as user and group
754 <h2
>LDAP/Kerberos + nss-updatedb + libpam-ccreds +
755 libpam-mklocaluser/pam_mkhomedir
</h2
>
757 <p
>Because nscd have had its share of problems, and seem to have
758 problems doing proper caching, I
've seen suggestions and recipes to
759 use nss-updatedb to copy parts of the LDAP database locally when the
760 LDAP database is available. I have not tested such setup, because I
761 discovered sssd.
</p
>
763 <h2
>LDAP/Kerberos + sssd + libpam-mklocaluser
</h2
>
765 <p
>A more flexible and robust setup than the nscd combination
766 mentioned earlier that has shown up recently, is the
767 <a href=
"https://fedorahosted.org/sssd/
">sssd
</a
> package from Redhat.
768 It is part of the
<a href=
"http://www.freeipa.org/
">FreeIPA
</A
> project
769 to provide a Active Directory like directory service for Linux
770 machines. The sssd system combines the caching of passwords and user
771 information into one package, and remove the need for nscd and
772 libpam-ccreds. It support LDAP and Kerberos, but not NIS. Version
773 1.2 do not support netgroups, but it is said that it will support this
774 in version
1.5 expected to show up later in
2010. Because the
775 <a href=
"http://packages.qa.debian.org/s/sssd.html
">sssd package
</a
>
776 was missing in Debian, I ended up co-maintaining it with Werner, and
777 version
1.2 is now in testing.
779 <p
>These packages need to be installed and configured to get the
780 roaming setup I want
</p
>
782 <blockquote
><pre
>
783 libpam-sss libnss-sss libpam-mklocaluser
784 </pre
></blockquote
>
786 The complete setup of sssd is done by editing/creating
787 <tt
>/etc/sssd/sssd.conf
</tt
>.
789 <blockquote
><pre
>
791 config_file_version =
2
792 reconnection_retries =
3
800 reconnection_retries =
3
803 reconnection_retries =
3
807 cache_credentials = true
811 chpass_provider = ldap
813 ldap_uri = ldap://ldap
814 ldap_search_base = dc=skole,dc=skolelinux,dc=no
815 ldap_tls_reqcert = never
816 ldap_tls_cacert = /etc/ssl/certs/ca-certificates.crt
817 </pre
></blockquote
>
819 <p
>I got the same problem here with certificate checking. Had to set
820 "ldap_tls_reqcert = never
" to get it working.
</p
>
822 <p
>With the libnss-sss package in testing at the moment, the
823 nsswitch.conf file is update automatically, so there is no need to
824 modify it manually.
</p
>
826 <p
>If you want to help out with implementing this for Debian Edu,
827 please contact us on debian-edu@lists.debian.org.
</p
>
832 <title>LUMA, a very nice LDAP GUI
</title>
833 <link>http://people.skolelinux.org/pere/blog/LUMA__a_very_nice_LDAP_GUI.html
</link>
834 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/LUMA__a_very_nice_LDAP_GUI.html
</guid>
835 <pubDate>Mon,
28 Jun
2010 00:
30:
00 +
0200</pubDate>
837 <p
>The last few days I have been looking into the status of the LDAP
838 directory in Debian Edu, and in the process I started to miss a GUI
839 tool to browse the LDAP tree. The only one I was able to find in
840 Debian/Squeeze and Lenny is
841 <a href=
"http://luma.sourceforge.net/
">LUMA
</a
>, which has proved to
842 be a great tool to get a overview of the current LDAP directory
843 populated by default in Skolelinux. Thanks to it, I have been able to
844 find empty and obsolete subtrees, misplaced objects and duplicate
845 objects. It will be installed by default in Debian/Squeeze. If you
846 are working with LDAP, give it a go. :)
</p
>
848 <p
>I did notice one problem with it I have not had time to report to
849 the BTS yet. There is no .desktop file in the package, so the tool do
850 not show up in the Gnome and KDE menus, but only deep down in in the
851 Debian submenu in KDE. I hope that can be fixed before Squeeze is
854 <p
>I have not yet been able to get it to modify the tree yet. I would
855 like to move objects and remove subtrees directly in the GUI, but have
856 not found a way to do that with LUMA yet. So in the mean time, I use
857 <a href=
"http://www.lichteblau.com/ldapvi/
">ldapvi
</a
> for that.
</p
>
859 <p
>If you have tips on other GUI tools for LDAP that might be useful
860 in Debian Edu, please contact us on debian-edu@lists.debian.org.
</p
>
862 <p
>Update
2010-
06-
29: Ross Reedstrom tipped us about the
863 <a href=
"http://packages.qa.debian.org/g/gq.html
">gq
</a
> package as a
864 useful GUI alternative. It seem like a good tool, but is unmaintained
865 in Debian and got a RC bug keeping it out of Squeeze. Unless that
866 changes, it will not be an option for Debian Edu based on Squeeze.
</p
>
871 <title>Idea for a change to LDAP schemas allowing DNS and DHCP info to be combined into one object
</title>
872 <link>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
</link>
873 <guid isPermaLink=
"true">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
</guid>
874 <pubDate>Thu,
24 Jun
2010 00:
35:
00 +
0200</pubDate>
876 <p
>A while back, I
877 <a href=
"http://people.skolelinux.org/pere/blog/Time_for_new__LDAP_schemas_replacing_RFC_2307_.html
">complained
878 about the fact
</a
> that it is not possible with the provided schemas
879 for storing DNS and DHCP information in LDAP to combine the two sets
880 of information into one LDAP object representing a computer.
</p
>
882 <p
>In the mean time, I discovered that a simple fix would be to make
883 the dhcpHost object class auxiliary, to allow it to be combined with
884 the dNSDomain object class, and thus forming one object for one
885 computer when storing both DHCP and DNS information in LDAP.
</p
>
887 <p
>If I understand this correctly, it is not safe to do this change
888 without also changing the assigned number for the object class, and I
889 do not know enough about LDAP schema design to do that properly for
890 Debian Edu.
</p
>
892 <p
>Anyway, for future reference, this is how I believe we could change
894 <a href=
"http://tools.ietf.org/html/draft-ietf-dhc-ldap-schema-
00">DHCP
895 schema
</a
> to solve at least part of the problem with the LDAP schemas
896 available today from IETF.
</p
>
899 --- dhcp.schema (revision
65192)
900 +++ dhcp.schema (working copy)
902 objectclass (
2.16.840.1.113719.1.203.6.6
903 NAME
'dhcpHost
'
904 DESC
'This represents information about a particular client
'
908 MAY (dhcpLeaseDN $ dhcpHWAddress $ dhcpOptionsDN $ dhcpStatements $ dhcpComments $ dhcpOption)
909 X-NDS_CONTAINMENT (
'dhcpService
' 'dhcpSubnet
' 'dhcpGroup
') )
912 <p
>I very much welcome clues on how to do this properly for Debian
913 Edu/Squeeze. We provide the DHCP schema in our debian-edu-config
914 package, and should thus be free to rewrite it as we see fit.
</p
>
916 <p
>If you want to help out with implementing this for Debian Edu,
917 please contact us on debian-edu@lists.debian.org.
</p
>
922 <title>Calling tasksel like the installer, while still getting useful output
</title>
923 <link>http://people.skolelinux.org/pere/blog/Calling_tasksel_like_the_installer__while_still_getting_useful_output.html
</link>
924 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Calling_tasksel_like_the_installer__while_still_getting_useful_output.html
</guid>
925 <pubDate>Wed,
16 Jun
2010 14:
55:
00 +
0200</pubDate>
927 <p
>A few times I have had the need to simulate the way tasksel
928 installs packages during the normal debian-installer run. Until now,
929 I have ended up letting tasksel do the work, with the annoying problem
930 of not getting any feedback at all when something fails (like a
931 conffile question from dpkg or a download that fails), using code like
934 <blockquote
><pre
>
935 export DEBIAN_FRONTEND=noninteractive
936 tasksel --new-install
937 </pre
></blockquote
>
939 This would invoke tasksel, let its automatic task selection pick the
940 tasks to install, and continue to install the requested tasks without
941 any output what so ever.
943 Recently I revisited this problem while working on the automatic
944 package upgrade testing, because tasksel would some times hang without
945 any useful feedback, and I want to see what is going on when it
946 happen. Then it occured to me, I can parse the output from tasksel
947 when asked to run in test mode, and use that aptitude command line
948 printed by tasksel then to simulate the tasksel run. I ended up using
951 <blockquote
><pre
>
952 export DEBIAN_FRONTEND=noninteractive
953 cmd=
"$(in_target tasksel -t --new-install | sed
's/debconf-apt-progress -- //
')
"
955 </pre
></blockquote
>
957 <p
>The content of $cmd is typically something like
"<tt
>aptitude -q
958 --without-recommends -o APT::Install-Recommends=no -y install
959 ~t^desktop$ ~t^gnome-desktop$ ~t^laptop$ ~pstandard ~prequired
960 ~pimportant
</tt
>", which will install the gnome desktop task, the
961 laptop task and all packages with priority standard , required and
962 important, just like tasksel would have done it during
963 installation.
</p
>
965 <p
>A better approach is probably to extend tasksel to be able to
966 install packages without using debconf-apt-progress, for use cases