1TESTPARM(1)                                                        TESTPARM(1)
2
3
4

NAME

6       testparm  -  check an smb.conf configuration file for internal correct‐
7       ness
8

SYNOPSIS

10       testparm [-s] [-h] [-v] [-L <servername>] [-t <encoding>] {config file‐
11        name} [hostname hostIP]
12

DESCRIPTION

14       This tool is part of the samba(7) suite.
15
16       testparm  is  a very simple test program to check an smbd(8) configura‐
17       tion file for internal correctness. If this program  reports  no  prob‐
18       lems, you can use the configuration file with confidence that smbd will
19       successfully load the configuration file.
20
21       Note that this is NOT a guarantee that the services  specified  in  the
22       configuration file will be available or will operate as expected.
23
24       If the optional host name and host IP address are specified on the com‐
25       mand line, this test program  will  run  through  the  service  entries
26       reporting whether the specified host has access to each service.
27
28       If testparm finds an error in the
29        smb.conf  file  it  returns  an exit code of 1 to the calling program,
30       else it returns an exit code of 0. This allows shell  scripts  to  test
31       the output from testparm.
32

OPTIONS

34       -s
35          Without  this  option,  testparm  will  prompt for a carriage return
36          after printing the service names and before dumping the service def‐
37          initions.
38
39       -h|--help
40          Print a summary of command line options.
41
42       -V
43          Prints the program version number.
44
45       -L servername
46          Sets  the  value  of  the %L macro to servername. This is useful for
47          testing include files specified with the %L macro.
48
49       -v
50          If this option is specified, testparm will also output  all  options
51          that  were  not  used  in  smb.conf(5)  and  are  thus  set to their
52          defaults.
53
54       -t encoding
55          Output data in specified encoding.
56
57       --parameter-name parametername
58          Dumps the named parameter. If no section-name is  set  the  view  is
59          limited  by  default  to  the global section. It is also possible to
60          dump a parametrical option. Therfore the option has to be  separated
61          by a colon from the parametername.
62
63       --section-name sectionname
64          Dumps the named section.
65
66       configfilename
67          This is the name of the configuration file to check. If this parame‐
68          ter is not  present  then  the  default  smb.conf(5)  file  will  be
69          checked.
70
71       hostname
72          If  this  parameter  and  the following are specified, then testparm
73          will examine the hosts  allow  and  hosts  deny  parameters  in  the
74          smb.conf(5)  file  to determine if the hostname with this IP address
75          would be allowed access to the smbd server.  If  this  parameter  is
76          supplied, the hostIP parameter must also be supplied.
77
78       hostIP
79          This is the IP address of the host specified in the previous parame‐
80          ter. This address must be supplied if the hostname parameter is sup‐
81          plied.
82

FILES

84       smb.conf(5)
85          This is usually the name of the configuration file used by smbd(8).
86

DIAGNOSTICS

88       The  program will issue a message saying whether the configuration file
89       loaded OK or not. This message may be preceded by errors  and  warnings
90       if  the  file did not load. If the file was loaded OK, the program then
91       dumps all known service details to stdout.
92

VERSION

94       This man page is correct for version 3.0 of the Samba suite.
95

SEE ALSO

97       smb.conf(5), smbd(8)
98

AUTHOR

100       The original Samba software  and  related  utilities  were  created  by
101       Andrew  Tridgell.  Samba  is now developed by the Samba Team as an Open
102       Source project similar to the way the Linux kernel is developed.
103
104       The original Samba man pages were written by Karl Auer.  The  man  page
105       sources  were converted to YODL format (another excellent piece of Open
106       Source  software,  available  at  ftp://ftp.icce.rug.nl/pub/unix/)  and
107       updated  for the Samba 2.0 release by Jeremy Allison. The conversion to
108       DocBook for Samba 2.2 was done by Gerald Carter. The conversion to Doc‐
109       Book XML 4.2 for Samba 3.0 was done by Alexander Bokovoy.
110
111
112
113
114                                                                   TESTPARM(1)
Impressum