Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Linux testparm Command

Linux testparm Command

Linux Command Reference Linux Command Reference

The Linux testparm command is used to test whether Samba settings are correct.

Running the testparm (test parameter) command can simply test Samba's configuration file. If the result is error-free, the Samba daemon will correctly load those settings, but this does not guarantee that subsequent operations will all work as expected.

Syntax

testparm [-s][配置文件][<主机名称>]

Parameter Description:

Example

View the Ssmba configuration

# testparm     

Load smb config files from /etc/samba/smb.conf

Processing section '[homes]'

Processing section '[printers]'

Processing section '[uptech]'

Processing section '[home]'

Loaded services file OK.

Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

      ///Press Enter to continue

# Global parameters

[global]

workgroup = MYGROUP

server string = Samba Server

security = SHARE

encrypt passwords = No

password server = None

log file = /var/log/samba/%m.log

max log size = 50

socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

printcap name = /etc/printcap

dns proxy = No

idmap uid = 16777216-33554431

idmap gid = 16777216-33554431

cups options = raw



[homes]

comment = Home Directories

read only = No

browseable = No



[printers]

comment = All Printers

path = /var/spool/samba

printable = Yes

browseable = No



[uptech]

comment = *

path = /home/uptech

read only = No

guest ok = Yes



[home]

comment = *

path = /home

read only = No

guest ok = Yes

Linux Command Reference Linux Command Reference