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