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。
- -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.
- -p <port number>
- port number
端口號是個正值整數。如果此選項未指定則預設值為139。
檔案 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。
限制 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.