Check the internal correctness smb.conf configuration file - testparm

Overview

testparm [-s] [-h] [-L servername] [configfilename] [hostname hostIP]

 

description

This program is part of the samba suite.

testparm is a very simple procedure for checking the correctness of internal smbd configuration file. If the program reports no problems, then you can safely use this configuration file smbd will successfully load the ground.

Note that this does not guarantee that the services specified in the configuration file may be available or will operate as hoped.

If the optional host name and host IP address on its command, then, the test program will run through the service and report whether the specified host has access to each service.

If testparm finds an error, then in the smb.conf file it returns an exit code of 1 to the calling program, otherwise it returns an exit code of 0. This allows shell scripts to test the output from testparm.

 

Options

 

-s
Without this parameter, testparm will be prompted to make a carriage service between listed names and service definitions.
-h
Lists usage information
-L servername
% L macro set this value to the service item name. Very useful for testing include files macro value.
configfilename
To check the specified profile name. If not specified, the program default smb.conf file will be checked.
hostname
If the command line with this argument, the test program will check the smb.conf file "hosts allow" and "hosts deny" parameter to test these IP address of the corresponding host name can access the smbd server. If you use this parameter, hostIP parameter must also be used.
hostIP
This parameter specifies the host name corresponding to the previously given IP address. As said above, the host name parameter and the address must be supplied.

 

Related documents

smb.conf, which is usually the name of the configuration file used by smbd. 

Guess you like

Origin www.cnblogs.com/fanweisheng/p/11101440.html