]> pere.pagekite.me Git - homepage.git/blob - blog/tags/ldap/ldap.rss
90fb48fb2038fa9dbb73fab85fc909110f803d23
[homepage.git] / blog / tags / ldap / ldap.rss
1 <?xml version="1.0" encoding="utf-8"?>
2 <rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/'>
3 <channel>
4 <title>Petter Reinholdtsen - Entries tagged ldap</title>
5 <description>Entries tagged ldap</description>
6 <link>http://people.skolelinux.org/pere/blog/</link>
7
8
9 <item>
10 <title>Time for new LDAP schemas replacing RFC 2307?</title>
11 <link>http://people.skolelinux.org/pere/blog/Time_for_new__LDAP_schemas_replacing_RFC_2307_.html</link>
12 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Time_for_new__LDAP_schemas_replacing_RFC_2307_.html</guid>
13 <pubDate>Sun, 29 Mar 2009 20:30:00 +0200</pubDate>
14 <description>
15 &lt;p&gt;The state of standardized LDAP schemas on Linux is far from
16 optimal. There is RFC 2307 documenting one way to store NIS maps in
17 LDAP, and a modified version of this normally called RFC 2307bis, with
18 some modifications to be compatible with Active Directory. The RFC
19 specification handle the content of a lot of system databases, but do
20 not handle DNS zones and DHCP configuration.&lt;/p&gt;
21
22 &lt;p&gt;In &lt;a href=&quot;http://www.skolelinux.org/&quot;&gt;Debian Edu/Skolelinux&lt;/a&gt;,
23 we would like to store information about users, SMB clients/hosts,
24 filegroups, netgroups (users and hosts), DHCP and DNS configuration,
25 and LTSP configuration in LDAP. These objects have a lot in common,
26 but with the current LDAP schemas it is not possible to have one
27 object per entity. For example, one need to have at least three LDAP
28 objects for a given computer, one with the SMB related stuff, one with
29 DNS information and another with DHCP information. The schemas
30 provided for DNS and DHCP are impossible to combine into one LDAP
31 object. In addition, it is impossible to implement quick queries for
32 netgroup membership, because of the way NIS triples are implemented.
33 It just do not scale. I believe it is time for a few RFC
34 specifications to cleam up this mess.&lt;/p&gt;
35
36 &lt;p&gt;I would like to have one LDAP object representing each computer in
37 the network, and this object can then keep the SMB (ie host key), DHCP
38 (mac address/name) and DNS (name/IP address) settings in one place.
39 It need to be efficently stored to make sure it scale well.&lt;/p&gt;
40
41 &lt;p&gt;I would also like to have a quick way to map from a user or
42 computer and to the net group this user or computer is a member.&lt;/p&gt;
43
44 &lt;p&gt;Active Directory have done a better job than unix heads like myself
45 in this regard, and the unix side need to catch up. Time to start a
46 new IETF work group?&lt;/p&gt;
47 </description>
48 </item>
49
50 <item>
51 <title>Idea for a change to LDAP schemas allowing DNS and DHCP info to be combined into one object</title>
52 <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>
53 <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>
54 <pubDate>Thu, 24 Jun 2010 00:35:00 +0200</pubDate>
55 <description>
56 &lt;p&gt;A while back, I
57 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Time_for_new__LDAP_schemas_replacing_RFC_2307_.html&quot;&gt;complained
58 about the fact&lt;/a&gt; that it is not possible with the provided schemas
59 for storing DNS and DHCP information in LDAP to combine the two sets
60 of information into one LDAP object representing a computer.&lt;/p&gt;
61
62 &lt;p&gt;In the mean time, I discovered that a simple fix would be to make
63 the dhcpHost object class auxiliary, to allow it to be combined with
64 the dNSDomain object class, and thus forming one object for one
65 computer when storing both DHCP and DNS information in LDAP.&lt;/p&gt;
66
67 &lt;p&gt;If I understand this correctly, it is not safe to do this change
68 without also changing the assigned number for the object class, and I
69 do not know enough about LDAP schema design to do that properly for
70 Debian Edu.&lt;/p&gt;
71
72 &lt;p&gt;Anyway, for future reference, this is how I believe we could change
73 the
74 &lt;a href=&quot;http://tools.ietf.org/html/draft-ietf-dhc-ldap-schema-00&quot;&gt;DHCP
75 schema&lt;/a&gt; to solve at least part of the problem with the LDAP schemas
76 available today from IETF.&lt;/p&gt;
77
78 &lt;pre&gt;
79 --- dhcp.schema (revision 65192)
80 +++ dhcp.schema (working copy)
81 @@ -376,7 +376,7 @@
82 objectclass ( 2.16.840.1.113719.1.203.6.6
83 NAME &#39;dhcpHost&#39;
84 DESC &#39;This represents information about a particular client&#39;
85 - SUP top
86 + SUP top AUXILIARY
87 MUST cn
88 MAY (dhcpLeaseDN $ dhcpHWAddress $ dhcpOptionsDN $ dhcpStatements $ dhcpComments $ dhcpOption)
89 X-NDS_CONTAINMENT (&#39;dhcpService&#39; &#39;dhcpSubnet&#39; &#39;dhcpGroup&#39;) )
90 &lt;/pre&gt;
91
92 &lt;p&gt;I very much welcome clues on how to do this properly for Debian
93 Edu/Squeeze. We provide the DHCP schema in our debian-edu-config
94 package, and should thus be free to rewrite it as we see fit.&lt;/p&gt;
95
96 &lt;p&gt;If you want to help out with implementing this for Debian Edu,
97 please contact us on debian-edu@lists.debian.org.&lt;/p&gt;
98 </description>
99 </item>
100
101 <item>
102 <title>LUMA, a very nice LDAP GUI</title>
103 <link>http://people.skolelinux.org/pere/blog/LUMA__a_very_nice_LDAP_GUI.html</link>
104 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/LUMA__a_very_nice_LDAP_GUI.html</guid>
105 <pubDate>Mon, 28 Jun 2010 00:30:00 +0200</pubDate>
106 <description>
107 &lt;p&gt;The last few days I have been looking into the status of the LDAP
108 directory in Debian Edu, and in the process I started to miss a GUI
109 tool to browse the LDAP tree. The only one I was able to find in
110 Debian/Squeeze and Lenny is
111 &lt;a href=&quot;http://luma.sourceforge.net/&quot;&gt;LUMA&lt;/a&gt;, which has proved to
112 be a great tool to get a overview of the current LDAP directory
113 populated by default in Skolelinux. Thanks to it, I have been able to
114 find empty and obsolete subtrees, misplaced objects and duplicate
115 objects. It will be installed by default in Debian/Squeeze. If you
116 are working with LDAP, give it a go. :)&lt;/p&gt;
117
118 &lt;p&gt;I did notice one problem with it I have not had time to report to
119 the BTS yet. There is no .desktop file in the package, so the tool do
120 not show up in the Gnome and KDE menus, but only deep down in in the
121 Debian submenu in KDE. I hope that can be fixed before Squeeze is
122 released.&lt;/p&gt;
123
124 &lt;p&gt;I have not yet been able to get it to modify the tree yet. I would
125 like to move objects and remove subtrees directly in the GUI, but have
126 not found a way to do that with LUMA yet. So in the mean time, I use
127 &lt;a href=&quot;http://www.lichteblau.com/ldapvi/&quot;&gt;ldapvi&lt;/a&gt; for that.&lt;/p&gt;
128
129 &lt;p&gt;If you have tips on other GUI tools for LDAP that might be useful
130 in Debian Edu, please contact us on debian-edu@lists.debian.org.&lt;/p&gt;
131
132 &lt;p&gt;Update 2010-06-29: Ross Reedstrom tipped us about the
133 &lt;a href=&quot;http://packages.qa.debian.org/g/gq.html&quot;&gt;gq&lt;/a&gt; package as a
134 useful GUI alternative. It seem like a good tool, but is unmaintained
135 in Debian and got a RC bug keeping it out of Squeeze. Unless that
136 changes, it will not be an option for Debian Edu based on Squeeze.&lt;/p&gt;
137 </description>
138 </item>
139
140 <item>
141 <title>Caching password, user and group on a roaming Debian laptop</title>
142 <link>http://people.skolelinux.org/pere/blog/Caching_password__user_and_group_on_a_roaming_Debian_laptop.html</link>
143 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Caching_password__user_and_group_on_a_roaming_Debian_laptop.html</guid>
144 <pubDate>Thu, 1 Jul 2010 11:40:00 +0200</pubDate>
145 <description>
146 &lt;p&gt;For a laptop, centralized user directories and password checking is
147 a bit troubling. Laptops are typically used also when not connected
148 to the network, and it is vital for a user to be able to log in or
149 unlock the screen saver also when a central server is unavailable.
150 This is possible by caching passwords and directory information (user
151 and group attributes) locally, and the packages to do so are available
152 in Debian. Here follow two recipes to set this up in Debian/Squeeze.
153 It is also possible to set up in Debian/Lenny, but require more manual
154 setup there because pam-auth-update is missing in Lenny.&lt;/p&gt;
155
156 &lt;h2&gt;LDAP/Kerberos + nscd + libpam-ccreds + libpam-mklocaluser/pam_mkhomedir&lt;/h2&gt;
157
158 This is the traditional method with a twist. The password caching is
159 provided by libpam-ccreds (version 10-4 or later is needed on
160 Squeeze), and the directory caching is done by nscd. The directory
161 lookup and password checking is done using LDAP. If one want to use
162 Kerberos for password checking the libpam-ldapd package can be
163 replaced with libpam-krb5 or libpam-heimdal. If one is happy having a
164 local home directory with the path listed in LDAP, one can use the
165 pam_mkhomedir module from pam-modules to make this happen instead of
166 using libpam-mklocaluser. A setup for pam-auth-update to enable
167 pam_mkhomedir will have to be written until a fix for
168 &lt;a href=&quot;http://bugs.debian.org/568577&quot;&gt;bug #568577&lt;/a&gt; is in the
169 archive. Because I believe it is a bad idea to have local home
170 directories using misleading paths like /site/server/partition/, I
171 prefer to create a local user with the home directory in /home/. This
172 is done using the libpam-mklocaluser package.&lt;/p&gt;
173
174 &lt;p&gt;These packages need to be installed and configured&lt;/p&gt;
175
176 &lt;blockquote&gt;&lt;pre&gt;
177 libnss-ldapd libpam-ldapd nscd libpam-ccreds libpam-mklocaluser
178 &lt;/pre&gt;&lt;/blockquote&gt;
179
180 &lt;p&gt;The ldapd packages will ask for LDAP connection information, and
181 one have to fill in the values that fits ones own site. Make sure the
182 PAM part uses encrypted connections, to make sure the password is not
183 sent in clear text to the LDAP server. I&#39;ve been unable to get TLS
184 certificate checking for a self signed certificate working, which make
185 LDAP authentication unsafe for Debian Edu (nslcd is not checking if it
186 is talking to the correct LDAP server), and very much welcome feedback
187 on how to get this working.&lt;/p&gt;
188
189 &lt;p&gt;Because nscd do not have a default configuration fit for offline
190 caching until &lt;a href=&quot;http://bugs.debian.org/485282&quot;&gt;bug #485282&lt;/a&gt;
191 is fixed, this configuration should be used instead of the one
192 currently in /etc/nscd.conf. The changes are in the fields
193 reload-count and positive-time-to-live, and is based on the
194 instructions I found in the
195 &lt;a href=&quot;http://www.flyn.org/laptopldap/&quot;&gt;LDAP for Mobile Laptops&lt;/a&gt;
196 instructions by Flyn Computing.&lt;/p&gt;
197
198 &lt;blockquote&gt;&lt;pre&gt;
199 debug-level 0
200 reload-count unlimited
201 paranoia no
202
203 enable-cache passwd yes
204 positive-time-to-live passwd 2592000
205 negative-time-to-live passwd 20
206 suggested-size passwd 211
207 check-files passwd yes
208 persistent passwd yes
209 shared passwd yes
210 max-db-size passwd 33554432
211 auto-propagate passwd yes
212
213 enable-cache group yes
214 positive-time-to-live group 2592000
215 negative-time-to-live group 20
216 suggested-size group 211
217 check-files group yes
218 persistent group yes
219 shared group yes
220 max-db-size group 33554432
221 auto-propagate group yes
222
223 enable-cache hosts no
224 positive-time-to-live hosts 2592000
225 negative-time-to-live hosts 20
226 suggested-size hosts 211
227 check-files hosts yes
228 persistent hosts yes
229 shared hosts yes
230 max-db-size hosts 33554432
231
232 enable-cache services yes
233 positive-time-to-live services 2592000
234 negative-time-to-live services 20
235 suggested-size services 211
236 check-files services yes
237 persistent services yes
238 shared services yes
239 max-db-size services 33554432
240 &lt;/pre&gt;&lt;/blockquote&gt;
241
242 &lt;p&gt;While we wait for a mechanism to update /etc/nsswitch.conf
243 automatically like the one provided in
244 &lt;a href=&quot;http://bugs.debian.org/496915&quot;&gt;bug #496915&lt;/a&gt;, the file
245 content need to be manually replaced to ensure LDAP is used as the
246 directory service on the machine. /etc/nsswitch.conf should normally
247 look like this:&lt;/p&gt;
248
249 &lt;blockquote&gt;&lt;pre&gt;
250 passwd: files ldap
251 group: files ldap
252 shadow: files ldap
253 hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
254 networks: files
255 protocols: files
256 services: files
257 ethers: files
258 rpc: files
259 netgroup: files ldap
260 &lt;/pre&gt;&lt;/blockquote&gt;
261
262 &lt;p&gt;The important parts are that ldap is listed last for passwd, group,
263 shadow and netgroup.&lt;/p&gt;
264
265 &lt;p&gt;With these changes in place, any user in LDAP will be able to log
266 in locally on the machine using for example kdm, get a local home
267 directory created and have the password as well as user and group
268 attributes cached.
269
270 &lt;h2&gt;LDAP/Kerberos + nss-updatedb + libpam-ccreds +
271 libpam-mklocaluser/pam_mkhomedir&lt;/h2&gt;
272
273 &lt;p&gt;Because nscd have had its share of problems, and seem to have
274 problems doing proper caching, I&#39;ve seen suggestions and recipes to
275 use nss-updatedb to copy parts of the LDAP database locally when the
276 LDAP database is available. I have not tested such setup, because I
277 discovered sssd.&lt;/p&gt;
278
279 &lt;h2&gt;LDAP/Kerberos + sssd + libpam-mklocaluser&lt;/h2&gt;
280
281 &lt;p&gt;A more flexible and robust setup than the nscd combination
282 mentioned earlier that has shown up recently, is the
283 &lt;a href=&quot;https://fedorahosted.org/sssd/&quot;&gt;sssd&lt;/a&gt; package from Redhat.
284 It is part of the &lt;a href=&quot;http://www.freeipa.org/&quot;&gt;FreeIPA&lt;/A&gt; project
285 to provide a Active Directory like directory service for Linux
286 machines. The sssd system combines the caching of passwords and user
287 information into one package, and remove the need for nscd and
288 libpam-ccreds. It support LDAP and Kerberos, but not NIS. Version
289 1.2 do not support netgroups, but it is said that it will support this
290 in version 1.5 expected to show up later in 2010. Because the
291 &lt;a href=&quot;http://packages.qa.debian.org/s/sssd.html&quot;&gt;sssd package&lt;/a&gt;
292 was missing in Debian, I ended up co-maintaining it with Werner, and
293 version 1.2 is now in testing.
294
295 &lt;p&gt;These packages need to be installed and configured to get the
296 roaming setup I want&lt;/p&gt;
297
298 &lt;blockquote&gt;&lt;pre&gt;
299 libpam-sss libnss-sss libpam-mklocaluser
300 &lt;/pre&gt;&lt;/blockquote&gt;
301
302 The complete setup of sssd is done by editing/creating
303 &lt;tt&gt;/etc/sssd/sssd.conf&lt;/tt&gt;.
304
305 &lt;blockquote&gt;&lt;pre&gt;
306 [sssd]
307 config_file_version = 2
308 reconnection_retries = 3
309 sbus_timeout = 30
310 services = nss, pam
311 domains = INTERN
312
313 [nss]
314 filter_groups = root
315 filter_users = root
316 reconnection_retries = 3
317
318 [pam]
319 reconnection_retries = 3
320
321 [domain/INTERN]
322 enumerate = false
323 cache_credentials = true
324
325 id_provider = ldap
326 auth_provider = ldap
327 chpass_provider = ldap
328
329 ldap_uri = ldap://ldap
330 ldap_search_base = dc=skole,dc=skolelinux,dc=no
331 ldap_tls_reqcert = never
332 ldap_tls_cacert = /etc/ssl/certs/ca-certificates.crt
333 &lt;/pre&gt;&lt;/blockquote&gt;
334
335 &lt;p&gt;I got the same problem here with certificate checking. Had to set
336 &quot;ldap_tls_reqcert = never&quot; to get it working.&lt;/p&gt;
337
338 &lt;p&gt;With the libnss-sss package in testing at the moment, the
339 nsswitch.conf file is update automatically, so there is no need to
340 modify it manually.&lt;/p&gt;
341
342 &lt;p&gt;If you want to help out with implementing this for Debian Edu,
343 please contact us on debian-edu@lists.debian.org.&lt;/p&gt;
344 </description>
345 </item>
346
347 </channel>
348 </rss>