Goal: disable weak authentication methods, both on the client and server, so that we aren't sending passwords in plaintext across the wire and also aren't storing weak password hashes on the server Fixes: LP #163194 Upstream status: pulled from upstream 3.2 git tree, will be superseded with first release of 3.2 Index: samba-3.0.27a/source/param/loadparm.c =================================================================== --- samba-3.0.27a.orig/source/param/loadparm.c +++ samba-3.0.27a/source/param/loadparm.c @@ -1562,9 +1562,9 @@ Globals.bStatCache = True; /* use stat cache by default */ Globals.iMaxStatCacheSize = 1024; /* one Meg by default. */ Globals.restrict_anonymous = 0; - Globals.bClientLanManAuth = True; /* Do use the LanMan hash if it is available */ - Globals.bClientPlaintextAuth = True; /* Do use a plaintext password if is requested by the server */ - Globals.bLanmanAuth = True; /* Do use the LanMan hash if it is available */ + Globals.bClientLanManAuth = False; /* Do NOT use the LanMan hash if it is available */ + Globals.bClientPlaintextAuth = False; /* Do NOT use a plaintext password even if is requested by the server */ + Globals.bLanmanAuth = False; /* Do NOT use the LanMan hash, even if it is supplied */ Globals.bNTLMAuth = True; /* Do use NTLMv1 if it is available (otherwise NTLMv2) */ Globals.bClientNTLMv2Auth = False; /* Client should not use NTLMv2, as we can't tell that the server supports it. */ /* Note, that we will use NTLM2 session security (which is different), if it is available */ Index: samba-3.0.27a/docs/htmldocs/manpages/smb.conf.5.html =================================================================== --- samba-3.0.27a.orig/docs/htmldocs/manpages/smb.conf.5.html +++ samba-3.0.27a/docs/htmldocs/manpages/smb.conf.5.html @@ -780,7 +780,7 @@ without Windows 95/98 servers are advised to disable this option.

Disabling this option will also disable the client plaintext auth option

Likewise, if the client ntlmv2 auth parameter is enabled, then only NTLMv2 logins will be - attempted.

Default: client lanman auth = yes + attempted.

Default: client lanman auth = no

client ntlmv2 auth (G)

This parameter determines whether or not smbclient(8) will attempt to authenticate itself to servers using the NTLMv2 encrypted password @@ -795,7 +795,7 @@ responses, and not the weaker LM or NTLM.

Default: client ntlmv2 auth = no

client plaintext auth (G)

Specifies whether a client should send a plaintext - password if the server does not support encrypted passwords.

Default: client plaintext auth = yes + password if the server does not support encrypted passwords.

Default: client plaintext auth = no

client schannel (G)

This controls whether the client offers or even demands the use of the netlogon schannel. @@ -2007,7 +2007,7 @@ auth to disable this for Samba's clients (such as smbclient)

If this option, and ntlm auth are both disabled, then only NTLMv2 logins will be permited. Not all clients support NTLMv2, and most will require - special configuration to use it.

Default: lanman auth = yes + special configuration to use it.

Default: lanman auth = no

large readwrite (G)

This parameter determines whether or not smbd(8) supports the new 64k Index: samba-3.0.27a/docs/manpages/smb.conf.5 =================================================================== --- samba-3.0.27a.orig/docs/manpages/smb.conf.5 +++ samba-3.0.27a/docs/manpages/smb.conf.5 @@ -1272,7 +1272,7 @@ parameter is enabled, then only NTLMv2 logins will be attempted. .sp Default: -\fB\fIclient lanman auth\fR = yes \fR +\fB\fIclient lanman auth\fR = no \fR .RE .PP client ntlmv2 auth (G) @@ -1303,7 +1303,7 @@ Specifies whether a client should send a plaintext password if the server does not support encrypted passwords. .sp Default: -\fB\fIclient plaintext auth\fR = yes \fR +\fB\fIclient plaintext auth\fR = no \fR .RE .PP client schannel (G) @@ -3082,7 +3082,7 @@ are both disabled, then only NTLMv2 logins will be permited. Not all clients support NTLMv2, and most will require special configuration to use it. .sp Default: -\fB\fIlanman auth\fR = yes \fR +\fB\fIlanman auth\fR = no \fR .RE .PP large readwrite (G)