System information
Chapter 5. Samba management and troubleshooting 83
5.2 Testing the configuration file
The Samba configuration file can be checked with the testparm command. The program only
checks syntax, so there is no guarantee that all the defined shares will be available when the
config file is loaded by the Samba server.
Checking the configuration file, /etc/samba/smb.conf, and displaying all non-default settings
is done by executing the command:
testparm -sx
The output will look similar to the report shown in Example 5-8.
Example 5-8 Output of testparm -sx
[root@portal1 samba]# testparm -sx
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[redbook]"
Processing section "[printers]"
Processing section "[public]"
Loaded services file OK.
# Global parameters
[global]
workgroup = LINUX
server string = Samba Server on Red Hat Linux
encrypt passwords = Yes
log level = 0
log file = /var/log/samba/log.%m
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = No
wins support = Yes
[homes]
comment = Home Directories
path = %H
read only = No
create mask = 0700
directory mask = 0700
browseable = No
[redbook]
comment = RedBook files
path = /redbook
write list = @users
read only = No
[printers]
comment = All Printers
path = /var/spool/lpd
printable = Yes
browseable = No
[public]
path = /home/public
write list = root
read only = No
directory mask = 0777