[Samba] Proposal to change security=share in Samba 4.0

February 27th, 2012 - 06:00 am ET by Andrew Bartlett | Report spam
I recently proposed on samba-technical that for Samba 4.0, that we
change security=share to have the following semantics:

- All connections are made as the guest user
- No passwords are required, and no other accounts are available.

Naturally, full user-name/password authentication remain available in
security=user and above.

The rationale is that we need a very simple way to run a 'trust the
network' Samba server, where users mark shares as guest ok. I want to
keep these simple configurations working.

At the same time, I want to close the door on one of the most arcane
areas of Samba authentication. The problem comes from the fact that
Samba never implemented security=share properly: instead of having one
password per share, we tried to guess the username, and match that to a
username/password pair.

Not only is this code complex, it begins to fail with modern clients and
modern security settings. For example, NTLMv2 relies on the username
and workgroup, but clients which send NTLMv2 do not send these in the
'tree connect' request that contains the password. Instead, we must
remember the previous unchecked 'session setup', and apply the password
from there. If we instead guess the username, then NTLMv2 will not
work.

Finally, Samba clients only send LM passwords to security=share servers.
LM passwords are very insecure, and are now off by default. As such,
Samba clients will not connect to any server running security=share by
default.

If you use security=share, and feel that your particular configuration
cannot be handled any other way, please let me know, so we can find the
best to handle your particular requirements.

Thanks,

Andrew Bartlett
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org

To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
email Follow the discussionReplies 18 repliesReplies Make a reply

Similar topics

Replies

#1 John H Terpstra
February 27th, 2012 - 08:00 am ET | Report spam
On 02/27/2012 04:58 AM, Andrew Bartlett wrote:
I recently proposed on samba-technical that for Samba 4.0, that we
change security=share to have the following semantics:

- All connections are made as the guest user
- No passwords are required, and no other accounts are available.

Naturally, full user-name/password authentication remain available in
security=user and above.

The rationale is that we need a very simple way to run a 'trust the
network' Samba server, where users mark shares as guest ok. I want to
keep these simple configurations working.

At the same time, I want to close the door on one of the most arcane
areas of Samba authentication. The problem comes from the fact that
Samba never implemented security=share properly: instead of having one
password per share, we tried to guess the username, and match that to a
username/password pair.

Not only is this code complex, it begins to fail with modern clients and
modern security settings. For example, NTLMv2 relies on the username
and workgroup, but clients which send NTLMv2 do not send these in the
'tree connect' request that contains the password. Instead, we must
remember the previous unchecked 'session setup', and apply the password
from there. If we instead guess the username, then NTLMv2 will not
work.

Finally, Samba clients only send LM passwords to security=share servers.
LM passwords are very insecure, and are now off by default. As such,
Samba clients will not connect to any server running security=share by
default.

If you use security=share, and feel that your particular configuration
cannot be handled any other way, please let me know, so we can find the
best to handle your particular requirements.

Thanks,

Andrew Bartlett



Is there any reason we can not do away with "security = share" and get
rid of this altogether? Was there not a prior proposal to deprecate
this back in the early days of 3.0.x?

- John T.
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
Replies Reply to this message
#2 Jeremy Allison
February 27th, 2012 - 05:10 pm ET | Report spam
On Mon, Feb 27, 2012 at 09:58:44PM +1100, Andrew Bartlett wrote:
I recently proposed on samba-technical that for Samba 4.0, that we
change security=share to have the following semantics:

- All connections are made as the guest user
- No passwords are required, and no other accounts are available.

Naturally, full user-name/password authentication remain available in
security=user and above.

The rationale is that we need a very simple way to run a 'trust the
network' Samba server, where users mark shares as guest ok. I want to
keep these simple configurations working.

At the same time, I want to close the door on one of the most arcane
areas of Samba authentication. The problem comes from the fact that
Samba never implemented security=share properly: instead of having one
password per share, we tried to guess the username, and match that to a
username/password pair.

Not only is this code complex, it begins to fail with modern clients and
modern security settings. For example, NTLMv2 relies on the username
and workgroup, but clients which send NTLMv2 do not send these in the
'tree connect' request that contains the password. Instead, we must
remember the previous unchecked 'session setup', and apply the password
from there. If we instead guess the username, then NTLMv2 will not
work.

Finally, Samba clients only send LM passwords to security=share servers.
LM passwords are very insecure, and are now off by default. As such,
Samba clients will not connect to any server running security=share by
default.

If you use security=share, and feel that your particular configuration
cannot be handled any other way, please let me know, so we can find the
best to handle your particular requirements.



I'm mostly ok with this, but I'd like to hear from people supporting
paying clients, to make sure we're not breaking a customer setup
that a NAS box might depend on.

