1.4 Samba Security: Difference between revisions

From SambaWiki
No edit summary
No edit summary
Line 9: Line 9:


## /etc/samba/smb.conf
## /etc/samba/smb.conf

## Global parameters
## Global parameters

[global]
[global]
workgroup = DDESIGN
workgroup = DDESIGN
Line 23: Line 23:


## /etc/samba/smb.conf
## /etc/samba/smb.conf

## ==== Share Definitions =====
## ==== Share Definitions =====

[Documents]
[Documents]
comment = share to test samba
comment = share to test samba

Revision as of 05:17, 25 January 2007

1.4: Samba Security


There are many additional features we can add to Samba to make it more secure. We can add some additional comments to our smb.conf to achieve this.

One of the great features of Samba is the “host allow =” option. This can be applied on a global scale to all the shares in the smb.conf by placing the global section of the smb.conf or to specific shares, but not both.

The example limits access to Samba shares to clients on the 192.168.0.0/24 network as it is defined it in the glocal section of the smb.conf.

## /etc/samba/smb.conf

## Global parameters

[global]
workgroup = DDESIGN
security = user
hosts allow = 192.168.0.0/24


For the enthusiast, we can use this option on a per share basis, which provides us with greater flexability.

This limits access to this share to the client with the 192.168.0.100/24 IP address; you of course can use multiple addresses.

## /etc/samba/smb.conf

## ==== Share Definitions =====

[Documents]
comment = share to test samba
path = /data/documents
writeable = yes
browseable = yes
read only = no
valid users = "@Domain Users"
hosts allow = 192.168.0.100/24