| 1 |
'\" t |
| 2 |
.\" Title: smbd |
| 3 |
.\" Author: [see the "AUTHOR" section] |
| 4 |
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> |
| 5 |
.\" Date: 05/26/2026 |
| 6 |
.\" Manual: System Administration tools |
| 7 |
.\" Source: Samba 4.23.8-git.477.f78166bceedSUSE-oS16.9-x86_64 |
| 8 |
.\" Language: English |
| 9 |
.\" |
| 10 |
.TH "SMBD" "8" "05/26/2026" "Samba 4\&.23\&.8\-git\&.477\&.f78166bcee" "System Administration tools" |
| 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 |
smbd \- server to provide SMB/CIFS services to clients |
| 32 |
.SH "SYNOPSIS" |
| 33 |
.HP \w'\ 'u |
| 34 |
smbd [\-D|\-\-daemon] [\-i|\-\-interactive] [\-F|\-\-foreground] [\-\-no\-process\-group] [\-b|\-\-build\-options] [\-p\ <port\ number(s)>] [\-P\ <profiling\ level>] [\-d\ <debug\ level>] [\-\-debug\-stdout] [\-\-configfile=<configuration\ file>] [\-\-option=<name>=<value>] [\-l|\-\-log\-basename\ <log\ directory>] [\-\-leak\-report] [\-\-leak\-report\-full] [\-V|\-\-version] |
| 35 |
.SH "DESCRIPTION" |
| 36 |
.PP |
| 37 |
This program is part of the |
| 38 |
\fBsamba\fR(7) |
| 39 |
suite\&. |
| 40 |
.PP |
| 41 |
smbd |
| 42 |
is the server daemon that provides filesharing and printing services to Windows clients\&. The server provides filespace and printer services to clients using the SMB (or CIFS) protocol\&. This is compatible with the LanManager protocol, and can service LanManager clients\&. These include MSCLIENT 3\&.0 for DOS, Windows for Workgroups, Windows 95/98/ME, Windows NT, Windows 2000, OS/2, DAVE for Macintosh, and smbfs for Linux\&. |
| 43 |
.PP |
| 44 |
An extensive description of the services that the server can provide is given in the man page for the configuration file controlling the attributes of those services (see |
| 45 |
\fBsmb.conf\fR(5)\&. This man page will not describe the services, but will concentrate on the administrative aspects of running the server\&. |
| 46 |
.PP |
| 47 |
Please note that there are significant security implications to running this server, and the |
| 48 |
\fBsmb.conf\fR(5) |
| 49 |
manual page should be regarded as mandatory reading before proceeding with installation\&. |
| 50 |
.PP |
| 51 |
A session is created whenever a client requests one\&. Each client gets a copy of the server for each session\&. This copy then services all connections made by the client during that session\&. When all connections from its client are closed, the copy of the server for that client terminates\&. |
| 52 |
.PP |
| 53 |
The configuration file, and any files that it includes, are automatically reloaded every three minutes, if they change\&. One can force a reload by sending a SIGHUP to the server\&. Reloading the configuration file will not affect connections to any service that is already established\&. Either the user will have to disconnect from the service, or |
| 54 |
smbd |
| 55 |
killed and restarted\&. |
| 56 |
.PP |
| 57 |
Instead of sending a SIGHUP signal, a request to reload configuration file may be sent using |
| 58 |
\fBsmbcontrol\fR(1) |
| 59 |
program\&. |
| 60 |
.SH "OPTIONS" |
| 61 |
.PP |
| 62 |
\-D|\-\-daemon |
| 63 |
.RS 4 |
| 64 |
If specified, this parameter causes the server to operate as a daemon\&. That is, it detaches itself and runs in the background, fielding requests on the appropriate port\&. Operating the server as a daemon is the recommended way of running |
| 65 |
smbd |
| 66 |
for servers that provide more than casual use file and print services\&. This switch is assumed if |
| 67 |
smbd |
| 68 |
is executed on the command line of a shell\&. |
| 69 |
.RE |
| 70 |
.PP |
| 71 |
\-i|\-\-interactive |
| 72 |
.RS 4 |
| 73 |
If this parameter is specified it causes the server to run "interactively", not as a daemon, even if the server is executed on the command line of a shell\&. Setting this parameter negates the implicit daemon mode when run from the command line\&. |
| 74 |
smbd |
| 75 |
will only accept one connection and terminate\&. It will also log to standard output, as if the |
| 76 |
\-S |
| 77 |
parameter had been given\&. |
| 78 |
.RE |
| 79 |
.PP |
| 80 |
\-F|\-\-foreground |
| 81 |
.RS 4 |
| 82 |
If specified, this parameter causes the main |
| 83 |
smbd |
| 84 |
process to not daemonize, i\&.e\&. double\-fork and disassociate with the terminal\&. Child processes are still created as normal to service each connection request, but the main process does not exit\&. This operation mode is suitable for running |
| 85 |
smbd |
| 86 |
under process supervisors such as |
| 87 |
supervise |
| 88 |
and |
| 89 |
svscan |
| 90 |
from Daniel J\&. Bernstein\*(Aqs |
| 91 |
daemontools |
| 92 |
package, or the AIX process monitor\&. |
| 93 |
.RE |
| 94 |
.PP |
| 95 |
\-\-no\-process\-group |
| 96 |
.RS 4 |
| 97 |
Do not create a new process group for smbd\&. |
| 98 |
.RE |
| 99 |
.PP |
| 100 |
\-b|\-\-build\-options |
| 101 |
.RS 4 |
| 102 |
Prints information about how Samba was built\&. |
| 103 |
.RE |
| 104 |
.PP |
| 105 |
\-p|\-\-port<port number(s)> |
| 106 |
.RS 4 |
| 107 |
\fIport number(s)\fR |
| 108 |
is a space or comma\-separated list of TCP ports smbd should listen on\&. The default value is taken from the |
| 109 |
\m[blue]\fBports\fR\m[] |
| 110 |
parameter in |
| 111 |
/etc/samba/smb\&.conf |
| 112 |
.sp |
| 113 |
The default ports are 139 (used for SMB over NetBIOS over TCP) and port 445 (used for plain SMB over TCP)\&. |
| 114 |
.RE |
| 115 |
.PP |
| 116 |
\-P|\-\-profiling\-level<profiling level> |
| 117 |
.RS 4 |
| 118 |
\fIprofiling level\fR |
| 119 |
is a number specifying the level of profiling data to be collected\&. 0 turns off profiling, 1 turns on counter profiling only, 2 turns on complete profiling, and 3 resets all profiling data\&. |
| 120 |
.RE |
| 121 |
.PP |
| 122 |
\-d|\-\-debuglevel=level |
| 123 |
.RS 4 |
| 124 |
\fIlevel\fR |
| 125 |
is an integer from 0 to 10\&. The default value if this parameter is not specified is 0\&. |
| 126 |
.sp |
| 127 |
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\&. |
| 128 |
.sp |
| 129 |
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\&. |
| 130 |
.sp |
| 131 |
Note that specifying this parameter here will override the |
| 132 |
\m[blue]\fBlog level\fR\m[] |
| 133 |
parameter in the |
| 134 |
/etc/samba/smb\&.conf |
| 135 |
file\&. |
| 136 |
.RE |
| 137 |
.PP |
| 138 |
\-\-debug\-stdout |
| 139 |
.RS 4 |
| 140 |
This will redirect debug output to STDOUT\&. By default server daemons are logging to a log file\&. |
| 141 |
.RE |
| 142 |
.PP |
| 143 |
\-\-configfile=CONFIGFILE |
| 144 |
.RS 4 |
| 145 |
The file specified contains the configuration details required by the server\&. The information in this file includes server\-specific information such as what printcap file to use, as well as descriptions of all the services that the server is to provide\&. See |
| 146 |
/etc/samba/smb\&.conf |
| 147 |
for more information\&. The default configuration file name is determined at compile time\&. |
| 148 |
.RE |
| 149 |
.PP |
| 150 |
\-\-option=<name>=<value> |
| 151 |
.RS 4 |
| 152 |
Set the |
| 153 |
\fBsmb.conf\fR(5) |
| 154 |
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\&. |
| 155 |
.RE |
| 156 |
.PP |
| 157 |
\-l|\-\-log\-basename=logdirectory |
| 158 |
.RS 4 |
| 159 |
Base directory name for log/debug files\&. The extension |
| 160 |
\fB"\&.progname"\fR |
| 161 |
will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&. |
| 162 |
.RE |
| 163 |
.PP |
| 164 |
\-\-leak\-report |
| 165 |
.RS 4 |
| 166 |
Enable talloc leak reporting on exit\&. |
| 167 |
.RE |
| 168 |
.PP |
| 169 |
\-\-leak\-report\-full |
| 170 |
.RS 4 |
| 171 |
Enable full talloc leak reporting on exit\&. |
| 172 |
.RE |
| 173 |
.PP |
| 174 |
\-V|\-\-version |
| 175 |
.RS 4 |
| 176 |
Prints the program version number\&. |
| 177 |
.RE |
| 178 |
.PP |
| 179 |
\-?|\-\-help |
| 180 |
.RS 4 |
| 181 |
Print a summary of command line options\&. |
| 182 |
.RE |
| 183 |
.PP |
| 184 |
\-\-usage |
| 185 |
.RS 4 |
| 186 |
Display brief usage message\&. |
| 187 |
.RE |
| 188 |
.SH "FILES" |
| 189 |
.PP |
| 190 |
/etc/inetd\&.conf |
| 191 |
.RS 4 |
| 192 |
If the server is to be run by the |
| 193 |
inetd |
| 194 |
meta\-daemon, this file must contain suitable startup information for the meta\-daemon\&. |
| 195 |
.RE |
| 196 |
.PP |
| 197 |
/etc/rc |
| 198 |
.RS 4 |
| 199 |
or whatever initialization script your system uses)\&. |
| 200 |
.sp |
| 201 |
If running the server as a daemon at startup, this file will need to contain an appropriate startup sequence for the server\&. |
| 202 |
.RE |
| 203 |
.PP |
| 204 |
/etc/services |
| 205 |
.RS 4 |
| 206 |
If running the server via the meta\-daemon |
| 207 |
inetd, this file must contain a mapping of service name (e\&.g\&., netbios\-ssn) to service port (e\&.g\&., 139) and protocol type (e\&.g\&., tcp)\&. |
| 208 |
.RE |
| 209 |
.PP |
| 210 |
/usr/local/samba/lib/smb\&.conf |
| 211 |
.RS 4 |
| 212 |
This is the default location of the |
| 213 |
\fBsmb.conf\fR(5) |
| 214 |
server configuration file\&. Other common places that systems install this file are |
| 215 |
/usr/samba/lib/smb\&.conf |
| 216 |
and |
| 217 |
/etc/samba/smb\&.conf\&. |
| 218 |
.sp |
| 219 |
This file describes all the services the server is to make available to clients\&. See |
| 220 |
\fBsmb.conf\fR(5) |
| 221 |
for more information\&. |
| 222 |
.RE |
| 223 |
.SH "LIMITATIONS" |
| 224 |
.PP |
| 225 |
On some systems |
| 226 |
smbd |
| 227 |
cannot change uid back to root after a setuid() call\&. Such systems are called trapdoor uid systems\&. If you have such a system, you will be unable to connect from a client (such as a PC) as two different users at once\&. Attempts to connect the second user will result in access denied or similar\&. |
| 228 |
.SH "ENVIRONMENT VARIABLES" |
| 229 |
.PP |
| 230 |
\fBPRINTER\fR |
| 231 |
.RS 4 |
| 232 |
If no printer name is specified to printable services, most systems will use the value of this variable (or |
| 233 |
\fBlp\fR |
| 234 |
if this variable is not defined) as the name of the printer to use\&. This is not specific to the server, however\&. |
| 235 |
.RE |
| 236 |
.SH "PAM INTERACTION" |
| 237 |
.PP |
| 238 |
Samba uses PAM for authentication (when presented with a plaintext password), for account checking (is this account disabled?) and for session management\&. The degree too which samba supports PAM is restricted by the limitations of the SMB protocol and the |
| 239 |
\m[blue]\fBobey pam restrictions\fR\m[] |
| 240 |
\fBsmb.conf\fR(5) |
| 241 |
parameter\&. When this is set, the following restrictions apply: |
| 242 |
.RS |
| 243 |
.sp |
| 244 |
.RS 4 |
| 245 |
.ie n \{\ |
| 246 |
\h'-04'\(bu\h'+03'\c |
| 247 |
.\} |
| 248 |
.el \{\ |
| 249 |
.sp -1 |
| 250 |
.IP \(bu 2.3 |
| 251 |
.\} |
| 252 |
\fIAccount Validation\fR: All accesses to a samba server are checked against PAM to see if the account is valid, not disabled and is permitted to login at this time\&. This also applies to encrypted logins\&. |
| 253 |
.RE |
| 254 |
.sp |
| 255 |
.RS 4 |
| 256 |
.ie n \{\ |
| 257 |
\h'-04'\(bu\h'+03'\c |
| 258 |
.\} |
| 259 |
.el \{\ |
| 260 |
.sp -1 |
| 261 |
.IP \(bu 2.3 |
| 262 |
.\} |
| 263 |
\fISession Management\fR: When not using share level security, users must pass PAM\*(Aqs session checks before access is granted\&. Note however, that this is bypassed in share level security\&. Note also that some older pam configuration files may need a line added for session support\&. |
| 264 |
.RE |
| 265 |
.SH "VERSION" |
| 266 |
.PP |
| 267 |
This man page is part of version 4\&.23\&.8\-git\&.477\&.f78166bceedSUSE\-oS16\&.9\-x86_64 of the Samba suite\&. |
| 268 |
.SH "DIAGNOSTICS" |
| 269 |
.PP |
| 270 |
Most diagnostics issued by the server are logged in a specified log file\&. The log file name is specified at compile time, but may be overridden on the command line\&. |
| 271 |
.PP |
| 272 |
The number and nature of diagnostics available depends on the debug level used by the server\&. If you have problems, set the debug level to 3 and peruse the log files\&. |
| 273 |
.PP |
| 274 |
Most messages are reasonably self\-explanatory\&. Unfortunately, at the time this man page was created, there are too many diagnostics available in the source code to warrant describing each and every diagnostic\&. At this stage your best bet is still to grep the source code and inspect the conditions that gave rise to the diagnostics you are seeing\&. |
| 275 |
.SH "TDB FILES" |
| 276 |
.PP |
| 277 |
Samba stores it\*(Aqs data in several TDB (Trivial Database) files, usually located in |
| 278 |
/var/lib/samba\&. |
| 279 |
.PP |
| 280 |
(*) information persistent across restarts (but not necessarily important to backup)\&. |
| 281 |
.PP |
| 282 |
account_policy\&.tdb* |
| 283 |
.RS 4 |
| 284 |
NT account policy settings such as pw expiration, etc\&.\&.\&. |
| 285 |
.RE |
| 286 |
.PP |
| 287 |
brlock\&.tdb |
| 288 |
.RS 4 |
| 289 |
byte range locks |
| 290 |
.RE |
| 291 |
.PP |
| 292 |
browse\&.dat |
| 293 |
.RS 4 |
| 294 |
browse lists |
| 295 |
.RE |
| 296 |
.PP |
| 297 |
gencache\&.tdb |
| 298 |
.RS 4 |
| 299 |
generic caching db |
| 300 |
.RE |
| 301 |
.PP |
| 302 |
group_mapping\&.tdb* |
| 303 |
.RS 4 |
| 304 |
group mapping information |
| 305 |
.RE |
| 306 |
.PP |
| 307 |
locking\&.tdb |
| 308 |
.RS 4 |
| 309 |
share modes & oplocks |
| 310 |
.RE |
| 311 |
.PP |
| 312 |
login_cache\&.tdb* |
| 313 |
.RS 4 |
| 314 |
bad pw attempts |
| 315 |
.RE |
| 316 |
.PP |
| 317 |
messages\&.tdb |
| 318 |
.RS 4 |
| 319 |
Samba messaging system |
| 320 |
.RE |
| 321 |
.PP |
| 322 |
netsamlogon_cache\&.tdb* |
| 323 |
.RS 4 |
| 324 |
cache of user net_info_3 struct from net_samlogon() request (as a domain member) |
| 325 |
.RE |
| 326 |
.PP |
| 327 |
ntdrivers\&.tdb* |
| 328 |
.RS 4 |
| 329 |
installed printer drivers |
| 330 |
.RE |
| 331 |
.PP |
| 332 |
ntforms\&.tdb* |
| 333 |
.RS 4 |
| 334 |
installed printer forms |
| 335 |
.RE |
| 336 |
.PP |
| 337 |
ntprinters\&.tdb* |
| 338 |
.RS 4 |
| 339 |
installed printer information |
| 340 |
.RE |
| 341 |
.PP |
| 342 |
printing/ |
| 343 |
.RS 4 |
| 344 |
directory containing tdb per print queue of cached lpq output |
| 345 |
.RE |
| 346 |
.PP |
| 347 |
registry\&.tdb |
| 348 |
.RS 4 |
| 349 |
Windows registry skeleton (connect via regedit\&.exe) |
| 350 |
.RE |
| 351 |
.PP |
| 352 |
smbXsrv_session_global\&.tdb |
| 353 |
.RS 4 |
| 354 |
session information (e\&.g\&. support for \*(Aqutmp = yes\*(Aq) |
| 355 |
.RE |
| 356 |
.PP |
| 357 |
smbXsrv_tcon_global\&.tdb |
| 358 |
.RS 4 |
| 359 |
share connections (used to enforce max connections, etc\&.\&.\&.) |
| 360 |
.RE |
| 361 |
.PP |
| 362 |
smbXsrv_open_global\&.tdb |
| 363 |
.RS 4 |
| 364 |
open file handles (used durable handles, etc\&.\&.\&.) |
| 365 |
.RE |
| 366 |
.PP |
| 367 |
share_info\&.tdb* |
| 368 |
.RS 4 |
| 369 |
share acls |
| 370 |
.RE |
| 371 |
.PP |
| 372 |
winbindd_cache\&.tdb |
| 373 |
.RS 4 |
| 374 |
winbindd\*(Aqs cache of user lists, etc\&.\&.\&. |
| 375 |
.RE |
| 376 |
.PP |
| 377 |
winbindd_idmap\&.tdb* |
| 378 |
.RS 4 |
| 379 |
winbindd\*(Aqs local idmap db |
| 380 |
.RE |
| 381 |
.PP |
| 382 |
wins\&.dat* |
| 383 |
.RS 4 |
| 384 |
wins database when \*(Aqwins support = yes\*(Aq |
| 385 |
.RE |
| 386 |
.SH "SIGNALS" |
| 387 |
.PP |
| 388 |
Sending the |
| 389 |
smbd |
| 390 |
a SIGHUP will cause it to reload its |
| 391 |
smb\&.conf |
| 392 |
configuration file within a short period of time\&. |
| 393 |
.PP |
| 394 |
To shut down a user\*(Aqs |
| 395 |
smbd |
| 396 |
process it is recommended that |
| 397 |
SIGKILL (\-9) |
| 398 |
\fINOT\fR |
| 399 |
be used, except as a last resort, as this may leave the shared memory area in an inconsistent state\&. The safe way to terminate an |
| 400 |
smbd |
| 401 |
is to send it a SIGTERM (\-15) signal and wait for it to die on its own\&. |
| 402 |
.PP |
| 403 |
The debug log level of |
| 404 |
smbd |
| 405 |
may be raised or lowered using |
| 406 |
\fBsmbcontrol\fR(1) |
| 407 |
program (SIGUSR[1|2] signals are no longer used since Samba 2\&.2)\&. This is to allow transient problems to be diagnosed, whilst still running at a normally low log level\&. |
| 408 |
.PP |
| 409 |
Note that as the signal handlers send a debug write, they are not re\-entrant in |
| 410 |
smbd\&. This you should wait until |
| 411 |
smbd |
| 412 |
is in a state of waiting for an incoming SMB before issuing them\&. It is possible to make the signal handlers safe by un\-blocking the signals before the select call and re\-blocking them after, however this would affect performance\&. |
| 413 |
.SH "SEE ALSO" |
| 414 |
.PP |
| 415 |
\fBhosts_access\fR(5), |
| 416 |
\fBinetd\fR(8), |
| 417 |
\fBnmbd\fR(8), |
| 418 |
\fBsmb.conf\fR(5), |
| 419 |
\fBsmbclient\fR(1), |
| 420 |
\fBtestparm\fR(1), and the Internet RFC\*(Aqs |
| 421 |
rfc1001\&.txt, |
| 422 |
rfc1002\&.txt\&. In addition the CIFS (formerly SMB) specification is available as a link from the Web page |
| 423 |
https://www\&.samba\&.org/cifs/\&. |
| 424 |
.SH "AUTHOR" |
| 425 |
.PP |
| 426 |
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\&. |