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