ading new files from 3.0
[sfrench/samba-autobuild/.git] / docs / htmldocs / ServerType.html
1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 4. Server Types and Security Modes</title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.60.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="type.html" title="Part II. Server Configuration Basics"><link rel="next" href="samba-pdc.html" title="Chapter 5. Domain Control"></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 4. Server Types and Security Modes</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="type.html">Prev</a> </td><th width="60%" align="center">Part II. Server Configuration Basics</th><td width="20%" align="right"> <a accesskey="n" href="samba-pdc.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="ServerType"></a>Chapter 4. Server Types and Security Modes</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Andrew</span> <span class="surname">Tridgell</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><tt class="email">&lt;<a href="mailto:tridge@samba.org">tridge@samba.org</a>&gt;</tt></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="othername">R.</span> <span class="surname">Vernooij</span></h3><div class="affiliation"><span class="orgname">The Samba Team<br></span><div class="address"><p><tt class="email">&lt;<a href="mailto:jelmer@samba.org">jelmer@samba.org</a>&gt;</tt></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">John</span> <span class="othername">H.</span> <span class="surname">Terpstra</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><tt class="email">&lt;<a href="mailto:jht@samba.org">jht@samba.org</a>&gt;</tt></p></div></div></div></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="ServerType.html#id2888767">Features and Benefits</a></dt><dt><a href="ServerType.html#id2888862">Server Types</a></dt><dt><a href="ServerType.html#id2888947">Samba Security Modes</a></dt><dd><dl><dt><a href="ServerType.html#id2889062">User Level Security</a></dt><dt><a href="ServerType.html#id2889195">Share Level Security</a></dt><dt><a href="ServerType.html#id2889317">Domain Security Mode (User Level Security)</a></dt><dt><a href="ServerType.html#id2889568">ADS Security Mode (User Level Security)</a></dt><dt><a href="ServerType.html#id2889655">Server Security (User Level Security)</a></dt></dl></dd><dt><a href="ServerType.html#id2889880">Seamless Windows Network Integration</a></dt><dt><a href="ServerType.html#id2890056">Common Errors</a></dt><dd><dl><dt><a href="ServerType.html#id2890084">What makes Samba a SERVER?</a></dt><dt><a href="ServerType.html#id2890117">What makes Samba a Domain Controller?</a></dt><dt><a href="ServerType.html#id2890146">What makes Samba a Domain Member?</a></dt><dt><a href="ServerType.html#id2890179">Constantly Losing Connections to Password Server</a></dt></dl></dd></dl></div><p>
2 This chapter provides information regarding the types of server that Samba may be
3 configured to be. A Microsoft network administrator who wishes to migrate to or to
4 use Samba will want to know what, within a Samba context, terms familiar to MS Windows
5 administrator mean. This means that it is essential also to define how critical security
6 modes function BEFORE we get into the details of how to configure the server itself.
7 </p><p>
8 The chapter provides an overview of the security modes of which Samba is capable
9 and how these relate to MS Windows servers and clients.
10 </p><p>
11 Firstly we should recognise the question so often asked, &quot;Why would I want to use Samba?&quot;
12 So, in those chapters where the answer may be important you will see a section that highlights
13 features and benefits. These may be for or against Samba.
14 </p><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2888767"></a>Features and Benefits</h2></div></div><div></div></div><p>
15 Two men were walking down a dusty road, when one suddenly kicked up a small red stone. It
16 hurt his toe and lodged in his sandal. He took the stone out and cursed it with a passion
17 and fury fitting his anguish. The other looked at the stone and said, that is a garnet - I
18 can turn that into a precious gem and some day it will make a princess very happy!
19 </p><p>
20 The moral of this tale: Two men, two very different perspectives regarding the same stone.
21 Like it or not, Samba is like that stone. Treat it the right way and it can bring great
22 pleasure, but if you are forced upon it and have no time for its secrets then it can be
23 a source of discomfort.
24 </p><p>
25 Samba started out as a project that sought to provide interoperability for MS Windows 3.x
26 clients with a Unix server. It has grown up a lot since its humble beginnings and now provides
27 features and functionality fit for large scale deployment. It also has some warts. In sections
28 like this one we will tell of both.
29 </p><p>
30 So now, what are the benefits of features mentioned in this chapter?
31 </p><div class="itemizedlist"><ul type="disc"><li><p>
32         Samba-3 can replace an MS Windows NT4 Domain Controller
33         </p></li><li><p>
34         Samba-3 offers excellent interoperability with MS Windows NT4
35         style domains as well as natively with Microsoft Active
36         Directory domains.
37         </p></li><li><p>
38         Samba-3 permits full NT4 style Interdomain Trusts
39         </p></li><li><p>
40         Samba has security modes that permit more flexible
41         authentication than is possible with MS Windows NT4 Domain Controllers.
42         </p></li><li><p>
43         Samba-3 permits use of multiple account database backends
44         </p></li><li><p>
45         The account (password) database backends can be distributed
46         and replicated using multiple methods. This gives Samba-3
47         greater flexibility than MS Windows NT4 and in many cases a
48         significantly higher utility than Active Directory domains
49         with MS Windows 200x.
50         </p></li></ul></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2888862"></a>Server Types</h2></div></div><div></div></div><p>Administrators of Microsoft networks often refer to three
51 different type of servers:</p><div class="itemizedlist"><ul type="disc"><li><p>Domain Controller</p><table class="simplelist" border="0" summary="Simple list"><tr><td>Primary Domain Controller</td></tr><tr><td>Backup Domain Controller</td></tr><tr><td>ADS Domain Controller</td></tr></table></li><li><p>Domain Member Server</p><table class="simplelist" border="0" summary="Simple list"><tr><td>Active Directory Member Server</td></tr><tr><td>NT4 Style Domain Member Server</td></tr></table></li><li><p>Stand Alone Server</p></li></ul></div><p>
52 The chapters covering Domain Control, Backup Domain Control and Domain Membership provide
53 pertinent information regarding Samba-3 configuration for each of these server roles.
54 The reader is strongly encouraged to become intimately familiar with the information 
55 presented.
56 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2888947"></a>Samba Security Modes</h2></div></div><div></div></div><p>
57 In this section the function and purpose of Samba's <i class="parameter"><tt>security</tt></i>
58 modes are described. An accurate understanding of how Samba implements each security
59 mode as well as how to configure MS Windows clients for each mode will significantly
60 reduce user complaints and administrator heartache.
61 </p><p>
62 In the SMB/CIFS networking world, there are only two types of security: <span class="emphasis"><em>USER Level</em></span>
63 and <span class="emphasis"><em>SHARE Level</em></span>. We refer to these collectively as <span class="emphasis"><em>security levels</em></span>. In implementing these two <span class="emphasis"><em>security levels</em></span> Samba provides flexibilities
64 that are not available with Microsoft Windows NT4 / 200x servers. Samba knows of five (5)
65 ways that allow the security levels to be implemented. In actual fact, Samba implements
66 <span class="emphasis"><em>SHARE Level</em></span> security only one way, but has four ways of implementing
67 <span class="emphasis"><em>USER Level</em></span> security. Collectively, we call the Samba implementations
68 <span class="emphasis"><em>Security Modes</em></span>. These are: <span class="emphasis"><em>SHARE</em></span>, <span class="emphasis"><em>USER</em></span>, <span class="emphasis"><em>DOMAIN</em></span>,
69 <span class="emphasis"><em>ADS</em></span>, and <span class="emphasis"><em>SERVER</em></span>
70 modes. They are documented in this chapter.
71 </p><p>
72 A SMB server tells the client at startup what <i class="parameter"><tt>security level</tt></i>
73 it is running. There are two options: <span class="emphasis"><em>share level</em></span> and
74 <span class="emphasis"><em>user level</em></span>. Which of these two the client receives affects
75 the way the client then tries to authenticate itself. It does not directly affect
76 (to any great extent) the way the Samba server does security. This may sound strange,
77 but it fits in with the client/server approach of SMB. In SMB everything is initiated
78 and controlled by the client, and the server can only tell the client what is
79 available and whether an action is allowed.
80 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2889062"></a>User Level Security</h3></div></div><div></div></div><p>
81 We will describe <i class="parameter"><tt>user level</tt></i> security first, as it's simpler.
82 In <span class="emphasis"><em>user level</em></span> security, the client will send a
83 <span class="emphasis"><em>session setup</em></span> command directly after the protocol negotiation.
84 This contains a username and password. The server can either accept or reject that
85 username/password combination. Note that at this stage the server has no idea what
86 share the client will eventually try to connect to, so it can't base the
87 <span class="emphasis"><em>accept/reject</em></span> on anything other than:
88 </p><div class="orderedlist"><ol type="1"><li><p>The username/password</p></li><li><p>The name of the client machine</p></li></ol></div><p>
89 If the server accepts the username/password then the client expects to be able to
90 mount shares (using a <span class="emphasis"><em>tree connection</em></span>) without specifying a
91 password. It expects that all access rights will be as the username/password
92 specified in the <span class="emphasis"><em>session setup</em></span>.
93 </p><p>
94 It is also possible for a client to send multiple <span class="emphasis"><em>session setup</em></span>
95 requests. When the server responds, it gives the client a <span class="emphasis"><em>uid</em></span> to use
96 as an authentication tag for that username/password. The client can maintain multiple
97 authentication contexts in this way (WinDD is an example of an application that does this).
98 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2889156"></a>Example Configuration</h4></div></div><div></div></div><p>
99 The <tt class="filename">smb.conf</tt> parameter that sets <span class="emphasis"><em>User Level Security</em></span> is:
100 </p><pre class="programlisting">
101         security = user
102 </pre><p>
103 This is the default setting since samba-2.2.x.
104 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2889195"></a>Share Level Security</h3></div></div><div></div></div><p>
105 Ok, now for share level security. In share level security, the client authenticates
106 itself separately for each share. It will send a password along with each 
107 <span class="emphasis"><em>tree connection</em></span> (share mount). It does not explicitly send a
108 username with this operation. The client expects a password to be associated
109 with each share, independent of the user. This means that Samba has to work out what
110 username the client probably wants to use. It is never explicitly sent the username.
111 Some commercial SMB servers such as NT actually associate passwords directly with
112 shares in share level security, but Samba always uses the unix authentication scheme
113 where it is a username/password pair that is authenticated, not a share/password pair.
114 </p><p>
115 To gain understanding of the MS Windows networking parallels to this, one should think
116 in terms of MS Windows 9x/Me where one can create a shared folder that provides read-only
117 or full access, with or without a password.
118 </p><p>
119 Many clients send a <span class="emphasis"><em>session setup</em></span> even if the server is in share
120 level security. They normally send a valid username but no password. Samba records
121 this username in a list of <span class="emphasis"><em>possible usernames</em></span>. When the client
122 then does a <span class="emphasis"><em>tree connection</em></span> it also adds to this list the name
123 of the share they try to connect to (useful for home directories) and any users
124 listed in the <i class="parameter"><tt>user =</tt></i> <tt class="filename">smb.conf</tt> line. The password is then checked
125 in turn against these <span class="emphasis"><em>possible usernames</em></span>. If a match is found
126 then the client is authenticated as that user.
127 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2889275"></a>Example Configuration</h4></div></div><div></div></div><p>
128 The <tt class="filename">smb.conf</tt> parameter that sets <span class="emphasis"><em>Share Level Security</em></span> is:
129 </p><pre class="programlisting">
130         security = share
131 </pre><p>
132 Please note that there are reports that recent MS Windows clients do not like to work
133 with share mode security servers. You are strongly discouraged from using share level security.
134 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2889317"></a>Domain Security Mode (User Level Security)</h3></div></div><div></div></div><p>
135 When Samba is operating in <i class="parameter"><tt>security = domain</tt></i> mode,
136 the Samba server has a domain security trust account (a machine account) and will cause
137 all authentication requests to be passed through to the domain controllers.
138 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2889339"></a>Example Configuration</h4></div></div><div></div></div><p><span class="emphasis"><em>
139 Samba as a Domain Member Server
140 </em></span></p><p>
141 This method involves addition of the following parameters in the <tt class="filename">smb.conf</tt> file:
142 </p><pre class="programlisting">
143         security = domain
144         workgroup = &quot;name_of_NT_domain&quot;
145 </pre><p>
146 In order for this method to work, the Samba server needs to join the MS Windows NT
147 security domain. This is done as follows:
148 </p><div class="procedure"><ol type="1"><li><p>On the MS Windows NT domain controller, using
149         the Server Manager, add a machine account for the Samba server.
150         </p></li><li><p>Next, on the Unix/Linux system execute:</p><p><tt class="prompt">root# </tt><b class="userinput"><tt>smbpasswd -j DOMAIN_NAME -r PDC_NAME</tt></b> (samba-2.x)</p><p><tt class="prompt">root# </tt><b class="userinput"><tt>net join -U administrator%password</tt></b> (samba-3)</p></li></ol></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
151 As of Samba-2.2.4 the Samba 2.2.x series can auto-join a Windows NT4 style Domain just
152 by executing:
153 </p><pre class="screen">
154 <tt class="prompt">root# </tt><b class="userinput"><tt>smbpasswd -j <i class="replaceable"><tt>DOMAIN_NAME</tt></i> -r <i class="replaceable"><tt>PDC_NAME</tt></i> -U Administrator%<i class="replaceable"><tt>password</tt></i></tt></b>
155 </pre><p>
156
157 As of Samba-3 the same can be done by executing:
158 </p><pre class="screen">
159 <tt class="prompt">root# </tt><b class="userinput"><tt>net join -U Administrator%<i class="replaceable"><tt>password</tt></i></tt></b>
160 </pre><p>
161 It is not necessary with Samba-3 to specify the <i class="replaceable"><tt>DOMAIN_NAME</tt></i> or the <i class="replaceable"><tt>PDC_NAME</tt></i> as it
162 figures this out from the <tt class="filename">smb.conf</tt> file settings.
163 </p></div><p>
164 Use of this mode of authentication does require there to be a standard Unix account
165 for each user in order to assign a uid once the account has been authenticated by
166 the remote Windows DC.  This account can be blocked to prevent logons by clients other than
167 MS Windows through things such as setting an invalid shell in the
168 <tt class="filename">/etc/passwd</tt> entry.
169 </p><p>
170 An alternative to assigning UIDs to Windows users on a Samba member server is
171 presented in the <a href="winbind.html" title="Chapter 21. Integrated Logon Support using Winbind">Winbind Overview</a> chapter
172 in this HOWTO collection.
173 </p><p>
174 For more information of being a domain member, see the <a href="domain-member.html" title="Chapter 7. Domain Membership">Domain
175 Member</a> section of this Howto.
176 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2889568"></a>ADS Security Mode (User Level Security)</h3></div></div><div></div></div><p>
177 Both Samba 2.2 and 3.0 can join an Active Directory domain. This is
178 possible even if the domain is run in native mode. Active Directory in
179 native mode perfectly allows NT4-style domain members, contrary to
180 popular belief. The only thing that Active Directory in native mode
181 prohibits is Backup Domain Controllers running NT4.
182 </p><p>
183 If you are running Active Directory starting with Samba 3.0 you can
184 however join as a native AD member. Why would you want to do that?
185 Your security policy might prohibit the use of NT-compatible
186 authentication protocols. All your machines are running Windows 2000
187 and above and all use full Kerberos. In this case Samba as a NT4-style
188 domain would still require NT-compatible authentication data. Samba in
189 AD-member mode can accept Kerberos.
190 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2889598"></a>Example Configuration</h4></div></div><div></div></div><pre class="programlisting">
191         realm = your.kerberos.REALM
192         security = ADS
193 </pre><p>
194         The following parameter may be required:
195 </p><pre class="programlisting">
196         ads server = your.kerberos.server
197 </pre><p>
198 Please refer to the <a href="domain-member.html" title="Chapter 7. Domain Membership">Domain Membership</a> and <a href="domain-member.html#ads-member" title="Samba ADS Domain Membership">Active Directory
199 Membership</a> sections for more information regarding this configuration option.
200 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2889655"></a>Server Security (User Level Security)</h3></div></div><div></div></div><p>
201 Server security mode is a left over from the time when Samba was not capable of acting
202 as a domain member server. It is highly recommended NOT to use this feature. Server
203 security mode has many draw backs. The draw backs include:
204 </p><table class="simplelist" border="0" summary="Simple list"><tr><td>Potential Account Lockout on MS Windows NT4/200x password servers</td></tr><tr><td>Lack of assurance that the password server is the one specified</td></tr><tr><td>Does not work with Winbind, particularly needed when storing profiles remotely</td></tr><tr><td>This mode may open connections to the password server, and keep them open for extended periods.</td></tr><tr><td>Security on the Samba server breaks badly when the remote password server suddenly shuts down</td></tr><tr><td>With this mode there is NO security account in the domain that the password server belongs to for the Samba server.</td></tr></table><p>
205 In server security mode the Samba server reports to the client that it is in user level
206 security. The client then does a <span class="emphasis"><em>session setup</em></span> as described earlier.
207 The Samba server takes the username/password that the client sends and attempts to login to the
208 <i class="parameter"><tt>password server</tt></i> by sending exactly the same username/password that
209 it got from the client. If that server is in user level security and accepts the password,
210 then Samba accepts the clients connection. This allows the Samba server to use another SMB
211 server as the <i class="parameter"><tt>password server</tt></i>.
212 </p><p>
213 You should also note that at the very start of all this, where the server tells the client
214 what security level it is in, it also tells the client if it supports encryption. If it
215 does then it supplies the client with a random cryptkey. The client will then send all
216 passwords in encrypted form. Samba supports this type of encryption by default.
217 </p><p>
218 The parameter <i class="parameter"><tt>security = server</tt></i> means that Samba reports to clients that
219 it is running in <span class="emphasis"><em>user mode</em></span> but actually passes off all authentication
220 requests to another <span class="emphasis"><em>user mode</em></span> server. This requires an additional
221 parameter <i class="parameter"><tt>password server</tt></i> that points to the real authentication server.
222 That real authentication server can be another Samba server or can be a Windows NT server,
223 the later natively capable of encrypted password support.
224 </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
225 When Samba is running in <span class="emphasis"><em>server security mode</em></span> it is essential that
226 the parameter <span class="emphasis"><em>password server</em></span> is set to the precise NetBIOS machine
227 name of the target authentication server. Samba can NOT determine this from NetBIOS name
228 lookups because the choice of the target authentication server is arbitrary and can not
229 be determined from a domain name. In essence, a Samba server that is in
230 <span class="emphasis"><em>server security mode</em></span> is operating in what used to be known as
231 workgroup mode.
232 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2889811"></a>Example Configuration</h4></div></div><div></div></div><p><span class="emphasis"><em>
233 Using MS Windows NT as an authentication server
234 </em></span></p><p>
235 This method involves the additions of the following parameters in the <tt class="filename">smb.conf</tt> file:
236 </p><pre class="programlisting">
237         encrypt passwords = Yes
238         security = server
239         password server = &quot;NetBIOS_name_of_a_DC&quot;
240 </pre><p>
241 There are two ways of identifying whether or not a username and password pair was valid
242 or not. One uses the reply information provided as part of the authentication messaging
243 process, the other uses just an error code.
244 </p><p>
245 The down-side of this mode of configuration is the fact that for security reasons Samba
246 will send the password server a bogus username and a bogus password and if the remote
247 server fails to reject the username and password pair then an alternative mode of
248 identification of validation is used. Where a site uses password lock out after a
249 certain number of failed authentication attempts this will result in user lockouts.
250 </p><p>
251 Use of this mode of authentication does require there to be a standard Unix account
252 for the user, though this account can be blocked to prevent logons by non-SMB/CIFS clients.
253 </p></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2889880"></a>Seamless Windows Network Integration</h2></div></div><div></div></div><p>
254 MS Windows clients may use encrypted passwords as part of a challenge/response
255 authentication model (a.k.a. NTLMv1 and NTLMv2) or alone, or clear text strings for simple
256 password based authentication. It should be realized that with the SMB protocol,
257 the password is passed over the network either in plain text or encrypted, but
258 not both in the same authentication request.
259 </p><p>
260 When encrypted passwords are used, a password that has been entered by the user
261 is encrypted in two ways:
262 </p><div class="itemizedlist"><ul type="disc"><li><p>An MD4 hash of the UNICODE of the password
263         string.  This is known as the NT hash.
264         </p></li><li><p>The password is converted to upper case,
265         and then padded or truncated to 14 bytes.  This string is
266         then appended with 5 bytes of NULL characters and split to
267         form two 56 bit DES keys to encrypt a &quot;magic&quot; 8 byte value.
268         The resulting 16 bytes form the LanMan hash.
269         </p></li></ul></div><p>
270 MS Windows 95 pre-service pack 1, MS Windows NT versions 3.x and version 4.0
271 pre-service pack 3 will use either mode of password authentication. All
272 versions of MS Windows that follow these versions no longer support plain
273 text passwords by default.
274 </p><p>
275 MS Windows clients have a habit of dropping network mappings that have been idle
276 for 10 minutes or longer. When the user attempts to use the mapped drive
277 connection that has been dropped, the client re-establishes the connection using
278 a cached copy of the password.
279 </p><p>
280 When Microsoft changed the default password mode, support was dropped for caching
281 of the plain text password. This means that when the registry parameter is changed
282 to re-enable use of plain text passwords it appears to work, but when a dropped
283 service connection mapping attempts to revalidate it will fail if the remote
284 authentication server does not support encrypted passwords.  This means that it
285 is definitely not a good idea to re-enable plain text password support in such clients.
286 </p><p>
287 The following parameters can be used to work around the issue of Windows 9x clients
288 upper casing usernames and password before transmitting them to the SMB server
289 when using clear text authentication.
290 </p><pre class="programlisting">
291         <a href="smb.conf.5.html#PASSWORDLEVEL" target="_top">password level</a> = <i class="replaceable"><tt>integer</tt></i>
292         <a href="smb.conf.5.html#USERNAMELEVEL" target="_top">username level</a> = <i class="replaceable"><tt>integer</tt></i>
293 </pre><p>
294 By default Samba will lower case the username before attempting to lookup the user
295 in the database of local system accounts.  Because UNIX usernames conventionally
296 only contain lower case character, the <i class="parameter"><tt>username level</tt></i> parameter
297 is rarely needed.
298 </p><p>
299 However, passwords on UNIX systems often make use of mixed case characters.
300 This means that in order for a user on a Windows 9x client to connect to a Samba
301 server using clear text authentication, the <i class="parameter"><tt>password level</tt></i>
302 must be set to the maximum number of upper case letter which <span class="emphasis"><em>could</em></span>
303 appear is a password.  Note that the server OS uses the traditional DES version
304 of crypt(), a <i class="parameter"><tt>password level</tt></i> of 8 will result in case
305 insensitive passwords as seen from Windows users.  This will also result in longer
306 login times as Samba has to compute the permutations of the password string and
307 try them one by one until a match is located (or all combinations fail).
308 </p><p>
309 The best option to adopt is to enable support for encrypted passwords where ever
310 Samba is used. Most attempts to apply the registry change to re-enable plain text
311 passwords will eventually lead to user complaints and unhappiness.
312 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2890056"></a>Common Errors</h2></div></div><div></div></div><p>
313 We all make mistakes. It is Ok to make mistakes, so long as they are made in the right places
314 and at the right time. A mistake that causes lost productivity is seldom tolerated. A mistake
315 made in a developmental test lab is expected.
316 </p><p>
317 Here we look at common mistakes and misapprehensions that have been the subject of discussions
318 on the Samba mailing lists. Many of these are avoidable by doing you homework before attempting
319 a Samba implementation. Some are the result of misunderstanding of the English language. The
320 English language has many turns of phrase that are potentially vague and may be highly confusing
321 to those for whom English is not their native tongue.
322 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2890084"></a>What makes Samba a SERVER?</h3></div></div><div></div></div><p>
323 To some the nature of the Samba <span class="emphasis"><em>security</em></span> mode is very obvious, but entirely
324 wrong all the same. It is assumed that <i class="parameter"><tt>security = server</tt></i> means that Samba
325 will act as a server. Not so! See above - this setting means that Samba will <span class="emphasis"><em>try</em></span>
326 to use another SMB server as its source of user authentication alone.
327 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2890117"></a>What makes Samba a Domain Controller?</h3></div></div><div></div></div><p>
328 The <tt class="filename">smb.conf</tt> parameter <i class="parameter"><tt>security = domain</tt></i> does NOT really make Samba behave
329 as a Domain Controller! This setting means we want Samba to be a domain member!
330 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2890146"></a>What makes Samba a Domain Member?</h3></div></div><div></div></div><p>
331 Guess! So many others do. But whatever you do, do NOT think that <i class="parameter"><tt>security = user</tt></i>
332 makes Samba act as a domain member. Read the manufacturers manual before the warranty expires! See 
333 the <a href="domain-member.html" title="Chapter 7. Domain Membership">Domain Member</a> section of this Howto for more information.
334 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2890179"></a>Constantly Losing Connections to Password Server</h3></div></div><div></div></div><p>
335 Why does server_validate() simply give up rather than re-establishing its connection to the
336 password server?  Though I am not fluent in the SMB protocol, perhaps the cluster server
337 process passes along to its client workstation the session key it receives from the password
338 server, which means the password hashes submitted by the client would not work on a subsequent
339 connection, whose session key would be different.  So server_validate() must give up.
340 </p><p>
341 Indeed. That's why security = server is at best a nasty hack. Please use security = domain.
342 <i class="parameter"><tt>security = server</tt></i> mode is also known as pass-through authentication.
343 </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="type.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="samba-pdc.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part II. Server Configuration Basics </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 5. Domain Control</td></tr></table></div></body></html>