Remove manpage when there are errors during generation
[sfrench/samba-autobuild/.git] / docs / htmldocs / samba-ldap-howto.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >Storing Samba's User/Machine Account information in an LDAP Directory</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
9 "><LINK
10 REL="HOME"
11 TITLE="SAMBA Project Documentation"
12 HREF="Samba-HOWTO.html"><LINK
13 REL="PREVIOUS"
14 TITLE="How to Act as a Backup Domain Controller in a Purely Samba Controlled Domain"
15 HREF="samba-bdc.html"><LINK
16 REL="NEXT"
17 TITLE="Improved browsing in samba"
18 HREF="improved-browsing.html"></HEAD
19 ><BODY
20 CLASS="CHAPTER"
21 BGCOLOR="#FFFFFF"
22 TEXT="#000000"
23 LINK="#0000FF"
24 VLINK="#840084"
25 ALINK="#0000FF"
26 ><DIV
27 CLASS="NAVHEADER"
28 ><TABLE
29 SUMMARY="Header navigation table"
30 WIDTH="100%"
31 BORDER="0"
32 CELLPADDING="0"
33 CELLSPACING="0"
34 ><TR
35 ><TH
36 COLSPAN="3"
37 ALIGN="center"
38 >SAMBA Project Documentation</TH
39 ></TR
40 ><TR
41 ><TD
42 WIDTH="10%"
43 ALIGN="left"
44 VALIGN="bottom"
45 ><A
46 HREF="samba-bdc.html"
47 ACCESSKEY="P"
48 >Prev</A
49 ></TD
50 ><TD
51 WIDTH="80%"
52 ALIGN="center"
53 VALIGN="bottom"
54 ></TD
55 ><TD
56 WIDTH="10%"
57 ALIGN="right"
58 VALIGN="bottom"
59 ><A
60 HREF="improved-browsing.html"
61 ACCESSKEY="N"
62 >Next</A
63 ></TD
64 ></TR
65 ></TABLE
66 ><HR
67 ALIGN="LEFT"
68 WIDTH="100%"></DIV
69 ><DIV
70 CLASS="CHAPTER"
71 ><H1
72 ><A
73 NAME="SAMBA-LDAP-HOWTO">Chapter 14. Storing Samba's User/Machine Account information in an LDAP Directory</H1
74 ><DIV
75 CLASS="SECT1"
76 ><H1
77 CLASS="SECT1"
78 ><A
79 NAME="AEN2350">14.1. Purpose</H1
80 ><P
81 >This document describes how to use an LDAP directory for storing Samba user
82 account information traditionally stored in the smbpasswd(5) file.  It is
83 assumed that the reader already has a basic understanding of LDAP concepts
84 and has a working directory server already installed.  For more information
85 on LDAP architectures and Directories, please refer to the following sites.</P
86 ><P
87 ></P
88 ><UL
89 ><LI
90 ><P
91 >OpenLDAP - <A
92 HREF="http://www.openldap.org/"
93 TARGET="_top"
94 >http://www.openldap.org/</A
95 ></P
96 ></LI
97 ><LI
98 ><P
99 >iPlanet Directory Server - <A
100 HREF="http://iplanet.netscape.com/directory"
101 TARGET="_top"
102 >http://iplanet.netscape.com/directory</A
103 ></P
104 ></LI
105 ></UL
106 ><P
107 >Note that <A
108 HREF="http://www.ora.com/"
109 TARGET="_top"
110 >O'Reilly Publishing</A
111 > is working on
112 a guide to LDAP for System Administrators which has a planned release date of
113 early summer, 2002.</P
114 ><P
115 >Two additional Samba resources which may prove to be helpful are</P
116 ><P
117 ></P
118 ><UL
119 ><LI
120 ><P
121 >The <A
122 HREF="http://www.unav.es/cti/ldap-smb/ldap-smb-2_2-howto.html"
123 TARGET="_top"
124 >Samba-PDC-LDAP-HOWTO</A
125 >
126         maintained by Ignacio Coupeau.</P
127 ></LI
128 ><LI
129 ><P
130 >The NT migration scripts from <A
131 HREF="http://samba.idealx.org/"
132 TARGET="_top"
133 >IDEALX</A
134 > that are
135         geared to manage users and group in such a Samba-LDAP Domain Controller configuration.
136         </P
137 ></LI
138 ></UL
139 ></DIV
140 ><DIV
141 CLASS="SECT1"
142 ><H1
143 CLASS="SECT1"
144 ><A
145 NAME="AEN2370">14.2. Introduction</H1
146 ><P
147 >Traditionally, when configuring <A
148 HREF="smb.conf.5.html#ENCRYPTPASSWORDS"
149 TARGET="_top"
150 >"encrypt
151 passwords = yes"</A
152 > in Samba's <TT
153 CLASS="FILENAME"
154 >smb.conf</TT
155 > file, user account
156 information such as username, LM/NT password hashes, password change times, and account
157 flags have been stored in the <TT
158 CLASS="FILENAME"
159 >smbpasswd(5)</TT
160 > file.  There are several
161 disadvantages to this approach for sites with very large numbers of users (counted
162 in the thousands).</P
163 ><P
164 ></P
165 ><UL
166 ><LI
167 ><P
168 >The first is that all lookups must be performed sequentially.  Given that
169 there are approximately two lookups per domain logon (one for a normal
170 session connection such as when mapping a network drive or printer), this
171 is a performance bottleneck for lareg sites.  What is needed is an indexed approach
172 such as is used in databases.</P
173 ></LI
174 ><LI
175 ><P
176 >The second problem is that administrators who desired to replicate a
177 smbpasswd file to more than one Samba server were left to use external
178 tools such as <B
179 CLASS="COMMAND"
180 >rsync(1)</B
181 > and <B
182 CLASS="COMMAND"
183 >ssh(1)</B
184 >
185 and wrote custom, in-house scripts.</P
186 ></LI
187 ><LI
188 ><P
189 >And finally, the amount of information which is stored in an
190 smbpasswd entry leaves no room for additional attributes such as
191 a home directory, password expiration time, or even a Relative
192 Identified (RID).</P
193 ></LI
194 ></UL
195 ><P
196 >As a result of these defeciencies, a more robust means of storing user attributes
197 used by smbd was developed.  The API which defines access to user accounts
198 is commonly referred to as the samdb interface (previously this was called the passdb
199 API, and is still so named in the CVS trees). In Samba 2.2.3, enabling support
200 for a samdb backend (e.g. <TT
201 CLASS="PARAMETER"
202 ><I
203 >--with-ldapsam</I
204 ></TT
205 > or
206 <TT
207 CLASS="PARAMETER"
208 ><I
209 >--with-tdbsam</I
210 ></TT
211 >) requires compile time support.</P
212 ><P
213 >When compiling Samba to include the <TT
214 CLASS="PARAMETER"
215 ><I
216 >--with-ldapsam</I
217 ></TT
218 > autoconf
219 option, smbd (and associated tools) will store and lookup user accounts in
220 an LDAP directory.  In reality, this is very easy to understand.  If you are
221 comfortable with using an smbpasswd file, simply replace "smbpasswd" with
222 "LDAP directory" in all the documentation.</P
223 ><P
224 >There are a few points to stress about what the <TT
225 CLASS="PARAMETER"
226 ><I
227 >--with-ldapsam</I
228 ></TT
229 >
230 does not provide.  The LDAP support referred to in the this documentation does not
231 include:</P
232 ><P
233 ></P
234 ><UL
235 ><LI
236 ><P
237 >A means of retrieving user account information from
238         an Windows 2000 Active Directory server.</P
239 ></LI
240 ><LI
241 ><P
242 >A means of replacing /etc/passwd.</P
243 ></LI
244 ></UL
245 ><P
246 >The second item can be accomplished by using LDAP NSS and PAM modules.  LGPL
247 versions of these libraries can be obtained from PADL Software
248 (<A
249 HREF="http://www.padl.com/"
250 TARGET="_top"
251 >http://www.padl.com/</A
252 >).  However,
253 the details of configuring these packages are beyond the scope of this document.</P
254 ></DIV
255 ><DIV
256 CLASS="SECT1"
257 ><H1
258 CLASS="SECT1"
259 ><A
260 NAME="AEN2399">14.3. Supported LDAP Servers</H1
261 ><P
262 >The LDAP samdb code in 2.2.3 has been developed and tested using the OpenLDAP
263 2.0 server and client libraries.  The same code should be able to work with
264 Netscape's Directory Server and client SDK. However, due to lack of testing
265 so far, there are bound to be compile errors and bugs.  These should not be
266 hard to fix. If you are so inclined, please be sure to forward all patches to
267 <A
268 HREF="samba-patches@samba.org"
269 TARGET="_top"
270 >samba-patches@samba.org</A
271 > and
272 <A
273 HREF="jerry@samba.org"
274 TARGET="_top"
275 >jerry@samba.org</A
276 >.</P
277 ></DIV
278 ><DIV
279 CLASS="SECT1"
280 ><H1
281 CLASS="SECT1"
282 ><A
283 NAME="AEN2404">14.4. Schema and Relationship to the RFC 2307 posixAccount</H1
284 ><P
285 >Samba 2.2.3 includes the necessary schema file for OpenLDAP 2.0 in
286 <TT
287 CLASS="FILENAME"
288 >examples/LDAP/samba.schema</TT
289 >.  (Note that this schema
290 file has been modified since the experimental support initially included
291 in 2.2.2).  The sambaAccount objectclass is given here:</P
292 ><P
293 ><PRE
294 CLASS="PROGRAMLISTING"
295 >objectclass ( 1.3.1.5.1.4.1.7165.2.2.2 NAME 'sambaAccount' SUP top STRUCTURAL
296      DESC 'Samba Account'
297      MUST ( uid $ rid )
298      MAY  ( cn $ lmPassword $ ntPassword $ pwdLastSet $ logonTime $
299             logoffTime $ kickoffTime $ pwdCanChange $ pwdMustChange $ acctFlags $
300             displayName $ smbHome $ homeDrive $ scriptPath $ profilePath $
301             description $ userWorkstations $ primaryGroupID $ domain ))</PRE
302 ></P
303 ><P
304 >The samba.schema file has been formatted for OpenLDAP 2.0.  The OID's are
305 owned by the Samba Team and as such is legal to be openly published.
306 If you translate the schema to be used with Netscape DS, please
307 submit the modified schema file as a patch to <A
308 HREF="jerry@samba.org"
309 TARGET="_top"
310 >jerry@samba.org</A
311 ></P
312 ><P
313 >Just as the smbpasswd file is mean to store information which supplements a
314 user's <TT
315 CLASS="FILENAME"
316 >/etc/passwd</TT
317 > entry, so is the sambaAccount object
318 meant to supplement the UNIX user account information.  A sambaAccount is a
319 <TT
320 CLASS="CONSTANT"
321 >STRUCTURAL</TT
322 > objectclass so it can be stored individually
323 in the directory.  However, there are several fields (e.g. uid) which overlap
324 with the posixAccount objectclass outlined in RFC2307.  This is by design.</P
325 ><P
326 >In order to store all user account information (UNIX and Samba) in the directory,
327 it is necessary to use the sambaAccount and posixAccount objectclasses in
328 combination.  However, smbd will still obtain the user's UNIX account
329 information via the standard C library calls (e.g. getpwnam(), et. al.).
330 This means that the Samba server must also have the LDAP NSS library installed
331 and functioning correctly.  This division of information makes it possible to
332 store all Samba account information in LDAP, but still maintain UNIX account
333 information in NIS while the network is transitioning to a full LDAP infrastructure.</P
334 ></DIV
335 ><DIV
336 CLASS="SECT1"
337 ><H1
338 CLASS="SECT1"
339 ><A
340 NAME="AEN2416">14.5. Configuring Samba with LDAP</H1
341 ><DIV
342 CLASS="SECT2"
343 ><H2
344 CLASS="SECT2"
345 ><A
346 NAME="AEN2418">14.5.1. OpenLDAP configuration</H2
347 ><P
348 >To include support for the sambaAccount object in an OpenLDAP directory
349 server, first copy the samba.schema file to slapd's configuration directory.</P
350 ><P
351 ><TT
352 CLASS="PROMPT"
353 >root# </TT
354 ><B
355 CLASS="COMMAND"
356 >cp samba.schema /etc/openldap/schema/</B
357 ></P
358 ><P
359 >Next, include the <TT
360 CLASS="FILENAME"
361 >samba.schema</TT
362 > file in <TT
363 CLASS="FILENAME"
364 >slapd.conf</TT
365 >.
366 The sambaAccount object contains two attributes which depend upon other schema
367 files.  The 'uid' attribute is defined in <TT
368 CLASS="FILENAME"
369 >cosine.schema</TT
370 > and
371 the 'displayName' attribute is defined in the <TT
372 CLASS="FILENAME"
373 >inetorgperson.schema</TT
374 >
375 file.  Both of these must be included before the <TT
376 CLASS="FILENAME"
377 >samba.schema</TT
378 > file.</P
379 ><P
380 ><PRE
381 CLASS="PROGRAMLISTING"
382 >## /etc/openldap/slapd.conf
383
384 ## schema files (core.schema is required by default)
385 include            /etc/openldap/schema/core.schema
386
387 ## needed for sambaAccount
388 include            /etc/openldap/schema/cosine.schema
389 include            /etc/openldap/schema/inetorgperson.schema
390 include            /etc/openldap/schema/samba.schema
391
392 ## uncomment this line if you want to support the RFC2307 (NIS) schema
393 ## include         /etc/openldap/schema/nis.schema
394
395 ....</PRE
396 ></P
397 ><P
398 >It is recommended that you maintain some indices on some of the most usefull attributes,
399 like in the following example, to speed up searches made on sambaAccount objectclasses
400 (and possibly posixAccount and posixGroup as well).</P
401 ><P
402 ><PRE
403 CLASS="PROGRAMLISTING"
404 ># Indices to maintain
405 ## required by OpenLDAP 2.0
406 index objectclass   eq
407
408 ## support pb_getsampwnam()
409 index uid           pres,eq
410 ## support pdb_getsambapwrid()
411 index rid           eq
412
413 ## uncomment these if you are storing posixAccount and
414 ## posixGroup entries in the directory as well
415 ##index uidNumber     eq
416 ##index gidNumber     eq
417 ##index cn            eq
418 ##index memberUid     eq</PRE
419 ></P
420 ></DIV
421 ><DIV
422 CLASS="SECT2"
423 ><H2
424 CLASS="SECT2"
425 ><A
426 NAME="AEN2435">14.5.2. Configuring Samba</H2
427 ><P
428 >The following parameters are available in smb.conf only with <TT
429 CLASS="PARAMETER"
430 ><I
431 >--with-ldapsam</I
432 ></TT
433 >
434 was included with compiling Samba.</P
435 ><P
436 ></P
437 ><UL
438 ><LI
439 ><P
440 ><A
441 HREF="smb.conf.5.html#LDAPSSL"
442 TARGET="_top"
443 >ldap ssl</A
444 ></P
445 ></LI
446 ><LI
447 ><P
448 ><A
449 HREF="smb.conf.5.html#LDAPSERVER"
450 TARGET="_top"
451 >ldap server</A
452 ></P
453 ></LI
454 ><LI
455 ><P
456 ><A
457 HREF="smb.conf.5.html#LDAPADMINDN"
458 TARGET="_top"
459 >ldap admin dn</A
460 ></P
461 ></LI
462 ><LI
463 ><P
464 ><A
465 HREF="smb.conf.5.html#LDAPSUFFIX"
466 TARGET="_top"
467 >ldap suffix</A
468 ></P
469 ></LI
470 ><LI
471 ><P
472 ><A
473 HREF="smb.conf.5.html#LDAPFILTER"
474 TARGET="_top"
475 >ldap filter</A
476 ></P
477 ></LI
478 ><LI
479 ><P
480 ><A
481 HREF="smb.conf.5.html#LDAPPORT"
482 TARGET="_top"
483 >ldap port</A
484 ></P
485 ></LI
486 ></UL
487 ><P
488 >These are described in the <A
489 HREF="smb.conf.5.html"
490 TARGET="_top"
491 >smb.conf(5)</A
492 > man
493 page and so will not be repeated here.  However, a sample smb.conf file for
494 use with an LDAP directory could appear as</P
495 ><P
496 ><PRE
497 CLASS="PROGRAMLISTING"
498 >## /usr/local/samba/lib/smb.conf
499 [global]
500      security = user
501      encrypt passwords = yes
502
503      netbios name = TASHTEGO
504      workgroup = NARNIA
505
506      # ldap related parameters
507
508      # define the DN to use when binding to the directory servers
509      # The password for this DN is not stored in smb.conf.  Rather it
510      # must be set by using 'smbpasswd -w <TT
511 CLASS="REPLACEABLE"
512 ><I
513 >secretpw</I
514 ></TT
515 >' to store the
516      # passphrase in the secrets.tdb file.  If the "ldap admin dn" values
517      # changes, this password will need to be reset.
518      ldap admin dn = "cn=Samba Manager,ou=people,dc=samba,dc=org"
519
520      #  specify the LDAP server's hostname (defaults to locahost)
521      ldap server = ahab.samba.org
522
523      # Define the SSL option when connecting to the directory
524      # ('off', 'start tls', or 'on' (default))
525      ldap ssl = start tls
526
527      # define the port to use in the LDAP session (defaults to 636 when
528      # "ldap ssl = on")
529      ldap port = 389
530
531      # specify the base DN to use when searching the directory
532      ldap suffix = "ou=people,dc=samba,dc=org"
533
534      # generally the default ldap search filter is ok
535      # ldap filter = "(&amp;(uid=%u)(objectclass=sambaAccount))"</PRE
536 ></P
537 ></DIV
538 ></DIV
539 ><DIV
540 CLASS="SECT1"
541 ><H1
542 CLASS="SECT1"
543 ><A
544 NAME="AEN2463">14.6. Accounts and Groups management</H1
545 ><P
546 >As users accounts are managed thru the sambaAccount objectclass, you should
547 modify you existing administration tools to deal with sambaAccount attributes.</P
548 ><P
549 >Machines accounts are managed with the sambaAccount objectclass, just
550 like users accounts. However, it's up to you to stored thoses accounts
551 in a different tree of you LDAP namespace: you should use
552 "ou=Groups,dc=plainjoe,dc=org" to store groups and
553 "ou=People,dc=plainjoe,dc=org" to store users. Just configure your
554 NSS and PAM accordingly (usually, in the /etc/ldap.conf configuration
555 file).</P
556 ><P
557 >In Samba release 2.2.3, the group management system is based on posix
558 groups. This meand that Samba make usage of the posixGroup objectclass.
559 For now, there is no NT-like group system management (global and local
560 groups).</P
561 ></DIV
562 ><DIV
563 CLASS="SECT1"
564 ><H1
565 CLASS="SECT1"
566 ><A
567 NAME="AEN2468">14.7. Security and sambaAccount</H1
568 ><P
569 >There are two important points to remember when discussing the security
570 of sambaAccount entries in the directory.</P
571 ><P
572 ></P
573 ><UL
574 ><LI
575 ><P
576 ><SPAN
577 CLASS="emphasis"
578 ><I
579 CLASS="EMPHASIS"
580 >Never</I
581 ></SPAN
582 > retrieve the lmPassword or
583         ntPassword attribute values over an unencrypted LDAP session.</P
584 ></LI
585 ><LI
586 ><P
587 ><SPAN
588 CLASS="emphasis"
589 ><I
590 CLASS="EMPHASIS"
591 >Never</I
592 ></SPAN
593 > allow non-admin users to
594         view the lmPassword or ntPassword attribute values.</P
595 ></LI
596 ></UL
597 ><P
598 >These password hashes are clear text equivalents and can be used to impersonate
599 the user without deriving the original clear text strings.  For more information
600 on the details of LM/NT password hashes, refer to the <A
601 HREF="ENCRYPTION.html"
602 TARGET="_top"
603 >ENCRYPTION chapter</A
604 > of the Samba-HOWTO-Collection.</P
605 ><P
606 >To remedy the first security issue, the "ldap ssl" smb.conf parameter defaults
607 to require an encrypted session (<B
608 CLASS="COMMAND"
609 >ldap ssl = on</B
610 >) using
611 the default port of 636
612 when contacting the directory server.  When using an OpenLDAP 2.0 server, it
613 is possible to use the use the StartTLS LDAP extended  operation in the place of
614 LDAPS.  In either case, you are strongly discouraged to disable this security
615 (<B
616 CLASS="COMMAND"
617 >ldap ssl = off</B
618 >).</P
619 ><P
620 >Note that the LDAPS protocol is deprecated in favor of the LDAPv3 StartTLS
621 extended operation.  However, the OpenLDAP library still provides support for
622 the older method of securing communication between clients and servers.</P
623 ><P
624 >The second security precaution is to prevent non-administrative users from
625 harvesting password hashes from the directory.  This can be done using the
626 following ACL in <TT
627 CLASS="FILENAME"
628 >slapd.conf</TT
629 >:</P
630 ><P
631 ><PRE
632 CLASS="PROGRAMLISTING"
633 >## allow the "ldap admin dn" access, but deny everyone else
634 access to attrs=lmPassword,ntPassword
635      by dn="cn=Samba Admin,ou=people,dc=plainjoe,dc=org" write
636      by * none</PRE
637 ></P
638 ></DIV
639 ><DIV
640 CLASS="SECT1"
641 ><H1
642 CLASS="SECT1"
643 ><A
644 NAME="AEN2488">14.8. LDAP specials attributes for sambaAccounts</H1
645 ><P
646 >The sambaAccount objectclass is composed of the following attributes:</P
647 ><P
648 ></P
649 ><UL
650 ><LI
651 ><P
652 ><TT
653 CLASS="CONSTANT"
654 >lmPassword</TT
655 >: the LANMAN password 16-byte hash stored as a character
656         representation of a hexidecimal string.</P
657 ></LI
658 ><LI
659 ><P
660 ><TT
661 CLASS="CONSTANT"
662 >ntPassword</TT
663 >: the NT password hash 16-byte stored as a character
664         representation of a hexidecimal string.</P
665 ></LI
666 ><LI
667 ><P
668 ><TT
669 CLASS="CONSTANT"
670 >pwdLastSet</TT
671 >: The integer time in seconds since 1970 when the
672         <TT
673 CLASS="CONSTANT"
674 >lmPassword</TT
675 > and <TT
676 CLASS="CONSTANT"
677 >ntPassword</TT
678 > attributes were last set.
679         </P
680 ></LI
681 ><LI
682 ><P
683 ><TT
684 CLASS="CONSTANT"
685 >acctFlags</TT
686 >: string of 11 characters surrounded by square brackets []
687         representing account flags such as U (user), W(workstation), X(no password expiration), and
688         D(disabled).</P
689 ></LI
690 ><LI
691 ><P
692 ><TT
693 CLASS="CONSTANT"
694 >logonTime</TT
695 >: Integer value currently unused</P
696 ></LI
697 ><LI
698 ><P
699 ><TT
700 CLASS="CONSTANT"
701 >logoffTime</TT
702 >: Integer value currently unused</P
703 ></LI
704 ><LI
705 ><P
706 ><TT
707 CLASS="CONSTANT"
708 >kickoffTime</TT
709 >: Integer value currently unused</P
710 ></LI
711 ><LI
712 ><P
713 ><TT
714 CLASS="CONSTANT"
715 >pwdCanChange</TT
716 >: Integer value currently unused</P
717 ></LI
718 ><LI
719 ><P
720 ><TT
721 CLASS="CONSTANT"
722 >pwdMustChange</TT
723 >: Integer value currently unused</P
724 ></LI
725 ><LI
726 ><P
727 ><TT
728 CLASS="CONSTANT"
729 >homeDrive</TT
730 >: specifies the drive letter to which to map the
731         UNC path specified by homeDirectory. The drive letter must be specified in the form "X:"
732         where X is the letter of the drive to map. Refer to the "logon drive" parameter in the
733         smb.conf(5) man page for more information.</P
734 ></LI
735 ><LI
736 ><P
737 ><TT
738 CLASS="CONSTANT"
739 >scriptPath</TT
740 >: The scriptPath property specifies the path of
741         the user's logon script, .CMD, .EXE, or .BAT file. The string can be null. The path
742         is relative to the netlogon share.  Refer to the "logon script" parameter in the
743         smb.conf(5) man page for more information.</P
744 ></LI
745 ><LI
746 ><P
747 ><TT
748 CLASS="CONSTANT"
749 >profilePath</TT
750 >: specifies a path to the user's profile.
751         This value can be a null string, a local absolute path, or a UNC path.  Refer to the
752         "logon path" parameter in the smb.conf(5) man page for more information.</P
753 ></LI
754 ><LI
755 ><P
756 ><TT
757 CLASS="CONSTANT"
758 >smbHome</TT
759 >: The homeDirectory property specifies the path of
760         the home directory for the user. The string can be null. If homeDrive is set and specifies
761         a drive letter, homeDirectory should be a UNC path. The path must be a network
762         UNC path of the form \\server\share\directory. This value can be a null string.
763         Refer to the "logon home" parameter in the smb.conf(5) man page for more information.
764         </P
765 ></LI
766 ><LI
767 ><P
768 ><TT
769 CLASS="CONSTANT"
770 >userWorkstation</TT
771 >: character string value currently unused.
772         </P
773 ></LI
774 ><LI
775 ><P
776 ><TT
777 CLASS="CONSTANT"
778 >rid</TT
779 >: the integer representation of the user's relative identifier
780         (RID).</P
781 ></LI
782 ><LI
783 ><P
784 ><TT
785 CLASS="CONSTANT"
786 >primaryGroupID</TT
787 >: the relative identifier (RID) of the primary group
788         of the user.</P
789 ></LI
790 ></UL
791 ><P
792 >The majority of these parameters are only used when Samba is acting as a PDC of
793 a domain (refer to the <A
794 HREF="Samba-PDC-HOWTO.html"
795 TARGET="_top"
796 >Samba-PDC-HOWTO</A
797 > for details on
798 how to configure Samba as a Primary Domain Controller). The following four attributes
799 are only stored with the sambaAccount entry if the values are non-default values:</P
800 ><P
801 ></P
802 ><UL
803 ><LI
804 ><P
805 >smbHome</P
806 ></LI
807 ><LI
808 ><P
809 >scriptPath</P
810 ></LI
811 ><LI
812 ><P
813 >logonPath</P
814 ></LI
815 ><LI
816 ><P
817 >homeDrive</P
818 ></LI
819 ></UL
820 ><P
821 >These attributes are only stored with the sambaAccount entry if
822 the values are non-default values.  For example, assume TASHTEGO has now been
823 configured as a PDC and that <B
824 CLASS="COMMAND"
825 >logon home = \\%L\%u</B
826 > was defined in
827 its <TT
828 CLASS="FILENAME"
829 >smb.conf</TT
830 > file. When a user named "becky" logons to the domain,
831 the <TT
832 CLASS="PARAMETER"
833 ><I
834 >logon home</I
835 ></TT
836 > string is expanded to \\TASHTEGO\becky.
837 If the smbHome attribute exists in the entry "uid=becky,ou=people,dc=samba,dc=org",
838 this value is used.  However, if this attribute does not exist, then the value
839 of the <TT
840 CLASS="PARAMETER"
841 ><I
842 >logon home</I
843 ></TT
844 > parameter is used in its place.  Samba
845 will only write the attribute value to the directory entry is the value is
846 something other than the default (e.g. \\MOBY\becky).</P
847 ></DIV
848 ><DIV
849 CLASS="SECT1"
850 ><H1
851 CLASS="SECT1"
852 ><A
853 NAME="AEN2558">14.9. Example LDIF Entries for a sambaAccount</H1
854 ><P
855 >The following is a working LDIF with the inclusion of the posixAccount objectclass:</P
856 ><P
857 ><PRE
858 CLASS="PROGRAMLISTING"
859 >dn: uid=guest2, ou=people,dc=plainjoe,dc=org
860 ntPassword: 878D8014606CDA29677A44EFA1353FC7
861 pwdMustChange: 2147483647
862 primaryGroupID: 1201
863 lmPassword: 552902031BEDE9EFAAD3B435B51404EE
864 pwdLastSet: 1010179124
865 logonTime: 0
866 objectClass: sambaAccount
867 uid: guest2
868 kickoffTime: 2147483647
869 acctFlags: [UX         ]
870 logoffTime: 2147483647
871 rid: 19006
872 pwdCanChange: 0</PRE
873 ></P
874 ><P
875 >The following is an LDIF entry for using both the sambaAccount and
876 posixAccount objectclasses:</P
877 ><P
878 ><PRE
879 CLASS="PROGRAMLISTING"
880 >dn: uid=gcarter, ou=people,dc=plainjoe,dc=org
881 logonTime: 0
882 displayName: Gerald Carter
883 lmPassword: 552902031BEDE9EFAAD3B435B51404EE
884 primaryGroupID: 1201
885 objectClass: posixAccount
886 objectClass: sambaAccount
887 acctFlags: [UX         ]
888 userPassword: {crypt}BpM2ej8Rkzogo
889 uid: gcarter
890 uidNumber: 9000
891 cn: Gerald Carter
892 loginShell: /bin/bash
893 logoffTime: 2147483647
894 gidNumber: 100
895 kickoffTime: 2147483647
896 pwdLastSet: 1010179230
897 rid: 19000
898 homeDirectory: /home/tashtego/gcarter
899 pwdCanChange: 0
900 pwdMustChange: 2147483647
901 ntPassword: 878D8014606CDA29677A44EFA1353FC7</PRE
902 ></P
903 ></DIV
904 ><DIV
905 CLASS="SECT1"
906 ><H1
907 CLASS="SECT1"
908 ><A
909 NAME="AEN2566">14.10. Comments</H1
910 ><P
911 >Please mail all comments regarding this HOWTO to <A
912 HREF="mailto:jerry@samba.org"
913 TARGET="_top"
914 >jerry@samba.org</A
915 >.  This documents was
916 last updated to reflect the Samba 2.2.3 release.&#13;</P
917 ></DIV
918 ></DIV
919 ><DIV
920 CLASS="NAVFOOTER"
921 ><HR
922 ALIGN="LEFT"
923 WIDTH="100%"><TABLE
924 SUMMARY="Footer navigation table"
925 WIDTH="100%"
926 BORDER="0"
927 CELLPADDING="0"
928 CELLSPACING="0"
929 ><TR
930 ><TD
931 WIDTH="33%"
932 ALIGN="left"
933 VALIGN="top"
934 ><A
935 HREF="samba-bdc.html"
936 ACCESSKEY="P"
937 >Prev</A
938 ></TD
939 ><TD
940 WIDTH="34%"
941 ALIGN="center"
942 VALIGN="top"
943 ><A
944 HREF="Samba-HOWTO.html"
945 ACCESSKEY="H"
946 >Home</A
947 ></TD
948 ><TD
949 WIDTH="33%"
950 ALIGN="right"
951 VALIGN="top"
952 ><A
953 HREF="improved-browsing.html"
954 ACCESSKEY="N"
955 >Next</A
956 ></TD
957 ></TR
958 ><TR
959 ><TD
960 WIDTH="33%"
961 ALIGN="left"
962 VALIGN="top"
963 >How to Act as a Backup Domain Controller in a Purely Samba Controlled Domain</TD
964 ><TD
965 WIDTH="34%"
966 ALIGN="center"
967 VALIGN="top"
968 >&nbsp;</TD
969 ><TD
970 WIDTH="33%"
971 ALIGN="right"
972 VALIGN="top"
973 >Improved browsing in samba</TD
974 ></TR
975 ></TABLE
976 ></DIV
977 ></BODY
978 ></HTML
979 >