From 3878085eca35d5c3b08761f61281de0b1b49ce2d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 1 Jul 2003 22:58:52 +0000 Subject: regenerate docs (This used to be commit cc02d3bc170fe5c8c4474156edb6c83720a47aa0) --- docs/htmldocs/securing-samba.html | 49 +++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 25 deletions(-) (limited to 'docs/htmldocs/securing-samba.html') diff --git a/docs/htmldocs/securing-samba.html b/docs/htmldocs/securing-samba.html index 621ef87cf5..a790816d02 100644 --- a/docs/htmldocs/securing-samba.html +++ b/docs/htmldocs/securing-samba.html @@ -1,5 +1,4 @@ - -Chapter 15. Securing Samba

Chapter 15. Securing Samba

Andrew Tridgell

Samba Team

John H. Terpstra

Samba Team

May 26, 2003

Introduction

+Chapter 15. Securing Samba

Chapter 15. Securing Samba

Andrew Tridgell

Samba Team

John H. Terpstra

Samba Team

May 26, 2003

Introduction

This note was attached to the Samba 2.2.8 release notes as it contained an important security fix. The information contained here applies to Samba installations in general. @@ -11,7 +10,7 @@ on it!" Security concerns are just like that: You need to know a little about the subject to appreciate how obvious most of it really is. The challenge for most of us is to discover that first morsel of knowledge with which we may unlock the secrets of the masters. -

Features and Benefits

+

Features and Benefits

There are three level at which security principals must be observed in order to render a site at least moderately secure. These are: the perimeter firewall, the configuration of the host server that is running Samba, and Samba itself. @@ -30,13 +29,13 @@ TCP/IP connections. Another method by which Samba may be secured is by way of setting Access Control Entries in an Access Control List on the shares themselves. This is discussed in the chapter on File, Directory and Share Access Control. -

Technical Discussion of Protective Measures and Issues

+

Technical Discussion of Protective Measures and Issues

The key challenge of security is the fact that protective measures suffice at best only to close the door on known exploits and breach techniques. Never assume that because you have followed these few measures that the Samba server is now an impenetrable fortress! Given the history of information systems so far, it is only a matter of time before someone will find yet another vulnerability. -

Using host based protection

+

Using host based protection

In many installations of Samba the greatest threat comes for outside your immediate network. By default Samba will accept connections from any host, which means that if you run an insecure version of Samba on @@ -56,7 +55,7 @@ before someone will find yet another vulnerability. 192.168.3. All other connections will be refused as soon as the client sends its first packet. The refusal will be marked as a not listening on called name error. -

User based protection

+

User based protection

If you want to restrict access to your server to valid users only then the following method may be of use. In the smb.conf [globals] section put:

@@ -64,7 +63,7 @@ before someone will find yet another vulnerability.
 	

What this does is, it restricts all server access to either the user jacko or to members of the system group smbusers. -

Using interface protection

+

Using interface protection

By default Samba will accept connections on any network interface that it finds on your system. That means if you have a ISDN line or a PPP connection to the Internet then Samba will accept connections on those @@ -86,7 +85,7 @@ before someone will find yet another vulnerability. connection refused reply. In that case no Samba code is run at all as the operating system has been told not to pass connections from that interface to any samba process. -

Using a firewall

+

Using a firewall

Many people use a firewall to deny access to services that they don't want exposed outside their network. This can be a very good idea, although I would recommend using it in conjunction with the above @@ -99,7 +98,7 @@ before someone will find yet another vulnerability. The last one is important as many older firewall setups may not be aware of it, given that this port was only added to the protocol in recent years. -

Using a IPC$ share deny

+

Using a IPC$ share deny

If the above methods are not suitable, then you could also place a more specific deny on the IPC$ share that is used in the recently discovered security hole. This allows you to offer access to other @@ -126,10 +125,10 @@ before someone will find yet another vulnerability.

This is not recommended unless you cannot use one of the other methods listed above for some reason. -

NTLMv2 Security

+

NTLMv2 Security

To configure NTLMv2 authentication the following registry keys are worth knowing about: -

-
+	

+

 		[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]
 		"lmcompatibilitylevel"=dword:00000003
 
@@ -143,25 +142,25 @@ before someone will find yet another vulnerability.
 		0x80000 - NTLMv2 session security. If either NtlmMinClientSec or
 		NtlmMinServerSec is set to 0x80000, the connection will fail if NTLMv2
 		session security is not negotiated.
-	
-

Upgrading Samba

+

+

Upgrading Samba

Please check regularly on http://www.samba.org/ for updates and important announcements. Occasionally security releases are made and it is highly recommended to upgrade Samba when a security vulnerability is discovered. -

Common Errors

+

Common Errors

If all of samba and host platform configuration were really as intuitive as one might like then this section would not be necessary. Security issues are often vexing for a support person to resolve, not -because of the complexity of the problem, but for reason that most admininstrators who post what turns +because of the complexity of the problem, but for reason that most administrators who post what turns out to be a security problem request are totally convinced that the problem is with Samba. -

Smbclient works on localhost, but the network is dead

+

Smbclient works on localhost, but the network is dead

This is a very common problem. Red Hat Linux (as do others) will install a default firewall. With the default firewall in place only traffic on the loopback adapter (IP address 127.0.0.1) will be allowed through the firewall.

The solution is either to remove the firewall (stop it) or to modify the firewall script to allow SMB networking traffic through. See section above in this chapter. -

Why can users access home directories of other users?

+

Why can users access home directories of other users?

We are unable to keep individual users from mapping to any other user's home directory once they have supplied a valid password! They only need @@ -171,7 +170,7 @@ out to be a security problem request are totally convinced that the problem is w

User xyzzy can map his home directory. Once mapped user xyzzy can also map - *anyone* elses home directory! + *anyone* else's home directory!

This is not a security flaw, it is by design. Samba allows users to have *exactly* the same access to the UNIX filesystem @@ -192,16 +191,16 @@ out to be a security problem request are totally convinced that the problem is w Samba does allow the setup you require when you have set the only user = yes option on the share, is that you have not set the valid users list for the share. -

+

Note that only user works in conjunction with the users= list, so to get the behavior you require, add the line : -

+	

 	users = %S
-	
+

this is equivalent to: -

+	

 	valid users = %S
-	
+

to the definition of the [homes] share, as recommended in the smb.conf man page. -

+

-- cgit