1SMBD(8)                   System Administration tools                  SMBD(8)
2
3
4

NAME

6       smbd - server to provide SMB/CIFS services to clients
7

SYNOPSIS

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

DESCRIPTION

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 three minutes, if they change. One can
43       force a reload by sending a SIGHUP to the server. Reloading the
44       configuration file will not affect connections to any service that is
45       already established. Either the user will have to disconnect from the
46       service, or smbd killed and restarted.
47
48       Instead of sending a SIGHUP signal, a request to reload configuration
49       file may be sent using smbcontrol(1) program.
50

OPTIONS

52       -D|--daemon
53           If specified, this parameter causes the server to operate as a
54           daemon. That is, it detaches itself and runs in the background,
55           fielding requests on the appropriate port. Operating the server as
56           a daemon is the recommended way of running smbd for servers that
57           provide more than casual use file and print services. This switch
58           is assumed if smbd is executed on the command line of a shell.
59
60       -F|--foreground
61           If specified, this parameter causes the main smbd process to not
62           daemonize, i.e. double-fork and disassociate with the terminal.
63           Child processes are still created as normal to service each
64           connection request, but the main process does not exit. This
65           operation mode is suitable for running smbd under process
66           supervisors such as supervise and svscan from Daniel J. Bernstein's
67           daemontools package, or the AIX process monitor.
68
69       -S|--log-stdout
70           If specified, this parameter causes smbd to log to standard output
71           rather than a file.
72
73       -i|--interactive
74           If this parameter is specified it causes the server to run
75           "interactively", not as a daemon, even if the server is executed on
76           the command line of a shell. Setting this parameter negates the
77           implicit daemon mode when run from the command line.  smbd will
78           only accept one connection and terminate. It will also log to
79           standard output, as if the -S parameter had been given.
80
81       -d|--debuglevel=level
82           level is an integer from 0 to 10. The default value if this
83           parameter is not specified is 0.
84
85           The higher this value, the more detail will be logged to the log
86           files about the activities of the server. At level 0, only critical
87           errors and serious warnings will be logged. Level 1 is a reasonable
88           level for day-to-day running - it generates a small amount of
89           information about operations carried out.
90
91           Levels above 1 will generate considerable amounts of log data, and
92           should only be used when investigating a problem. Levels above 3
93           are designed for use only by developers and generate HUGE amounts
94           of log data, most of which is extremely cryptic.
95
96           Note that specifying this parameter here will override the log
97           level parameter in the smb.conf file.
98
99       -V|--version
100           Prints the program version number.
101
102       -s|--configfile=<configuration file>
103           The file specified contains the configuration details required by
104           the server. The information in this file includes server-specific
105           information such as what printcap file to use, as well as
106           descriptions of all the services that the server is to provide. See
107           smb.conf for more information. The default configuration file name
108           is determined at compile time.
109
110       -l|--log-basename=logdirectory
111           Base directory name for log/debug files. The extension ".progname"
112           will be appended (e.g. log.smbclient, log.smbd, etc...). The log
113           file is never removed by the client.
114
115       --option=<name>=<value>
116           Set the smb.conf(5) option "<name>" to value "<value>" from the
117           command line. This overrides compiled-in defaults and options read
118           from the configuration file.
119
120       -?|--help
121           Print a summary of command line options.
122
123       --usage
124           Display brief usage message.
125
126       --no-process-group
127           Do not create a new process group for smbd.
128
129       -b|--build-options
130           Prints information about how Samba was built.
131
132       -p|--port<port number(s)>
133           port number(s) is a space or comma-separated list of TCP ports smbd
134           should listen on. The default value is taken from the ports
135           parameter in smb.conf
136
137           The default ports are 139 (used for SMB over NetBIOS over TCP) and
138           port 445 (used for plain SMB over TCP).
139
140       -P|--profiling-level<profiling level>
141           profiling level is a number specifying the level of profiling data
142           to be collected. 0 turns off profiling, 1 turns on counter
143           profiling only, 2 turns on complete profiling, and 3 resets all
144           profiling data.
145

FILES

147       /etc/inetd.conf
148           If the server is to be run by the inetd meta-daemon, this file must
149           contain suitable startup information for the meta-daemon.
150
151       /etc/rc
152           or whatever initialization script your system uses).
153
154           If running the server as a daemon at startup, this file will need
155           to contain an appropriate startup sequence for the server.
156
157       /etc/services
158           If running the server via the meta-daemon inetd, this file must
159           contain a mapping of service name (e.g., netbios-ssn) to service
160           port (e.g., 139) and protocol type (e.g., tcp).
161
162       /usr/local/samba/lib/smb.conf
163           This is the default location of the smb.conf(5) server
164           configuration file. Other common places that systems install this
165           file are /usr/samba/lib/smb.conf and /etc/samba/smb.conf.
166
167           This file describes all the services the server is to make
168           available to clients. See smb.conf(5) for more information.
169

LIMITATIONS

171       On some systems smbd cannot change uid back to root after a setuid()
172       call. Such systems are called trapdoor uid systems. If you have such a
173       system, you will be unable to connect from a client (such as a PC) as
174       two different users at once. Attempts to connect the second user will
175       result in access denied or similar.
176

