Appendix F. Sample Configuration File
This appendix gives an example of a production smb.conf file and looks at how many of the options are used in practice. The following is a slightly disguised version of one we used at a corporation with five Linux servers, five Windows for Workgroups clients and three NT Workstation clients:
# smb.conf -- File Server System for: 1 Example.COM BSC & Management Office [globals] workgroup = 1EG_BSC interfaces = 10.10.1.14/24
We provide this service on only one of the machine’s interfaces. The interfaces option sets its address and netmask, where /24 is the same as using the netmask 255.255.255.0:
comment = Samba ver. %v
preexec = csh -c `echo /usr/samba/bin/smbclient \
-M %m -I %I` &We use the preexec command to log information about all connections by machine name (%m) and IP address (%I):
# smbstatus will output various info on current status status = yes browseable = yes printing = bsd # the username that will be used for access to services # specified with 'guest = ok' guest account = samba
The default guest account was nobody, uid -1, which produced log messages on one of our machines saying “your server is being unfriendly,” so we created a specific Samba guest account for browsing and printing:
# superuser account - admin privilages to shares, with no # restrictions # WARNING - use this with care: files can be modified, # regardless of file permissions admin users = root # who is NOT allowed to connect to ANY service invalid users = @wheel, mail, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access