◆testparm
sambaのsmb.confの構文チェックを行うコマンド
簡易マニュアル
[root@localhost ~]#testparm --help
Usage: [OPTION...] <config-file> [host-name] [host-ip]
-s, --suppress-prompt Suppress prompt for enter
-v, --verbose Show default options too
-L, --server=STRING Set %%L macro to servername
-t, --encoding=STRING Print parameters with encoding
--show-all-parameters Show the parameters, type, possible values
--parameter-name=STRING Limit testparm to a named parameter
--section-name=STRING Limit testparm to a named section
Help options:
-?, --help Show this help message
--usage Display brief usage message
Common samba options:
-V, --version Print version
使用例
[root@localhost ~]#testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions ←ここでEnterを押すと現在のsmb.confが表示されます
[global]
dos charset = CP932
display charset = UTF-8
server string = bobchan2
log file = /var/log/samba/%m.log
max log size = 50
load printers = No
disable spoolss = Yes
dns proxy = No
hosts allow = 192.168., 127.
cups options = raw
[homes]
comment = Home Directories
read only = No
browseable = No
オプションで-sを指定すると途中でEnterを押さなくても
smb.confが表示されます。
また、-vを指定するとsmb.confで定義されていない
オプションも表示します。