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