preparing for release of 3.0alpha24
[Samba.git] / docs / htmldocs / domain-member.html
blob5be675a541c7d5703920fd5982c59fe3ed20ae28
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 8. Samba as a NT4 or Win2k domain member</title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.59.1"><link rel="home" href="index.html" title="SAMBA Project Documentation"><link rel="up" href="type.html" title="Part II. Server Configuration Basics"><link rel="previous" href="ADS.html" title="Chapter 7. Samba as a ADS domain member"><link rel="next" href="optional.html" title="Part III. Advanced Configuration"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 8. Samba as a NT4 or Win2k domain member</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ADS.html">Prev</a> </td><th width="60%" align="center">Part II. Server Configuration Basics</th><td width="20%" align="right"> <a accesskey="n" href="optional.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><h2 class="title"><a name="domain-member"></a>Chapter 8. Samba as a NT4 or Win2k domain member</h2></div><div><div class="author"><h3 class="author">Jeremy Allison</h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><tt>&lt;<a href="mailto:jra@samba.org">jra@samba.org</a>&gt;</tt></p></div></div></div></div><div><div class="author"><h3 class="author">Gerald (Jerry) Carter</h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><tt>&lt;<a href="mailto:jerry@samba.org">jerry@samba.org</a>&gt;</tt></p></div></div></div></div><div><p class="pubdate">16 Apr 2001</p></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="domain-member.html#id2879309">Joining an NT Domain with Samba 3.0</a></dt><dt><a href="domain-member.html#id2880214">Why is this better than security = server?</a></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2879309"></a>Joining an NT Domain with Samba 3.0</h2></div></div><p><span class="emphasis"><em>Assumptions:</em></span>
3 </p><pre class="programlisting">
4 NetBIOS name: SERV1
5 Win2K/NT domain name: DOM
6 Domain's PDC NetBIOS name: DOMPDC
7 Domain's BDC NetBIOS names: DOMBDC1 and DOMBDC2
8 </pre><p>
9 </p><p>First, you must edit your <tt>smb.conf</tt> file to tell Samba it should
10 now use domain security.</p><p>Change (or add) your <a href="smb.conf.5.html#SECURITY" target="_top">
11 <i><tt>security =</tt></i></a> line in the [global] section
12 of your <tt>smb.conf</tt> to read:</p><p><b>security = domain</b></p><p>Next change the <a href="smb.conf.5.html#WORKGROUP" target="_top"><i><tt>
13 workgroup =</tt></i></a> line in the [global] section to read: </p><p><b>workgroup = DOM</b></p><p>as this is the name of the domain we are joining. </p><p>You must also have the parameter <a href="smb.conf.5.html#ENCRYPTPASSWORDS" target="_top">
14 <i><tt>encrypt passwords</tt></i></a> set to <tt>yes
15 </tt> in order for your users to authenticate to the NT PDC.</p><p>Finally, add (or modify) a <a href="smb.conf.5.html#PASSWORDSERVER" target="_top">
16 <i><tt>password server =</tt></i></a> line in the [global]
17 section to read: </p><p><b>password server = DOMPDC DOMBDC1 DOMBDC2</b></p><p>These are the primary and backup domain controllers Samba
18 will attempt to contact in order to authenticate users. Samba will
19 try to contact each of these servers in order, so you may want to
20 rearrange this list in order to spread out the authentication load
21 among domain controllers.</p><p>Alternatively, if you want smbd to automatically determine
22 the list of Domain controllers to use for authentication, you may
23 set this line to be :</p><p><b>password server = *</b></p><p>This method, allows Samba to use exactly the same
24 mechanism that NT does. This
25 method either broadcasts or uses a WINS database in order to
26 find domain controllers to authenticate against.</p><p>In order to actually join the domain, you must run this
27 command:</p><p><tt>root# </tt><b><tt>net join -S DOMPDC
28 -U<i><tt>Administrator%password</tt></i></tt></b></p><p>
29 If the <b><tt>-S DOMPDC</tt></b> argument is not given then
30 the domain name will be obtained from smb.conf.
31 </p><p>as we are joining the domain DOM and the PDC for that domain
32 (the only machine that has write access to the domain SAM database)
33 is DOMPDC. The <i><tt>Administrator%password</tt></i> is
34 the login name and password for an account which has the necessary
35 privilege to add machines to the domain. If this is successful
36 you will see the message:</p><p><tt>Joined domain DOM.</tt>
37 or <tt>Joined 'SERV1' to realm 'MYREALM'</tt>
38 </p><p>in your terminal window. See the <a href="net.8.html" target="_top">
39 net(8)</a> man page for more details.</p><p>This process joins the server to the domain
40 without having to create the machine trust account on the PDC
41 beforehand.</p><p>This command goes through the machine account password
42 change protocol, then writes the new (random) machine account
43 password for this Samba server into a file in the same directory
44 in which an smbpasswd file would be stored - normally :</p><p><tt>/usr/local/samba/private/secrets.tdb</tt></p><p>This file is created and owned by root and is not
45 readable by any other user. It is the key to the domain-level
46 security for your system, and should be treated as carefully
47 as a shadow password file.</p><p>Finally, restart your Samba daemons and get ready for
48 clients to begin using domain security!</p></div><div class="sect1" lang="en"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2880214"></a>Why is this better than security = server?</h2></div></div><p>Currently, domain security in Samba doesn't free you from
49 having to create local Unix users to represent the users attaching
50 to your server. This means that if domain user <tt>DOM\fred
51 </tt> attaches to your domain security Samba server, there needs
52 to be a local Unix user fred to represent that user in the Unix
53 filesystem. This is very similar to the older Samba security mode
54 <a href="smb.conf.5.html#SECURITYEQUALSSERVER" target="_top">security = server</a>,
55 where Samba would pass through the authentication request to a Windows
56 NT server in the same way as a Windows 95 or Windows 98 server would.
57 </p><p>Please refer to the <a href="winbind.html" target="_top">Winbind
58 paper</a> for information on a system to automatically
59 assign UNIX uids and gids to Windows NT Domain users and groups.
60 </p><p>The advantage to domain-level security is that the
61 authentication in domain-level security is passed down the authenticated
62 RPC channel in exactly the same way that an NT server would do it. This
63 means Samba servers now participate in domain trust relationships in
64 exactly the same way NT servers do (i.e., you can add Samba servers into
65 a resource domain and have the authentication passed on from a resource
66 domain PDC to an account domain PDC).</p><p>In addition, with <b>security = server</b> every Samba
67 daemon on a server has to keep a connection open to the
68 authenticating server for as long as that daemon lasts. This can drain
69 the connection resources on a Microsoft NT server and cause it to run
70 out of available connections. With <b>security = domain</b>,
71 however, the Samba daemons connect to the PDC/BDC only for as long
72 as is necessary to authenticate the user, and then drop the connection,
73 thus conserving PDC connection resources.</p><p>And finally, acting in the same manner as an NT server
74 authenticating to a PDC means that as part of the authentication
75 reply, the Samba server gets the user identification information such
76 as the user SID, the list of NT groups the user belongs to, etc. </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> Much of the text of this document
77 was first published in the Web magazine <a href="http://www.linuxworld.com" target="_top">
78 LinuxWorld</a> as the article <a href="http://www.linuxworld.com/linuxworld/lw-1998-10/lw-10-samba.html" target="_top">Doing
79 the NIS/NT Samba</a>.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ADS.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="type.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="optional.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 7. Samba as a ADS domain member </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Part III. Advanced Configuration</td></tr></table></div></body></html>