ENVIRONMENT VARIABLES

178       PRINTER
179           If no printer name is specified to printable services, most systems
180           will use the value of this variable (or lp if this variable is not
181           defined) as the name of the printer to use. This is not specific to
182           the server, however.
183

PAM INTERACTION

185       Samba uses PAM for authentication (when presented with a plaintext
186       password), for account checking (is this account disabled?) and for
187       session management. The degree too which samba supports PAM is
188       restricted by the limitations of the SMB protocol and the obey pam
189       restrictions smb.conf(5) parameter. When this is set, the following
190       restrictions apply:
191
192Account Validation: All accesses to a samba server are
193                  checked against PAM to see if the account is valid, not
194                  disabled and is permitted to login at this time. This also
195                  applies to encrypted logins.
196
197Session Management: When not using share level security,
198                  users must pass PAM's session checks before access is
199                  granted. Note however, that this is bypassed in share level
200                  security. Note also that some older pam configuration files
201                  may need a line added for session support.
202

VERSION

204       This man page is part of version 4.14.5 of the Samba suite.
205

DIAGNOSTICS

207       Most diagnostics issued by the server are logged in a specified log
208       file. The log file name is specified at compile time, but may be
209       overridden on the command line.
210
211       The number and nature of diagnostics available depends on the debug
212       level used by the server. If you have problems, set the debug level to
213       3 and peruse the log files.
214
215       Most messages are reasonably self-explanatory. Unfortunately, at the
216       time this man page was created, there are too many diagnostics
217       available in the source code to warrant describing each and every
218       diagnostic. At this stage your best bet is still to grep the source
219       code and inspect the conditions that gave rise to the diagnostics you
220       are seeing.
221

TDB FILES

223       Samba stores it's data in several TDB (Trivial Database) files, usually
224       located in /var/lib/samba.
225
226       (*) information persistent across restarts (but not necessarily
227       important to backup).
228
229       account_policy.tdb*
230           NT account policy settings such as pw expiration, etc...
231
232       brlock.tdb
233           byte range locks
234
235       browse.dat
236           browse lists
237
238       gencache.tdb
239           generic caching db
240
241       group_mapping.tdb*
242           group mapping information
243
244       locking.tdb
245           share modes & oplocks
246
247       login_cache.tdb*
248           bad pw attempts
249
250       messages.tdb
251           Samba messaging system
252
253       netsamlogon_cache.tdb*
254           cache of user net_info_3 struct from net_samlogon() request (as a
255           domain member)
256
257       ntdrivers.tdb*
258           installed printer drivers
259
260       ntforms.tdb*
261           installed printer forms
262
263       ntprinters.tdb*
264           installed printer information
265
266       printing/
267           directory containing tdb per print queue of cached lpq output
268
269       registry.tdb
270           Windows registry skeleton (connect via regedit.exe)
271
272       smbXsrv_session_global.tdb
273           session information (e.g. support for 'utmp = yes')
274
275       smbXsrv_tcon_global.tdb
276           share connections (used to enforce max connections, etc...)
277
278       smbXsrv_open_global.tdb
279           open file handles (used durable handles, etc...)
280
281       share_info.tdb*
282           share acls
283
284       winbindd_cache.tdb
285           winbindd's cache of user lists, etc...
286
287       winbindd_idmap.tdb*
288           winbindd's local idmap db
289
290       wins.dat*
291           wins database when 'wins support = yes'
292

SIGNALS

294       Sending the smbd a SIGHUP will cause it to reload its smb.conf
295       configuration file within a short period of time.
296
297       To shut down a user's smbd process it is recommended that SIGKILL (-9)
298       NOT be used, except as a last resort, as this may leave the shared
299       memory area in an inconsistent state. The safe way to terminate an smbd
300       is to send it a SIGTERM (-15) signal and wait for it to die on its own.
301
302       The debug log level of smbd may be raised or lowered using
303       smbcontrol(1) program (SIGUSR[1|2] signals are no longer used since
304       Samba 2.2). This is to allow transient problems to be diagnosed, whilst
305       still running at a normally low log level.
306
307       Note that as the signal handlers send a debug write, they are not
308       re-entrant in smbd. This you should wait until smbd is in a state of
309       waiting for an incoming SMB before issuing them. It is possible to make
310       the signal handlers safe by un-blocking the signals before the select
311       call and re-blocking them after, however this would affect performance.
312

SEE ALSO

314       hosts_access(5), inetd(8), nmbd(8), smb.conf(5), smbclient(1),
315       testparm(1), and the Internet RFC's rfc1001.txt, rfc1002.txt. In
316       addition the CIFS (formerly SMB) specification is available as a link
317       from the Web page https://www.samba.org/cifs/.
318

AUTHOR

320       The original Samba software and related utilities were created by
321       Andrew Tridgell. Samba is now developed by the Samba Team as an Open
322       Source project similar to the way the Linux kernel is developed.
323
324
325
326Samba 4.14.5                      06/01/2021                           SMBD(8)
Impressum