other languages
SMBD(8) | SMBD(8) |
NAME¶
smbd - 向客户提供SMB/CIFS服务的服务器总览 SYNOPSIS¶
smbd [-D] [-F] [-S] [-i] [-h] [-V] [-b] [-d <debug level>] [-l <log directory>][-p <port number>] [-O <socket option>] [-s <configuration file>]描述 DESCRIPTION¶
此程序是 Samba(7) 套件的一部分。选项 OPTIONS¶
- -D
- 如果指定此选项,则服务器以后台进程方式运行。即,它会分离本身并在后台运行,在适当的端口上监听请求。对于提供比临时性的文件和打印服务更多内容的服务器,推荐将smbd
以后台进程方式运行。如果在shell命令行运行
smbd
,将默认使用这个选项。
- -F
- If specified, this parameter causes the main smbd
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 smbd under process supervisors such as
supervise and svscan from Daniel J. Bernstein's
daemontools package, or the AIX process monitor.
- -S
- If specified, this parameter causes smbd to log to
standard output rather than a file.
- -i
- 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 deamon mode when run from the command line. smbd also logs
to standard output, as if the -S parameter had been given.
- -V
- 打印smbd的版本号。
- -s <configuration file>
- 指定的文件包含了服务器所需的配置细节。此文件中的信息包含如所用的printcap文件这样的服务器详细信息,同时也对服务器所提供的服务进行了描述。请参见smb.conf
(5)文件。缺省的配置文件名在软件包编译时决定。
- -d|--debug=debuglevel
- debuglevel
是一个从0到10的整数。如果没有指定此参数则默认的值是0。
- -l|--logfile=logbasename
- 用来记录/调试的文件。会自动为它添加
".client"
扩展名。客户端不会将记录文件删除。
- -h|--help
- 打印smbd的命令行参数(用法)。
- -b
- Prints information about how Samba was built.
- -l <log directory>
- If specified, log directory specifies a log
directory into which the "log.smbd" log file will be created for
informational and debug messages from the running server. The log file
generated is never removed by the server although its size may be
controlled by the max log size option in the smb.conf(5)
file. Beware: If the directory specified does not exist,
smbd will log to the default debug log location defined at compile
time.
- -p <port number>
- port number
端口号是个正值整数。如果此选项未指定则缺省值为139。
文件 FILES¶
- /etc/inetd.conf
- 如果通过inetd
超级进程来运行服务器,则此文件必须含有适当的启动信息。
- /etc/rc
- (或其它你的系统所用的初始化脚本)。
- /etc/services
- 如果通过inetd超级进程来运行服务器,则此文件必须包含一份服务端口(如139)和协议类型(如tcp)与对应的服务名(如netbios-ssn)的映射。
- /usr/local/samba/lib/smb.conf
- 缺省的服务器配置文件
smb.conf(5)的存放位置。系统安装此文件的其它通常位置为
/usr/samba/lib/smb.conf和/etc/samba/smb.conf。
限制 LIMITATIONS¶
在有些系统上, smbd无法在一次setuid()调用以后把uid返回到root。这样的系统称为“陷门”(trapdoor)uid系统。如果你使用这样的系统,将无法同时在一个客户端(如一台PC机)以两个不同的用户身份进行连接。试图连接第二个用户将得到“访问被拒”或类似的结果。环境变量 ENVIRONMENT VARIABLES¶
- PRINTER
- 如果对可打印服务没有指定打印名称,多数系统将使用此变量(如果未定义此变量则用lp
)的值作为可用打印机的名称。但并不是服务器特定的。
PAM INTERACTION¶
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 obey pam restrictions smb.conf(5) paramater. When this is set, the following restrictions apply:- •
- Account Validation: All accesses to a samba server
are checked against PAM to see if the account is vaild, not disabled and
is permitted to login at this time. This also applies to encrypted logins.
- •
- Session Management: When not using share level
secuirty, users must pass PAM's session checks before access is granted.
Note however, that this is bypassed in share level secuirty. Note also
that some older pam configuration files may need a line added for session
support.