Debian Codegraph @

upstream/debian-unstable/man1/testparm.1

raw
1 '\" t
2 .\" Title: testparm
3 .\" Author: [see the "AUTHOR" section]
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\" Date: 05/26/2026
6 .\" Manual: User Commands
7 .\" Source: Samba 4.24.3-Debian-4.24.3+dfsg-1
8 .\" Language: English
9 .\"
10 .TH "TESTPARM" "1" "05/26/2026" "Samba 4\&.24\&.3\-Debian\-4\&.24\&.3+dfs" "User Commands"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 testparm \- check an smb\&.conf configuration file for internal correctness
32 .SH "SYNOPSIS"
33 .HP \w'\ 'u
34 testparm [\-s|\-\-suppress\-prompt] [\-v|\-\-verbose] [\-?|\-\-help] [\-\-usage] [\-d|\-\-debuglevel=DEBUGLEVEL] [\-\-debug\-stdout] {config\ filename} [hostname\ hostIP]
35 .SH "DESCRIPTION"
36 .PP
37 This tool is part of the
38 \fBsamba\fR(7)
39 suite\&.
40 .PP
41 testparm
42 is a very simple test program to check an
43 \fBsmbd\fR(8)
44 configuration file for internal correctness\&. If this program reports no problems, you can use the configuration file with confidence that
45 smbd
46 will successfully load the configuration file\&.
47 .PP
48 Note that this is
49 \fINOT\fR
50 a guarantee that the services specified in the configuration file will be available or will operate as expected\&.
51 .PP
52 If the optional host name and host IP address are specified on the command line, this test program will run through the service entries reporting whether the specified host has access to each service\&.
53 .PP
54 If
55 testparm
56 finds an error in the
57 smb\&.conf
58 file it returns an exit code of 1 to the calling program, else it returns an exit code of 0\&. This allows shell scripts to test the output from
59 testparm\&.
60 .SH "OPTIONS"
61 .PP
62 \-s|\-\-suppress\-prompt
63 .RS 4
64 Without this option,
65 testparm
66 will prompt for a carriage return after printing the service names and before dumping the service definitions\&.
67 .RE
68 .PP
69 \-v|\-\-verbose
70 .RS 4
71 If this option is specified, testparm will also output all options that were not used in
72 \fBsmb.conf\fR(5)
73 and are thus set to their defaults\&.
74 .RE
75 .PP
76 \-\-parameter\-name parametername
77 .RS 4
78 Dumps the named parameter\&. If no section\-name is set the view is limited by default to the global section\&. It is also possible to dump a parametrical option\&. Therefore the option has to be separated by a colon from the parametername\&.
79 .RE
80 .PP
81 \-\-section\-name sectionname
82 .RS 4
83 Dumps the named section\&.
84 .RE
85 .PP
86 \-\-show\-all\-parameters
87 .RS 4
88 Show the parameters, type, possible values\&.
89 .RE
90 .PP
91 \-l|\-\-skip\-logic\-checks
92 .RS 4
93 Skip the global checks\&.
94 .RE
95 .PP
96 \-?|\-\-help
97 .RS 4
98 Print a summary of command line options\&.
99 .RE
100 .PP
101 \-\-usage
102 .RS 4
103 Display brief usage message\&.
104 .RE
105 .PP
106 \-d|\-\-debuglevel=level
107 .RS 4
108 \fIlevel\fR
109 is an integer from 0 to 10\&. The default value if this parameter is not specified is 1 for client applications\&.
110 .sp
111 The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&.
112 .sp
113 Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&.
114 .sp
115 Note that specifying this parameter here will override the
116 \m[blue]\fBlog level\fR\m[]
117 parameter in the
118 /etc/samba/smb\&.conf
119 file\&.
120 .RE
121 .PP
122 \-\-debug\-stdout
123 .RS 4
124 This will redirect debug output to STDOUT\&. By default all clients are logging to STDERR\&.
125 .RE
126 .PP
127 \-\-configfile=<configuration file>
128 .RS 4
129 The file specified contains the configuration details required by the client\&. The information in this file can be general for client and server or only provide client specific like options such as
130 \m[blue]\fBclient smb encrypt\fR\m[]\&. See
131 /etc/samba/smb\&.conf
132 for more information\&. The default configuration file name is determined at compile time\&.
133 .RE
134 .PP
135 \-\-option=<name>=<value>
136 .RS 4
137 Set the
138 \fBsmb.conf\fR(5)
139 option "<name>" to value "<value>" from the command line\&. This overrides compiled\-in defaults and options read from the configuration file\&. If a name or a value includes a space, wrap whole \-\-option=name=value into quotes\&.
140 .RE
141 .PP
142 \-V|\-\-version
143 .RS 4
144 Prints the program version number\&.
145 .RE
146 .PP
147 configfilename
148 .RS 4
149 This is the name of the configuration file to check\&. If this parameter is not present then the default
150 \fBsmb.conf\fR(5)
151 file will be checked\&.
152 .RE
153 .PP
154 hostname
155 .RS 4
156 If this parameter and the following are specified, then
157 testparm
158 will examine the
159 \fIhosts allow\fR
160 and
161 \fIhosts deny\fR
162 parameters in the
163 \fBsmb.conf\fR(5)
164 file to determine if the hostname with this IP address would be allowed access to the
165 smbd
166 server\&. If this parameter is supplied, the hostIP parameter must also be supplied\&.
167 .RE
168 .PP
169 hostIP
170 .RS 4
171 This is the IP address of the host specified in the previous parameter\&. This address must be supplied if the hostname parameter is supplied\&.
172 .RE
173 .SH "FILES"
174 .PP
175 \fBsmb.conf\fR(5)
176 .RS 4
177 This is usually the name of the configuration file used by
178 \fBsmbd\fR(8)\&.
179 .RE
180 .SH "DIAGNOSTICS"
181 .PP
182 The program will issue a message saying whether the configuration file loaded OK or not\&. This message may be preceded by errors and warnings if the file did not load\&. If the file was loaded OK, the program then dumps all known service details to stdout\&.
183 .PP
184 For certain use cases, SMB protocol requires use of cryptographic algorithms which are known to be weak and already broken\&. DES and ARCFOUR (RC4) ciphers and the SHA1 and MD5 hash algorithms are considered weak but they are required for backward compatibility\&. The testparm utility shows whether the Samba tools will fall back to these weak crypto algorithms if it is not possible to use strong cryptography by default\&. In FIPS mode weak crypto cannot be enabled\&.
185 .SH "VERSION"
186 .PP
187 This man page is part of version 4\&.24\&.3\-Debian\-4\&.24\&.3+dfsg\-1 of the Samba suite\&.
188 .SH "SEE ALSO"
189 .PP
190 \fBsmb.conf\fR(5),
191 \fBsmbd\fR(8)
192 .SH "AUTHOR"
193 .PP
194 The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&.