1SMBD(8) System Administration tools SMBD(8)
2
3
4
6 smbd - server to provide SMB/CIFS services to clients
7
9 smbd [-D|--daemon] [-F|--foreground] [-S|--log-stdout]
10 [-i|--interactive] [-V] [-b|--build-options] [-d <debug level>]
11 [-l|--log-basename <log directory>] [-p <port number(s)>]
12 [-P <profiling level>] [-s <configuration file>] [--no-process-group]
13
15 This program is part of the samba(7) suite.
16
17 smbd is the server daemon that provides filesharing and printing
18 services to Windows clients. The server provides filespace and printer
19 services to clients using the SMB (or CIFS) protocol. This is
20 compatible with the LanManager protocol, and can service LanManager
21 clients. These include MSCLIENT 3.0 for DOS, Windows for Workgroups,
22 Windows 95/98/ME, Windows NT, Windows 2000, OS/2, DAVE for Macintosh,
23 and smbfs for Linux.
24
25 An extensive description of the services that the server can provide is
26 given in the man page for the configuration file controlling the
27 attributes of those services (see smb.conf(5). This man page will not
28 describe the services, but will concentrate on the administrative
29 aspects of running the server.
30
31 Please note that there are significant security implications to running
32 this server, and the smb.conf(5) manual page should be regarded as
33 mandatory reading before proceeding with installation.
34
35 A session is created whenever a client requests one. Each client gets a
36 copy of the server for each session. This copy then services all
37 connections made by the client during that session. When all
38 connections from its client are closed, the copy of the server for that
39 client terminates.
40
41 The configuration file, and any files that it includes, are
42 automatically reloaded every minute, if they change. You can force a
43 reload by sending a SIGHUP to the server. Reloading the configuration
44 file will not affect connections to any service that is already
45 established. Either the user will have to disconnect from the service,
46 or smbd killed and restarted.
47
49 -D|--daemon
50 If specified, this parameter causes the server to operate as a
51 daemon. That is, it detaches itself and runs in the background,
52 fielding requests on the appropriate port. Operating the server as
53 a daemon is the recommended way of running smbd for servers that
54 provide more than casual use file and print services. This switch
55 is assumed if smbd is executed on the command line of a shell.
56
57 -F|--foreground
58 If specified, this parameter causes the main smbd process to not
59 daemonize, i.e. double-fork and disassociate with the terminal.
60 Child processes are still created as normal to service each
61 connection request, but the main process does not exit. This
62 operation mode is suitable for running smbd under process
63 supervisors such as supervise and svscan from Daniel J. Bernstein´s
64 daemontools package, or the AIX process monitor.
65
66 -S|--log-stdout
67 If specified, this parameter causes smbd to log to standard output
68 rather than a file.
69
70 -i|--interactive
71 If this parameter is specified it causes the server to run
72 "interactively", not as a daemon, even if the server is executed on
73 the command line of a shell. Setting this parameter negates the
74 implicit daemon mode when run from the command line. smbd also
75 logs to standard output, as if the -S parameter had been given.
76
77 -d|--debuglevel=level
78 level is an integer from 0 to 10. The default value if this
79 parameter is not specified is 0.
80
81 The higher this value, the more detail will be logged to the log
82 files about the activities of the server. At level 0, only critical
83 errors and serious warnings will be logged. Level 1 is a reasonable
84 level for day-to-day running - it generates a small amount of
85 information about operations carried out.
86
87 Levels above 1 will generate considerable amounts of log data, and
88 should only be used when investigating a problem. Levels above 3
89 are designed for use only by developers and generate HUGE amounts
90 of log data, most of which is extremely cryptic.
91
92 Note that specifying this parameter here will override the log
93 level parameter in the smb.conf file.
94
95 -V|--version
96 Prints the program version number.
97
98 -s|--configfile=<configuration file>
99 The file specified contains the configuration details required by
100 the server. The information in this file includes server-specific
101 information such as what printcap file to use, as well as
102 descriptions of all the services that the server is to provide. See
103 smb.conf for more information. The default configuration file name
104 is determined at compile time.
105
106 -l|--log-basename=logdirectory
107 Base directory name for log/debug files. The extension ".progname"
108 will be appended (e.g. log.smbclient, log.smbd, etc...). The log
109 file is never removed by the client.
110
111 --option=<name>=<value>
112 Set the smb.conf(5) option "<name>" to value "<value>" from the
113 command line. This overrides compiled-in defaults and options read
114 from the configuration file.
115
116 -?|--help
117 Print a summary of command line options.
118
119 --usage
120 Display brief usage message.
121
122 --no-process-group
123 Do not create a new process group for smbd.
124
125 -b|--build-options
126 Prints information about how Samba was built.
127
128 -p|--port<port number(s)>
129 port number(s) is a space or comma-separated list of TCP ports smbd
130 should listen on. The default value is taken from the ports
131 parameter in smb.conf
132
133 The default ports are 139 (used for SMB over NetBIOS over TCP) and
134 port 445 (used for plain SMB over TCP).
135
136 -P|--profiling-level<profiling level>
137 profiling level is a number specifying the level of profiling data
138 to be collected. 0 turns off profiling, 1 turns on counter
139 profiling only, 2 turns on complete profiling, and 3 resets all
140 profiling data.
141
143 /etc/inetd.conf
144 If the server is to be run by the inetd meta-daemon, this file must
145 contain suitable startup information for the meta-daemon.
146
147 /etc/rc
148 or whatever initialization script your system uses).
149
150 If running the server as a daemon at startup, this file will need
151 to contain an appropriate startup sequence for the server.
152
153 /etc/services
154 If running the server via the meta-daemon inetd, this file must
155 contain a mapping of service name (e.g., netbios-ssn) to service
156 port (e.g., 139) and protocol type (e.g., tcp).
157
158 /usr/local/samba/lib/smb.conf
159 This is the default location of the smb.conf(5) server
160 configuration file. Other common places that systems install this
161 file are /usr/samba/lib/smb.conf and /etc/samba/smb.conf.
162
163 This file describes all the services the server is to make
164 available to clients. See smb.conf(5) for more information.
165
167 On some systems smbd cannot change uid back to root after a setuid()
168 call. Such systems are called trapdoor uid systems. If you have such a
169 system, you will be unable to connect from a client (such as a PC) as
170 two different users at once. Attempts to connect the second user will
171 result in access denied or similar.
172
174 PRINTER
175 If no printer name is specified to printable services, most systems
176 will use the value of this variable (or lp if this variable is not
177 defined) as the name of the printer to use. This is not specific to
178 the server, however.
179
181 Samba uses PAM for authentication (when presented with a plaintext
182 password), for account checking (is this account disabled?) and for
183 session management. The degree too which samba supports PAM is
184 restricted by the limitations of the SMB protocol and the obey pam
185 restrictions smb.conf(5) parameter. When this is set, the following
186 restrictions apply:
187
188 · Account Validation: All accesses to a samba server are checked
189 against PAM to see if the account is valid, not disabled and is
190 permitted to login at this time. This also applies to encrypted
191 logins.
192
193 · Session Management: When not using share level security, users must
194 pass PAM´s session checks before access is granted. Note however,
195 that this is bypassed in share level security. Note also that some
196 older pam configuration files may need a line added for session
197 support.
198
200 This man page is correct for version 3 of the Samba suite.
201
203 Most diagnostics issued by the server are logged in a specified log
204 file. The log file name is specified at compile time, but may be
205 overridden on the command line.
206
207 The number and nature of diagnostics available depends on the debug
208 level used by the server. If you have problems, set the debug level to
209 3 and peruse the log files.
210
211 Most messages are reasonably self-explanatory. Unfortunately, at the
212 time this man page was created, there are too many diagnostics
213 available in the source code to warrant describing each and every
214 diagnostic. At this stage your best bet is still to grep the source
215 code and inspect the conditions that gave rise to the diagnostics you
216 are seeing.
217
219 Samba stores it´s data in several TDB (Trivial Database) files, usually
220 located in /var/lib/samba.
221
222 (*) information persistent across restarts (but not necessarily
223 important to backup).
224
225 account_policy.tdb*
226 NT account policy settings such as pw expiration, etc...
227
228 brlock.tdb
229 byte range locks
230
231 browse.dat
232 browse lists
233
234 gencache.tdb
235 generic caching db
236
237 group_mapping.tdb*
238 group mapping information
239
240 locking.tdb
241 share modes & oplocks
242
243 login_cache.tdb*
244 bad pw attempts
245
246 messages.tdb
247 Samba messaging system
248
249 netsamlogon_cache.tdb*
250 cache of user net_info_3 struct from net_samlogon() request (as a
251 domain member)
252
253 ntdrivers.tdb*
254 installed printer drivers
255
256 ntforms.tdb*
257 installed printer forms
258
259 ntprinters.tdb*
260 installed printer information
261
262 printing/
263 directory containing tdb per print queue of cached lpq output
264
265 registry.tdb
266 Windows registry skeleton (connect via regedit.exe)
267
268 smbXsrv_session_global.tdb
269 session information (e.g. support for ´utmp = yes´)
270
271 smbXsrv_tcon_global.tdb
272 share connections (used to enforce max connections, etc...)
273
274 smbXsrv_open_global.tdb
275 open file handles (used durable handles, etc...)
276
277 share_info.tdb*
278 share acls
279
280 winbindd_cache.tdb
281 winbindd´s cache of user lists, etc...
282
283 winbindd_idmap.tdb*
284 winbindd´s local idmap db
285
286 wins.dat*
287 wins database when ´wins support = yes´
288
290 Sending the smbd a SIGHUP will cause it to reload its smb.conf
291 configuration file within a short period of time.
292
293 To shut down a user´s smbd process it is recommended that SIGKILL (-9)
294 NOT be used, except as a last resort, as this may leave the shared
295 memory area in an inconsistent state. The safe way to terminate an smbd
296 is to send it a SIGTERM (-15) signal and wait for it to die on its own.
297
298 The debug log level of smbd may be raised or lowered using
299 smbcontrol(1) program (SIGUSR[1|2] signals are no longer used since
300 Samba 2.2). This is to allow transient problems to be diagnosed, whilst
301 still running at a normally low log level.
302
303 Note that as the signal handlers send a debug write, they are not
304 re-entrant in smbd. This you should wait until smbd is in a state of
305 waiting for an incoming SMB before issuing them. It is possible to make
306 the signal handlers safe by un-blocking the signals before the select
307 call and re-blocking them after, however this would affect performance.
308
310 hosts_access(5), inetd(8), nmbd(8), smb.conf(5), smbclient(1),
311 testparm(1), and the Internet RFC´s rfc1001.txt, rfc1002.txt. In
312 addition the CIFS (formerly SMB) specification is available as a link
313 from the Web page http://samba.org/cifs/.
314
316 The original Samba software and related utilities were created by
317 Andrew Tridgell. Samba is now developed by the Samba Team as an Open
318 Source project similar to the way the Linux kernel is developed.
319
320 The original Samba man pages were written by Karl Auer. The man page
321 sources were converted to YODL format (another excellent piece of Open
322 Source software, available at ftp://ftp.icce.rug.nl/pub/unix/) and
323 updated for the Samba 2.0 release by Jeremy Allison. The conversion to
324 DocBook for Samba 2.2 was done by Gerald Carter. The conversion to
325 DocBook XML 4.2 for Samba 3.0 was done by Alexander Bokovoy.
326
327
328
329Samba 4.2 06/19/2018 SMBD(8)