Jeremy.
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
Replies Reply to this message
#3 Andrew Bartlett
February 27th, 2012 - 05:20 pm ET | Report spam
On Mon, 2012-02-27 at 06:39 -0600, John H Terpstra wrote:
On 02/27/2012 04:58 AM, Andrew Bartlett wrote:
> I recently proposed on samba-technical that for Samba 4.0, that we
> change security=share to have the following semantics:
>
> - All connections are made as the guest user
> - No passwords are required, and no other accounts are available.
>
> Naturally, full user-name/password authentication remain available in
> security=user and above.
>
> The rationale is that we need a very simple way to run a 'trust the
> network' Samba server, where users mark shares as guest ok. I want to
> keep these simple configurations working.
>
> At the same time, I want to close the door on one of the most arcane
> areas of Samba authentication. The problem comes from the fact that
> Samba never implemented security=share properly: instead of having one
> password per share, we tried to guess the username, and match that to a
> username/password pair.
>
> Not only is this code complex, it begins to fail with modern clients and
> modern security settings. For example, NTLMv2 relies on the username
> and workgroup, but clients which send NTLMv2 do not send these in the
> 'tree connect' request that contains the password. Instead, we must
> remember the previous unchecked 'session setup', and apply the password
> from there. If we instead guess the username, then NTLMv2 will not
> work.
>
> Finally, Samba clients only send LM passwords to security=share servers.
> LM passwords are very insecure, and are now off by default. As such,
> Samba clients will not connect to any server running security=share by
> default.
>
> If you use security=share, and feel that your particular configuration
> cannot be handled any other way, please let me know, so we can find the
> best to handle your particular requirements.
>
> Thanks,
>
> Andrew Bartlett

Is there any reason we can not do away with "security = share" and get
rid of this altogether? Was there not a prior proposal to deprecate
this back in the early days of 3.0.x?



The option has been formally deprecated since 3.6.0. I am fully in
favour of total removal, but in deference to our existing users, I took
on board Kai's suggestion that a simple, just share files as guest
option was valuable.

Andrew Bartlett
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org


To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
Replies Reply to this message
#4 Stefan (metze) Metzmacher
February 27th, 2012 - 05:20 pm ET | Report spam
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
protocol="application/pgp-signature";
boundary="enigDAB5B8378234446E8430F5A9"

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)

Am 27.02.2012 13:39, schrieb John H Terpstra:
On 02/27/2012 04:58 AM, Andrew Bartlett wrote:
I recently proposed on samba-technical that for Samba 4.0, that we
change security=share to have the following semantics:

- All connections are made as the guest user
- No passwords are required, and no other accounts are available.

Naturally, full user-name/password authentication remain available in
security=user and above.

The rationale is that we need a very simple way to run a 'trust the
network' Samba server, where users mark shares as guest ok. I want to
keep these simple configurations working.

At the same time, I want to close the door on one of the most arcane
areas of Samba authentication. The problem comes from the fact that
Samba never implemented security=share properly: instead of having one
password per share, we tried to guess the username, and match that to a
username/password pair.

Not only is this code complex, it begins to fail with modern clients and
modern security settings. For example, NTLMv2 relies on the username
and workgroup, but clients which send NTLMv2 do not send these in the
'tree connect' request that contains the password. Instead, we must
remember the previous unchecked 'session setup', and apply the password
from there. If we instead guess the username, then NTLMv2 will not
work.

Finally, Samba clients only send LM passwords to security=share servers.
LM passwords are very insecure, and are now off by default. As such,
Samba clients will not connect to any server running security=share by
default.

If you use security=share, and feel that your particular configuration
cannot be handled any other way, please let me know, so we can find the
best to handle your particular requirements.

Thanks,

Andrew Bartlett



Is there any reason we can not do away with "security = share" and get
rid of this altogether? Was there not a prior proposal to deprecate
this back in the early days of 3.0.x?



I only remember a discussion at the 3.6.0preX time.

I'd love to remove "security=share" completely, but I'm also ok
with keeping it for anonymous access only.

metze





MIME-Version: 1.0

To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
Replies Reply to this message
#5 Andrew Bartlett
February 27th, 2012 - 06:20 pm ET | Report spam
On Mon, 2012-02-27 at 17:53 -0500, David Collier-Brown wrote:

Am I correct in thinking this would make all shares have the same
password as the guest user, or do you mean there really is no password
at all, or alternatively that one would specify the share, provide
it's password and be logged on as guest???

It's been a while since I had a security=share setup, but I remember
WfW clients thinking that they had per-share passwords...



In the past, Samba tried to match the 'per share' password provided by
the client against a list of users, falling back to guest if 'guest ok yes' was set on the share.

What will happen now is that the password will be ignored, and only the
'guest ok' will be checked, and access will be as guest.

Thanks,

Andrew Bartlett
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org


To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
Replies Reply to this message
Help Create a new topicNext page Replies Make a reply
Search Make your own search