橘子味的心
标题:Linux shell testparm 命令

Linux shell testparm 命令用于测试 Samba 的设置是否正确无误。

执行 testparm(test parameter) 指令可以简单测试Samba的配置文件,假如测试结果无误,Samba常驻服务就能正确载入该设置值,但并不保证其后的操作如预期般一切正常。

testparm 命令语法格式

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

选项

-s
不显示提示符号等待用户按下Enter键,就直接列出Samba服务定义信息。

范例

查看 Ssmba 配置

[root@localhost ~]# testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[homes]"
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions   #按回车键继续

# Global parameters
[global]
    workgroup = SAMBA
    printcap name = cups
    security = USER
    idmap config * : backend = tdb
    cups options = raw


[homes]
    comment = Home Directories
    browseable = No
    inherit acls = Yes
    read only = No
    valid users = %S %D%w%S


[printers]
    comment = All Printers
    path = /var/tmp
    browseable = No
    printable = Yes
    create mask = 0600


[print$]
    comment = Printer Drivers
    path = /var/lib/samba/drivers
    create mask = 0664
    directory mask = 0775
    write list = root
[root@localhost ~]#

返回上一级

目录

分类