SMBD(8) | SMBD(8) |
smbd - 向客戶提供SMB/CIFS服務的服務器
smbd [-D] [-F] [-S] [-i] [-h] [-V] [-b] [-d <debug level>] [-l <log directory>][-p <port number>] [-O <socket option>] [-s <configuration file>]
此程序是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。
用來控制服務屬性的配置文件的手冊頁中對服務器可提供的服務進行了詳細的描述(參見 smb.conf (5))。此手冊不描述提供的服務但集中講述了對管理服務器運行等方面的問題描述。
請注意對服務器運行有關的非常重要的安全性問題,同時在進行安裝處理前也應該仔細閱讀smb.conf (5)手冊。
只要有客戶請求就會建立一個對話。對每個對話,每個客戶獲得服務器的一份複本。在對話期間此複本對所有客戶產生的連接進行服務。當來自此客戶的所有連接都關閉時,此客戶的服務器複本也退出。
服務器所包含的配置文件和其它任何文件都會在每次更改後自動重新裝入。你可以通過對服務器發送一個SIGHUP信息來強制一次重新裝入。重新裝入配置文件對已建立的任何對服務的連接均無效。要麼用戶必須斷開服務,要麼將smbd進程中止並重啓。
如果這個值越高,越多關於服務器的詳細活動信息將被記錄到文件中。在0調試級時,只記錄緊急錯誤和嚴重警告。對於平日的運行服務,1調試級是個合理的等級,它只產生小量的關於執行操作的信息。
1以上的調試級將產生相當多的記錄數據,並且只在解決問題時纔有用。3以上的調試級只被設計爲讓開發者使用並會產生極大數量的記錄數據,而且其中很多部分非常難以理解。
注意在此使用這個參數將越過在smb.conf (5)文件中的log level參數。
The default log directory is specified at compile time.
這個端口號用於從客戶端建立對服務器的連接。基於TCP上的SMB所用的標準(通常使用的)端口號爲139,因此這是缺省值。如果你希望作爲普通用戶而不是root身份運行服務器的話,多數系統會要求你使用1024以上的端口號 - 如有此情況請向系統管理員取得幫助。
爲了使更多客戶使用服務器,而又在139以外的端口進行配置,則你需要在端口139上進行端口重定向,在rfc1002.txt的4.3.5部分有詳細的描述。
除上述情況以外,此選項通常不用。
如果在啓動時以後臺進程模式運行服務器,則此文件須包含適當的服務器啓動次序。
此文件描述了客戶可獲得的服務項的情況。參見smb.conf(5)獲得更多情況。
在有些系統上,smbd無法在一次setuid()調用以後把uid返回到root。這樣的系統稱爲“陷門”(trapdoor)uid系統。如果你使用這樣的系統,將無法同時在一個客戶端(如一臺PC機)以兩個不同的用戶身份進行連接。試圖連接第二個用戶將得到“訪問被拒”或類似的結果。
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:
此手冊頁是針對samba套件版本3.0的。
通常情況下診斷信息都記錄到指定好的記錄文件中。這個文件的名稱是在編譯時指定的,但也可以用命令行來指定。
用戶可以得到的診斷信息的數量和種類取決於用戶執行客戶端程序時所用的調試等級。如果你發現有問題的話,把調試級設到3並詳細閱讀記錄文件裏的內容。
很多信息都無須加以說明。不幸的是,在寫手冊頁時,源代碼中有着太多的診斷信息,它們保證了對每種情況都加以描述,卻無法寫入文檔。在此時,你最好還是用grep查找源代碼並檢查引起診斷信息的條件。
向smbd發送一個SIGHUP信號可以使它在一個很短時間內重新裝入smb.conf配置文件。
我們 不 推薦你使用SIGKILL (-9)來終止smbd進程除非這是最後的方法,因爲這樣做可能導致名字數據庫不一致。正確的方法是發送SIGTERM (-15)信號並等待程序自行結束。
另外,smbd程序的調試記錄等級也可以通過smbcontrol(1) 調高或者調低。(向程序發送一個SIGUSR1或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.
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/網頁上找到鏈接。
samba軟件和相關工具最初由Andrew Tridgell創建。samba現在由Samba Team 作爲開源軟件來發展,類似linux內核的開發方式。
最初的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 格式的轉換。
meaculpa <meaculpa@21cn.com>
2000/12/08
http://cmpp.linuxforum.net
本頁面中文版由中文
man 手冊頁計劃提供。
中文 man
手冊頁計劃:https://github.com/man-pages-zh/manpages-zh