.\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Ip \" List item .br .ie \\n(.$>=3 .ne \\$3 .el .ne 3 .IP "\\$1" \\$2 .. .TH "SMBD" 8 "" "" "" .SH NAME smbd \- 向客户提供SMB/CIFS服务的服务器 .SH "总览 SYNOPSIS" \fBsmbd\fR [-D] [-F] [-S] [-i] [-h] [-V] [-b] [-d ] [-l ][-p ] [-O ] [-s ] .SH "描述 DESCRIPTION" .PP 此程序是\fBSamba\fR(7) 套件的一部分。 .PP \fBsmbd\fR 是向Windows客户机提供文件共享和打印服务的服务器进程。该服务器用SMB(或CIFS)协议向客户提供文件存放空间和打印服务。它与LanManager协议兼容并能向使用此协议的客户提供服务。这些客户端包括MSCLIENT 3.0 for DOS,Windows for Workgroups,Windows 95/98/ME,Windows NT,Windows 2000, OS/2,DAVE for Macintosh, 和smbfs for Linux。 .PP 用来控制服务属性的配置文件的手册页中对服务器可提供的服务进行了详细的描述(参见 \fBsmb.conf\fR (5))。此手册不描述提供的服务但集中讲述了对管理服务器运行等方面的问题描述。 .PP 请注意对服务器运行有关的非常重要的安全性问题,同时在进行安装处理前也应该仔细阅读\fBsmb.conf\fR (5)手册。 .PP 只要有客户请求就会建立一个对话。对每个对话,每个客户获得服务器的一份复本。在对话期间此复本对所有客户产生的连接进行服务。当来自此客户的所有连接都关闭时,此客户的服务器复本也退出。 .PP 服务器所包含的配置文件和其它任何文件都会在每次更改后自动重新装入。你可以通过对服务器发送一个SIGHUP信息来强制一次重新装入。重新装入配置文件对已建立的任何对服务的连接均无效。要么用户必须断开服务,要么将\fBsmbd\fR进程中止并重启。 .SH "选项 OPTIONS" .TP -D 如果指定此选项,则服务器以后台进程方式运行。即,它会分离本身并在后台运行,在适当的端口上监听请求。对于提供比临时性的文件和打印服务更多内容的服务器,推荐将\fBsmbd\fR 以后台进程方式运行。如果在shell命令行运行\fBsmbd \fR,将默认使用这个选项。 .TP -F If specified, this parameter causes the main \fBsmbd\fR 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 \fBsmbd\fR under process supervisors such as \fBsupervise\fR and \fBsvscan\fR from Daniel J\&. Bernstein's \fBdaemontools\fR package, or the AIX process monitor\&. .TP -S If specified, this parameter causes \fBsmbd\fR to log to standard output rather than a file\&. .TP -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. \fBsmbd\fR also logs to standard output, as if the \fB-S\fR parameter had been given. .TP -V 打印smbd的版本号。 .TP -s 指定的文件包含了服务器所需的配置细节。此文件中的信息包含如所用的printcap文件这样的服务器详细信息,同时也对服务器所提供的服务进行了描述。请参见\fIsmb.conf\fR (5)文件。缺省的配置文件名在软件包编译时决定。 .TP -d|--debug=debuglevel \fIdebuglevel\fR 是一个从0到10的整数。如果没有指定此参数则默认的值是0。 如果这个值越高,越多关于服务器的详细活动信息将被记录到文件中。在0调试级时,只记录紧急错误和严重警告。对于平日的运行服务,1调试级是个合理的等级,它只产生小量的关于执行操作的信息。 1以上的调试级将产生相当多的记录数据,并且只在解决问题时才有用。3以上的调试级只被设计为让开发者使用并会产生极大数量的记录数据,而且其中很多部分非常难以理解。 注意在此使用这个参数将越过在\fIsmb.conf\fR (5)文件中的\fIlog level\fR参数。 .TP -l|--logfile=logbasename 用来记录/调试的文件。会自动为它添加 \fB".client"\fR 扩展名。客户端不会将记录文件删除。 .TP -h|--help 打印smbd的命令行参数(用法)。 .TP -b Prints information about how Samba was built\&. .TP -l If specified, \fIlog directory\fR 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 \fImax log size\fR option in the \fBsmb.conf\fR(5) file. \fBBeware:\fR If the directory specified does not exist, \fBsmbd\fR will log to the default debug log location defined at compile time. The default log directory is specified at compile time. .TP -p \fIport number\fR 端口号是个正值整数。如果此选项未指定则缺省值为139。 这个端口号用于从客户端建立对服务器的连接。基于TCP上的SMB所用的标准(通常使用的)端口号为139,因此这是缺省值。如果你希望作为普通用户而不是root身份运行服务器的话,多数系统会要求你使用1024以上的端口号 - 如有此情况请向系统管理员取得帮助。 为了使更多客户使用服务器,而又在139以外的端口进行配置,则你需要在端口139上进行端口重定向,在rfc1002.txt的4.3.5部分有详细的描述。 除上述情况以外,此选项通常不用。 .SH "文件 FILES" .TP \fI/etc/inetd.conf\fR 如果通过\fBinetd\fR 超级进程来运行服务器,则此文件必须含有适当的启动信息。 .TP \fI/etc/rc\fR (或其它你的系统所用的初始化脚本)。 如果在启动时以后台进程模式运行服务器,则此文件须包含适当的服务器启动次序。 .TP \fI/etc/services\fR 如果通过\fBinetd\fR超级进程来运行服务器,则此文件必须包含一份服务端口(如139)和协议类型(如tcp)与对应的服务名(如netbios-ssn)的映射。 .TP \fI/usr/local/samba/lib/smb.conf\fR 缺省的服务器配置文件 \fBsmb.conf\fR(5)的存放位置。系统安装此文件的其它通常位置为 \fI/usr/samba/lib/smb.conf\fR和\fI/etc/samba/smb.conf\fR。 此文件描述了客户可获得的服务项的情况。参见\fBsmb.conf\fR(5)获得更多情况。 .SH "限制 LIMITATIONS" .PP 在有些系统上,\fBsmbd\fR无法在一次setuid()调用以后把uid返回到root。这样的系统称为“陷门”(trapdoor)uid系统。如果你使用这样的系统,将无法同时在一个客户端(如一台PC机)以两个不同的用户身份进行连接。试图连接第二个用户将得到“访问被拒”或类似的结果。 .SH "环境变量 ENVIRONMENT VARIABLES" .TP \fBPRINTER\fR 如果对可打印服务没有指定打印名称,多数系统将使用此变量(如果未定义此变量则用\fBlp\fR )的值作为可用打印机的名称。但并不是服务器特定的。 .SH "PAM INTERACTION" .PP 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 \fIobey pam restrictions\fR \fBsmb.conf\fR(5) paramater\&. When this is set, the following restrictions apply: .TP 3 \(bu \fBAccount Validation\fR: 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\&. .TP \(bu \fBSession Management\fR: 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\&. .LP .SH "版本 VERSION" .PP 此手册页是针对samba套件版本3.0的。 .SH "诊断 DIAGNOSTICS" .PP 通常情况下诊断信息都记录到指定好的记录文件中。这个文件的名称是在编译时指定的,但也可以用命令行来指定。 .PP 用户可以得到的诊断信息的数量和种类取决于用户执行客户端程序时所用的调试等级。如果你发现有问题的话,把调试级设到3并详细阅读记录文件里的内容。 .PP 很多信息都无须加以说明。不幸的是,在写手册页时,源代码中有着太多的诊断信息,它们保证了对每种情况都加以描述,却无法写入文档。在此时,你最好还是用grep查找源代码并检查引起诊断信息的条件。 .SH "信号 SIGNALS" .PP 向\fBsmbd\fR发送一个SIGHUP信号可以使它在一个很短时间内重新装入\fIsmb.conf\fR配置文件。 .PP 我们 \fB不\fR 推荐你使用SIGKILL (-9)来终止\fBsmbd\fR进程除非这是最后的方法,因为这样做可能导致名字数据库不一致。正确的方法是发送SIGTERM (-15)信号并等待程序自行结束。 .PP 另外,\fBsmbd\fR程序的调试记录等级也可以通过\fBsmbcontrol\fR(1) 调高或者调低。(向程序发送一个SIGUSR1或SIGUSR2信号(kill -USR2 )的方法在Samba2.2 中已经不再使用。) 通过使用这样的方法可以诊断一些暂时的问题,同时仍然可以在一个正常的并且较低的记录等级来运行。 .PP Note that as the signal handlers send a debug write, they are not re-entrant in \fBsmbd\fR. This you should wait until\fBsmbd\fR 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. .SH "参见 SEE ALSO" .PP \fBhosts_access\fR(5), \fBinetd\fR(8), \fBnmbd\fR(8), \fBsmb.conf\fR(5), \fBsmbclient\fR(1), \fBtestparm\fR(1), \fBtestprns\fR(1), 还有互联网草案 \fIrfc1001.txt\fR, \fIrfc1002.txt\fR. 另外,CIFS (从前的 SMB) 规约可以在 http://samba.org/cifs/网页上找到链接。 .SH "作者 AUTHOR" .PP samba软件和相关工具最初由Andrew Tridgell创建。samba现在由Samba Team 作为开源软件来发展,类似linux内核的开发方式。 .PP 最初的samba手册页是 Karl Auer写的。 手册页源码已经转换为YODL格式(另一种很好的开源软件,可以在ftp://ftp.ice.rug.nl/pub/unix找到),由Jeremy Sllison 更新到Samba2.0 版本。 Gerald Carter 在Samba2.2中将它转化为DocBook 格式。 Alexander Bokovoy 在Samba 3.0中实现了DocBook XML4.2 格式的转换。 .SH "[中文版维护人]" .B meaculpa .SH "[中文版最新更新]" .B 2000/12/08 .SH "《中国linux论坛man手册页翻译计划》:" .BI http://cmpp.linuxforum.net .SH "跋" .br 本页面中文版由中文 man 手册页计划提供。 .br 中文 man 手册页计划:\fBhttps://github.com/man-pages-zh/manpages-zh\fR