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