Provided by:
manpages-zh_1.5.1-1_all 
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>]
yz DESCRIPTION
此程式是Samba(7) 套件的一部分。
smbd
是向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。
用來控制服務屬性的配置檔案的手冊隊允鵀曭A器可提供的服務進行了詳細的描-
z(參見 smb.conf (5))。此手冊不描z提供的服務但集中講-
z了對管理伺服器運行等方悸滌暋D描z。
請注意對伺服器運行有關的非常-
n的安全性問題,同時在進行安裝處理前也應該仔細嬝smb.conf (5)手冊。
只n有客戶請求就會建立一蚢儭隉C對每蚢儭隉A每-
茷彯繸o伺服器的一份復本。在對話期間此復本對所有客戶產生的連接進行服務。當來自此客戶的所有連接都關閉時,此客戶的伺服器復本也退出。
伺服器所包含的配置檔案和其它任何檔案都會在每次更改後自動-
奐s裝入。你可以通過對伺服器發送一紎IGHUP信息來強制一次奐s裝入。-
奐s裝入配置檔案對已建立的任何對服務的連接均無效。-
n麼使用者必須斷開服務,n麼將smbd進程中止並垮牷C
OPTIONS
-D 如果指定此選項,則伺服器以I景進程方式運行。即,它會分離本豕疆b-
I景運行,在適當的端口上監聽請求。對於提供比臨時性的檔案和列印服務更多內容的伺服器,推薦將smbd
以I景進程方式運行。如果在shell命令行運行smbd ,將預設使用這-
蚇龠窗C
-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檔案這樣的伺服器詳細信息,同時也對伺服器所提供的服務進行了描-
z。請參見smb.conf (5)檔案。預設的配置檔名在套件編譯時決定。
-d|--debug=debuglevel
debuglevel 是一荓q0到10的整數。如果沒有指定此參數則預設的O0。
如果這-
V高,越多關於伺服器的詳細活動信息將被記錄到檔案中。在0調試級時,只記錄緊急錯誤和嚴-
孩筆i。對於奶撉犒B行服務,1調試級是-
茼X理的等級,它只產生小量的關於執行操作的信息。
1以上的調試級將產生相當多的記錄數據,並且只在解決問題時才有用。3以上的調試級只被設-
p為讓開發者使用並會產生極大數量的記錄數據,而且其中很多部分非常難以理解。
注意在此使用這荌捊N越過在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。
這-
蚨搕f號用於從客戶端建立對伺服器的連接。基於TCP上的SMB所用的標準(通常使用的)端口號為139,因此這是預設-
C如果你希望作為普通使用者而不是root-
份運行伺服器的話,多數系統會n求你使用1024以上的端口號 -
如有此情況請向系統管理取得幫助。
為了使更多客戶使用伺服器,而又在139以外的端口進行配置,則你需-
n在端口139上進行端口咿w向,在rfc1002.txt的4.3.5部分有詳細的描z。
除上z情況以外,此選項通常不用。
FILES
/etc/inetd.conf
如果通過inetd
超級進程來運行伺服器,則此檔案必須含有適當的啟動信息。
/etc/rc
(或其它你的系統所用的初始化稿本)。
如果在啟動時以-
I景進程模式運行伺服器,則此檔案須包含適當的伺服器啟動次序。
/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。
此檔案描-
z了客戶可獲得的服務項的情況。參見smb.conf(5)獲得更多情況。
LIMITATIONS
在有些系統上,smbd無法在一次setuid()調用以後把uid返回到root。這樣的系統稱為「陷門」(trapdoor)uid系統。如果你使用這樣的系統,將無法同時在一-
茷廕(如一台PC機)以兩茪ㄕP的使用者言鰶i行連接。試圖連接第二-
茖洏峈戔N得到「訪問被拒」或類似的結果。
q 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:
o 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.
o 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.
VERSION
此手冊隄O針對samba套件版本3.0的。
E DIAGNOSTICS
通常情況下診斷信息都記錄到指定好的記錄檔案中。這-
蚗仵蛌漲W稱是在編譯時指定的,但也可以用命令行來指定。
使用者可以得到的診斷信息的數量和種類取決於使用者執行客戶端程式時所用的調試等級。如果你發現有問題的話,把調試級設到3並詳細嬝狐O錄檔案裏的內容。
很多信息都無須加以說明。不幸的是,在寫手冊雅氶A-
鴝l碼中有著太多的診斷信息,它怮O証了對每種情況都加以描-
z,卻無法寫入文件。在此時,你最好還是用grep查找-
鴝l碼並檢查引起診斷信息的條件。
H SIGNALS
向smbd發送一紎IGHUP信號可以使它在一茷傿u時間內奐s裝入smb.conf配置檔案。
我 推薦你使用SIGKILL
(-9)來終止smbd進程除非這是最後的方法,因為這樣做可能導P名字數據庫不一-
P。正確的方法是發送SIGTERM (-15)信號並等待程式自行結束。
另外,smbd程式的調試記錄等級也可以通過smbcontrol(1)
調高或者調低。(向程式發送一紎IGUSR1或SIGUSR2信號(kill -USR2 <nmbd-
pid>)的方法在Samba2.2 中已經不再使用。)
通過使用這樣的方法可以診斷一些暫時的問題,同時仍然可以在一-
茈膨`的並且較低的記錄等級來運行。
Note that as the signal handlers send a debug write, they are not re-
entrant in smbd. This you should wait untilsmbd 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.
SEE ALSO
hosts_access(5), inetd(8), nmbd(8), smb.conf(5), smbclient(1),
testparm(1), testprns(1), 還有網際網路草案 rfc1001.txt, rfc1002.txt.
另外,CIFS (從前的 SMB) 規約可以在 http://samba.org/cifs/網-
隊W找到鏈接。
@ AUTHOR
samba軟體和相關工具最初由Andrew Tridgell創建。samba現在由Samba Team
作為開源軟體來發展,類似linux核心的開發方式。
最初的samba手冊隄O Karl Auer寫的。 手冊-
鴝l碼已經轉換為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 格式的轉換。
[]
meaculpa <meaculpa@21cn.com>
[]
2000/12/08
mlinuxan:
http://cmpp.linuxforum.net
SMBD(8)