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。
如果这个值越高,越多关于服务器的详细活动信息将被记录到文件中。在0调试级时,只记录紧急错误和严重警告。对于平日的运行服务,1调试级是个合理的等级,它只产生小量的关于执行操作的信息。1以上的调试级将产生相当多的记录数据,并且只在解决问题时才有用。3以上的调试级只被设计为让开发者使用并会产生极大数量的记录数据,而且其中很多部分非常难以理解。注意在此使用这个参数将越过在 smb.conf (5)文件中的log level参数。
- -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.
The default log directory is specified at compile time.
- -p <port number>
- port number
端口号是个正值整数。如果此选项未指定则缺省值为139。
这个端口号用于从客户端建立对服务器的连接。基于TCP上的SMB所用的标准(通常使用的)端口号为139,因此这是缺省值。如果你希望作为普通用户而不是root身份运行服务器的话,多数系统会要求你使用1024以上的端口号 - 如有此情况请向系统管理员取得帮助。为了使更多客户使用服务器,而又在139以外的端口进行配置,则你需要在端口139上进行端口重定向,在rfc1002.txt的4.3.5部分有详细的描述。除上述情况以外,此选项通常不用。
文件 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。
此文件描述了客户可获得的服务项的情况。参见 smb.conf(5)获得更多情况。
限制 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.