1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN">
5 >LanMan and NT Password Encryption in Samba
</TITLE
8 CONTENT=
"Modular DocBook HTML Stylesheet Version 1.77"><LINK
10 TITLE=
"SAMBA Project Documentation"
11 HREF=
"samba-howto-collection.html"><LINK
13 TITLE=
"General installation"
14 HREF=
"introduction.html"><LINK
16 TITLE=
"Quick Cross Subnet Browsing / Cross Workgroup Browsing guide"
17 HREF=
"browsing-quick.html"><LINK
19 TITLE=
"Type of installation"
20 HREF=
"type.html"></HEAD
31 SUMMARY=
"Header navigation table"
40 >SAMBA Project Documentation
</TH
48 HREF=
"browsing-quick.html"
77 >Chapter
5. LanMan and NT Password Encryption in Samba
</H1
85 >5.1. Introduction
</H1
87 >Newer windows clients send encrypted passwords over
88 the wire, instead of plain text passwords. The newest clients
89 will only send encrypted passwords and refuse to send plain text
90 passwords, unless their registry is tweaked.
</P
92 >These passwords can't be converted to unix style encrypted
93 passwords. Because of that you can't use the standard unix
94 user database, and you have to store the Lanman and NT hashes
95 somewhere else. For more information, see the documentation
109 >5.2. Important Notes About Security
</H1
111 >The unix and SMB password encryption techniques seem similar
112 on the surface. This similarity is, however, only skin deep. The unix
113 scheme typically sends clear text passwords over the network when
114 logging in. This is bad. The SMB encryption scheme never sends the
115 cleartext password over the network but it does store the
16 byte
116 hashed values on disk. This is also bad. Why? Because the
16 byte hashed
117 values are a
"password equivalent". You cannot derive the user's
118 password from them, but they could potentially be used in a modified
119 client to gain access to a server. This would require considerable
120 technical knowledge on behalf of the attacker but is perfectly possible.
121 You should thus treat the smbpasswd file as though it contained the
122 cleartext passwords of all your users. Its contents must be kept
123 secret, and the file should be protected accordingly.
</P
125 >Ideally we would like a password scheme which neither requires
126 plain text passwords on the net or on disk. Unfortunately this
127 is not available as Samba is stuck with being compatible with
128 other SMB systems (WinNT, WfWg, Win95 etc).
</P
143 SRC=
"/docbook-dsssl/warning.gif"
150 >Note that Windows NT
4.0 Service pack
3 changed the
151 default for permissible authentication so that plaintext
158 > sent over the wire.
159 The solution to this is either to switch to encrypted passwords
160 with Samba or edit the Windows NT registry to re-enable plaintext
161 passwords. See the document WinNT.txt for details on how to do
164 >Other Microsoft operating systems which also exhibit
165 this behavior includes
</P
171 >MS DOS Network client
3.0 with
172 the basic network redirector installed
</P
176 >Windows
95 with the network redirector
195 >All current release of
196 Microsoft SMB/CIFS clients support authentication via the
197 SMB Challenge/Response mechanism described here. Enabling
198 clear text authentication does not disable the ability
199 of the client to participate in encrypted authentication.
</P
211 >5.2.1. Advantages of SMB Encryption
</H2
217 >plain text passwords are not passed across
218 the network. Someone using a network sniffer cannot just
219 record passwords going to the SMB server.
</P
223 >WinNT doesn't like talking to a server
224 that isn't using SMB encrypted passwords. It will refuse
225 to browse the server if the server is also in user level
226 security mode. It will insist on prompting the user for the
227 password on each connection, which is very annoying. The
228 only things you can do to stop this is to use SMB encryption.
240 >5.2.2. Advantages of non-encrypted passwords
</H2
246 >plain text passwords are not kept
251 >uses same password file as other unix
252 services such as login and ftp
</P
256 >you are probably already using other
257 services (such as telnet and ftp) which send plain text
258 passwords over the net, so sending them for SMB isn't
271 >5.3. The smbpasswd Command
</H1
273 >The smbpasswd command maintains the two
32 byte password fields
274 in the smbpasswd file. If you wish to make it similar to the unix
284 >/usr/local/samba/bin/
</TT
286 main Samba binary directory).
</P
291 > now works in a client-server mode
292 where it contacts the local smbd to change the user's password on its
293 behalf. This has enormous benefits - as follows.
</P
298 > now has the capability
299 to change passwords on Windows NT servers (this only works when
300 the request is sent to the NT Primary Domain Controller if you
301 are changing an NT Domain user's password).
</P
303 >To run smbpasswd as a normal user just type :
</P
317 >Old SMB password:
</TT
321 ><type old value here -
322 or hit return if there was no old password
></B
328 >New SMB Password:
</TT
332 ><type new value
>
339 >Repeat New SMB Password:
</TT
343 ><re-type new value
348 >If the old value does not match the current value stored for
349 that user, or the two new values do not match each other, then the
350 password will not be changed.
</P
352 >If invoked by an ordinary user it will only allow the user
353 to change his or her own Samba password.
</P
355 >If run by the root user smbpasswd may take an optional
356 argument, specifying the user name whose SMB password you wish to
357 change. Note that when run as root smbpasswd does not prompt for
358 or check the old password value, thus allowing root to set passwords
359 for users who have forgotten their passwords.
</P
364 > is designed to work in the same way
365 and be familiar to UNIX users who use the
<B
374 >For more details on using
<B
378 to the man page which will always be the definitive reference.
</P
386 SUMMARY=
"Footer navigation table"
397 HREF=
"browsing-quick.html"
406 HREF=
"samba-howto-collection.html"
425 >Quick Cross Subnet Browsing / Cross Workgroup Browsing guide
</TD
431 HREF=
"introduction.html"
439 >Type of installation
</TD