.\"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