20.6.1.4. Secure Read/Write File and Print Server

20.6.1.4. Secure Read/Write File and Print Server

The following smb.conf file shows a sample configuration needed to implement a secure read/write print server. Setting the security directive to user forces Samba to authenticate client connections. Notice the [homes] share does not have a force user or force group directive as the [public] share does. The [homes] share uses the authenticated user details for any files created as opposed to the force user and force group in [public].

[global] 
workgroup = DOCS 
netbios name = DOCS_SRV 
security = user 
printcap name = cups 
disable spools = Yes 
show add printer wizard = No 
printing = cups  
[homes] 
comment = Home Directories 
valid users = %S 
read only = No 
browseable = No  
[public] 
comment = Data 
path = /export 
force user = docsbot 
force group = users 
guest ok = Yes  
[printers] 
comment = All Printers 
path = /var/spool/samba 
printer admin = john, ed, @admins 
create mask = 0600 
guest ok = Yes 
printable = Yes 
use client driver = Yes 
browseable = Yes

Note: This documentation is provided {and copyrighted} by Red Hat®, Inc. and is released via the Open Publication License. The copyright holder has added the further requirement that Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder. The CentOS project redistributes these original works (in their unmodified form) as a reference for CentOS-5 because CentOS-5 is built from publicly available, open source SRPMS. The documentation is unmodified to be compliant with upstream distribution policy. Neither CentOS-5 nor the CentOS Project are in any way affiliated with or sponsored by Red Hat®, Inc.