[862] | 1 | '\" t
|
---|
| 2 | .\" Title: smbd
|
---|
| 3 | .\" Author: [see the "AUTHOR" section]
|
---|
| 4 | .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
|
---|
| 5 | .\" Date: 09/18/2013
|
---|
| 6 | .\" Manual: System Administration tools
|
---|
| 7 | .\" Source: Samba 3.6
|
---|
| 8 | .\" Language: English
|
---|
| 9 | .\"
|
---|
| 10 | .TH "SMBD" "8" "09/18/2013" "Samba 3\&.6" "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] [\-F] [\-S] [\-i] [\-h] [\-V] [\-b] [\-d\ <debug\ level>] [\-l\ <log\ directory>] [\-p\ <port\ number(s)>] [\-P\ <profiling\ level>] [\-O\ <socket\ option>] [\-s\ <configuration\ file>]
|
---|
| 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 minute, if they change\&. You 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 | .SH "OPTIONS"
|
---|
| 57 | .PP
|
---|
| 58 | \-D
|
---|
| 59 | .RS 4
|
---|
| 60 | 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
|
---|
| 61 | smbd
|
---|
| 62 | for servers that provide more than casual use file and print services\&. This switch is assumed if
|
---|
| 63 | smbd
|
---|
| 64 | is executed on the command line of a shell\&.
|
---|
| 65 | .RE
|
---|
| 66 | .PP
|
---|
| 67 | \-F
|
---|
| 68 | .RS 4
|
---|
| 69 | If specified, this parameter causes the main
|
---|
| 70 | smbd
|
---|
| 71 | 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
|
---|
| 72 | smbd
|
---|
| 73 | under process supervisors such as
|
---|
| 74 | supervise
|
---|
| 75 | and
|
---|
| 76 | svscan
|
---|
| 77 | from Daniel J\&. Bernstein\*(Aqs
|
---|
| 78 | daemontools
|
---|
| 79 | package, or the AIX process monitor\&.
|
---|
| 80 | .RE
|
---|
| 81 | .PP
|
---|
| 82 | \-S
|
---|
| 83 | .RS 4
|
---|
| 84 | If specified, this parameter causes
|
---|
| 85 | smbd
|
---|
| 86 | to log to standard output rather than a file\&.
|
---|
| 87 | .RE
|
---|
| 88 | .PP
|
---|
| 89 | \-i
|
---|
| 90 | .RS 4
|
---|
| 91 | 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\&.
|
---|
| 92 | smbd
|
---|
| 93 | also logs to standard output, as if the
|
---|
| 94 | \-S
|
---|
| 95 | parameter had been given\&.
|
---|
| 96 | .RE
|
---|
| 97 | .PP
|
---|
| 98 | \-d|\-\-debuglevel=level
|
---|
| 99 | .RS 4
|
---|
| 100 | \fIlevel\fR
|
---|
| 101 | is an integer from 0 to 10\&. The default value if this parameter is not specified is 0\&.
|
---|
| 102 | .sp
|
---|
| 103 | 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\&.
|
---|
| 104 | .sp
|
---|
| 105 | 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\&.
|
---|
| 106 | .sp
|
---|
| 107 | Note that specifying this parameter here will override the
|
---|
| 108 | \m[blue]\fBlog level\fR\m[]
|
---|
| 109 | parameter in the
|
---|
| 110 | smb\&.conf
|
---|
| 111 | file\&.
|
---|
| 112 | .RE
|
---|
| 113 | .PP
|
---|
| 114 | \-V|\-\-version
|
---|
| 115 | .RS 4
|
---|
| 116 | Prints the program version number\&.
|
---|
| 117 | .RE
|
---|
| 118 | .PP
|
---|
| 119 | \-s|\-\-configfile <configuration file>
|
---|
| 120 | .RS 4
|
---|
| 121 | 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
|
---|
| 122 | smb\&.conf
|
---|
| 123 | for more information\&. The default configuration file name is determined at compile time\&.
|
---|
| 124 | .RE
|
---|
| 125 | .PP
|
---|
| 126 | \-l|\-\-log\-basename=logdirectory
|
---|
| 127 | .RS 4
|
---|
| 128 | Base directory name for log/debug files\&. The extension
|
---|
| 129 | \fB"\&.progname"\fR
|
---|
| 130 | will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&.
|
---|
| 131 | .RE
|
---|
| 132 | .PP
|
---|
| 133 | \-h|\-\-help
|
---|
| 134 | .RS 4
|
---|
| 135 | Print a summary of command line options\&.
|
---|
| 136 | .RE
|
---|
| 137 | .PP
|
---|
| 138 | \-b
|
---|
| 139 | .RS 4
|
---|
| 140 | Prints information about how Samba was built\&.
|
---|
| 141 | .RE
|
---|
| 142 | .PP
|
---|
| 143 | \-p|\-\-port<port number(s)>
|
---|
| 144 | .RS 4
|
---|
| 145 | \fIport number(s)\fR
|
---|
| 146 | is a space or comma\-separated list of TCP ports smbd should listen on\&. The default value is taken from the
|
---|
| 147 | \m[blue]\fBports\fR\m[]
|
---|
| 148 | parameter in
|
---|
| 149 | smb\&.conf
|
---|
| 150 | .sp
|
---|
| 151 | The default ports are 139 (used for SMB over NetBIOS over TCP) and port 445 (used for plain SMB over TCP)\&.
|
---|
| 152 | .RE
|
---|
| 153 | .PP
|
---|
| 154 | \-P|\-\-profiling\-level<profiling level>
|
---|
| 155 | .RS 4
|
---|
| 156 | \fIprofiling level\fR
|
---|
| 157 | 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\&.
|
---|
| 158 | .RE
|
---|
| 159 | .SH "FILES"
|
---|
| 160 | .PP
|
---|
| 161 | /etc/inetd\&.conf
|
---|
| 162 | .RS 4
|
---|
| 163 | If the server is to be run by the
|
---|
| 164 | inetd
|
---|
| 165 | meta\-daemon, this file must contain suitable startup information for the meta\-daemon\&.
|
---|
| 166 | .RE
|
---|
| 167 | .PP
|
---|
| 168 | /etc/rc
|
---|
| 169 | .RS 4
|
---|
| 170 | or whatever initialization script your system uses)\&.
|
---|
| 171 | .sp
|
---|
| 172 | If running the server as a daemon at startup, this file will need to contain an appropriate startup sequence for the server\&.
|
---|
| 173 | .RE
|
---|
| 174 | .PP
|
---|
| 175 | /etc/services
|
---|
| 176 | .RS 4
|
---|
| 177 | If running the server via the meta\-daemon
|
---|
| 178 | 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)\&.
|
---|
| 179 | .RE
|
---|
| 180 | .PP
|
---|
| 181 | /usr/local/samba/lib/smb\&.conf
|
---|
| 182 | .RS 4
|
---|
| 183 | This is the default location of the
|
---|
| 184 | \fBsmb.conf\fR(5)
|
---|
| 185 | server configuration file\&. Other common places that systems install this file are
|
---|
| 186 | /usr/samba/lib/smb\&.conf
|
---|
| 187 | and
|
---|
| 188 | /etc/samba/smb\&.conf\&.
|
---|
| 189 | .sp
|
---|
| 190 | This file describes all the services the server is to make available to clients\&. See
|
---|
| 191 | \fBsmb.conf\fR(5)
|
---|
| 192 | for more information\&.
|
---|
| 193 | .RE
|
---|
| 194 | .SH "LIMITATIONS"
|
---|
| 195 | .PP
|
---|
| 196 | On some systems
|
---|
| 197 | smbd
|
---|
| 198 | 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\&.
|
---|
| 199 | .SH "ENVIRONMENT VARIABLES"
|
---|
| 200 | .PP
|
---|
| 201 | \fBPRINTER\fR
|
---|
| 202 | .RS 4
|
---|
| 203 | If no printer name is specified to printable services, most systems will use the value of this variable (or
|
---|
| 204 | \fBlp\fR
|
---|
| 205 | if this variable is not defined) as the name of the printer to use\&. This is not specific to the server, however\&.
|
---|
| 206 | .RE
|
---|
| 207 | .SH "PAM INTERACTION"
|
---|
| 208 | .PP
|
---|
| 209 | 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
|
---|
| 210 | \m[blue]\fBobey pam restrictions\fR\m[]
|
---|
| 211 | \fBsmb.conf\fR(5)
|
---|
| 212 | parameter\&. When this is set, the following restrictions apply:
|
---|
| 213 | .sp
|
---|
| 214 | .RS 4
|
---|
| 215 | .ie n \{\
|
---|
| 216 | \h'-04'\(bu\h'+03'\c
|
---|
| 217 | .\}
|
---|
| 218 | .el \{\
|
---|
| 219 | .sp -1
|
---|
| 220 | .IP \(bu 2.3
|
---|
| 221 | .\}
|
---|
| 222 | \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\&.
|
---|
| 223 | .RE
|
---|
| 224 | .sp
|
---|
| 225 | .RS 4
|
---|
| 226 | .ie n \{\
|
---|
| 227 | \h'-04'\(bu\h'+03'\c
|
---|
| 228 | .\}
|
---|
| 229 | .el \{\
|
---|
| 230 | .sp -1
|
---|
| 231 | .IP \(bu 2.3
|
---|
| 232 | .\}
|
---|
| 233 | \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\&.
|
---|
| 234 | .RE
|
---|
| 235 | .SH "VERSION"
|
---|
| 236 | .PP
|
---|
| 237 | This man page is correct for version 3 of the Samba suite\&.
|
---|
| 238 | .SH "DIAGNOSTICS"
|
---|
| 239 | .PP
|
---|
| 240 | 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\&.
|
---|
| 241 | .PP
|
---|
| 242 | 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\&.
|
---|
| 243 | .PP
|
---|
| 244 | 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\&.
|
---|
| 245 | .SH "TDB FILES"
|
---|
| 246 | .PP
|
---|
| 247 | Samba stores it\*(Aqs data in several TDB (Trivial Database) files, usually located in
|
---|
| 248 | /var/lib/samba\&.
|
---|
| 249 | .PP
|
---|
| 250 | (*) information persistent across restarts (but not necessarily important to backup)\&.
|
---|
| 251 | .PP
|
---|
| 252 | account_policy\&.tdb*
|
---|
| 253 | .RS 4
|
---|
| 254 | NT account policy settings such as pw expiration, etc\&.\&.\&.
|
---|
| 255 | .RE
|
---|
| 256 | .PP
|
---|
| 257 | brlock\&.tdb
|
---|
| 258 | .RS 4
|
---|
| 259 | byte range locks
|
---|
| 260 | .RE
|
---|
| 261 | .PP
|
---|
| 262 | browse\&.dat
|
---|
| 263 | .RS 4
|
---|
| 264 | browse lists
|
---|
| 265 | .RE
|
---|
| 266 | .PP
|
---|
| 267 | connections\&.tdb
|
---|
| 268 | .RS 4
|
---|
| 269 | share connections (used to enforce max connections, etc\&.\&.\&.)
|
---|
| 270 | .RE
|
---|
| 271 | .PP
|
---|
| 272 | gencache\&.tdb
|
---|
| 273 | .RS 4
|
---|
| 274 | generic caching db
|
---|
| 275 | .RE
|
---|
| 276 | .PP
|
---|
| 277 | group_mapping\&.tdb*
|
---|
| 278 | .RS 4
|
---|
| 279 | group mapping information
|
---|
| 280 | .RE
|
---|
| 281 | .PP
|
---|
| 282 | locking\&.tdb
|
---|
| 283 | .RS 4
|
---|
| 284 | share modes & oplocks
|
---|
| 285 | .RE
|
---|
| 286 | .PP
|
---|
| 287 | login_cache\&.tdb*
|
---|
| 288 | .RS 4
|
---|
| 289 | bad pw attempts
|
---|
| 290 | .RE
|
---|
| 291 | .PP
|
---|
| 292 | messages\&.tdb
|
---|
| 293 | .RS 4
|
---|
| 294 | Samba messaging system
|
---|
| 295 | .RE
|
---|
| 296 | .PP
|
---|
| 297 | netsamlogon_cache\&.tdb*
|
---|
| 298 | .RS 4
|
---|
| 299 | cache of user net_info_3 struct from net_samlogon() request (as a domain member)
|
---|
| 300 | .RE
|
---|
| 301 | .PP
|
---|
| 302 | ntdrivers\&.tdb*
|
---|
| 303 | .RS 4
|
---|
| 304 | installed printer drivers
|
---|
| 305 | .RE
|
---|
| 306 | .PP
|
---|
| 307 | ntforms\&.tdb*
|
---|
| 308 | .RS 4
|
---|
| 309 | installed printer forms
|
---|
| 310 | .RE
|
---|
| 311 | .PP
|
---|
| 312 | ntprinters\&.tdb*
|
---|
| 313 | .RS 4
|
---|
| 314 | installed printer information
|
---|
| 315 | .RE
|
---|
| 316 | .PP
|
---|
| 317 | printing/
|
---|
| 318 | .RS 4
|
---|
| 319 | directory containing tdb per print queue of cached lpq output
|
---|
| 320 | .RE
|
---|
| 321 | .PP
|
---|
| 322 | registry\&.tdb
|
---|
| 323 | .RS 4
|
---|
| 324 | Windows registry skeleton (connect via regedit\&.exe)
|
---|
| 325 | .RE
|
---|
| 326 | .PP
|
---|
| 327 | sessionid\&.tdb
|
---|
| 328 | .RS 4
|
---|
| 329 | session information (e\&.g\&. support for \*(Aqutmp = yes\*(Aq)
|
---|
| 330 | .RE
|
---|
| 331 | .PP
|
---|
| 332 | share_info\&.tdb*
|
---|
| 333 | .RS 4
|
---|
| 334 | share acls
|
---|
| 335 | .RE
|
---|
| 336 | .PP
|
---|
| 337 | winbindd_cache\&.tdb
|
---|
| 338 | .RS 4
|
---|
| 339 | winbindd\*(Aqs cache of user lists, etc\&.\&.\&.
|
---|
| 340 | .RE
|
---|
| 341 | .PP
|
---|
| 342 | winbindd_idmap\&.tdb*
|
---|
| 343 | .RS 4
|
---|
| 344 | winbindd\*(Aqs local idmap db
|
---|
| 345 | .RE
|
---|
| 346 | .PP
|
---|
| 347 | wins\&.dat*
|
---|
| 348 | .RS 4
|
---|
| 349 | wins database when \*(Aqwins support = yes\*(Aq
|
---|
| 350 | .RE
|
---|
| 351 | .SH "SIGNALS"
|
---|
| 352 | .PP
|
---|
| 353 | Sending the
|
---|
| 354 | smbd
|
---|
| 355 | a SIGHUP will cause it to reload its
|
---|
| 356 | smb\&.conf
|
---|
| 357 | configuration file within a short period of time\&.
|
---|
| 358 | .PP
|
---|
| 359 | To shut down a user\*(Aqs
|
---|
| 360 | smbd
|
---|
| 361 | process it is recommended that
|
---|
| 362 | SIGKILL (\-9)
|
---|
| 363 | \fINOT\fR
|
---|
| 364 | 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
|
---|
| 365 | smbd
|
---|
| 366 | is to send it a SIGTERM (\-15) signal and wait for it to die on its own\&.
|
---|
| 367 | .PP
|
---|
| 368 | The debug log level of
|
---|
| 369 | smbd
|
---|
| 370 | may be raised or lowered using
|
---|
| 371 | \fBsmbcontrol\fR(1)
|
---|
| 372 | 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\&.
|
---|
| 373 | .PP
|
---|
| 374 | Note that as the signal handlers send a debug write, they are not re\-entrant in
|
---|
| 375 | smbd\&. This you should wait until
|
---|
| 376 | smbd
|
---|
| 377 | 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\&.
|
---|
| 378 | .SH "SEE ALSO"
|
---|
| 379 | .PP
|
---|
| 380 | \fBhosts_access\fR(5),
|
---|
| 381 | \fBinetd\fR(8),
|
---|
| 382 | \fBnmbd\fR(8),
|
---|
| 383 | \fBsmb.conf\fR(5),
|
---|
| 384 | \fBsmbclient\fR(1),
|
---|
| 385 | \fBtestparm\fR(1),
|
---|
| 386 | \fBtestprns\fR(1), and the Internet RFC\*(Aqs
|
---|
| 387 | rfc1001\&.txt,
|
---|
| 388 | rfc1002\&.txt\&. In addition the CIFS (formerly SMB) specification is available as a link from the Web page
|
---|
| 389 | http://samba\&.org/cifs/\&.
|
---|
| 390 | .SH "AUTHOR"
|
---|
| 391 | .PP
|
---|
| 392 | 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\&.
|
---|
| 393 | .PP
|
---|
| 394 | The original Samba man pages were written by Karl Auer\&. The man page sources were converted to YODL format (another excellent piece of Open Source software, available at
|
---|
| 395 | ftp://ftp\&.icce\&.rug\&.nl/pub/unix/) and updated for the Samba 2\&.0 release by Jeremy Allison\&. The conversion to DocBook for Samba 2\&.2 was done by Gerald Carter\&. The conversion to DocBook XML 4\&.2 for Samba 3\&.0 was done by Alexander Bokovoy\&.
|
---|