SMBMOUNT(8)

NAME
smbmount - 裝載一個 smbfs 檔案系統

總覽 SYNOPSIS

smbmount {service} {mount-point} [-o options]

描述 DESCRIPTION

smbmount 可以裝載一個Linux SMB檔案系統。它通常在帶 "-t smbfs" 選項執行 mount(8) 命令時被作為mount.smbfs執行。當然核心必須支援smbfs檔案系統。

smbmount使用的選項是用逗號分隔的一串key=value字串對的列表。It is possible to send options other than those listed here, assuming that smbfs supports them. If you get mount failures, check your kernel log for errors on unknown options.

smbmount is a daemon. After mounting it keeps running until the mounted smbfs is umounted. It will log things that happen when in daemon mode using the "machine name" smbmount, so typically this output will end up in log.smbmount. The smbmount process may also be called mount.smbfs.

  注意

smbmount 呼叫 smbmnt(8)來完成實際的裝載任務。你必須確保 smbmnt 位於可以找到的路徑中。

選項 OPTIONS

username=<arg>
    指定聯接時的使用者名稱。如果不指定，程式會用USER這個環境變數。這個選項也接受"user%password", "user/workgroup"或"user/workgroup%password"形式的引數，允許密碼和工作組作為使用者名稱的一部分同時被指定。

password=<arg>
    指定SMB口令。如果不指定，將使用環境變數PASSWD. 如果沒有指定，也沒有環境變數， smbmount會提示輸入口令，除非使用了guest選項。

    Note that passwords which contain the argument delimiter character (i.e. a comma ',') will failed to be parsed correctly on the command line. However, the same password defined in the PASSWD environment variable or a credentials file (see below) will be read correctly.

credentials=<filename>
    specifies a file that contains a username and/or password. The format of the file is:

    username = <value>
    password = <value>

    This is preferred over having passwords in plaintext in a shared file, such as /etc/fstab. Be sure to protect any credentials file properly.

krb Use kerberos (Active Directory).

netbiosname=<arg>
    設定源NetBIOS主機名。預設是本機名。

uid=<arg>
    設定裝載的檔案系統的使用者識別符號。可以用使用者名稱或者UID數字兩種辦法來指定。

gid=<arg>
    設定裝載的檔案系統的組識別符號。可以用組名或者GID數字兩種方法來指定。

port=<arg>
    設定遠端SMB系統的埠號。預設是139。

fmask=<arg>
    設定檔案掩碼。這決定了本地檔案系統中遠端檔案的許可權。它不是掩碼而是實際的檔案許可權。預設值是根據當前的umask算出來的。

dmask=<arg>
    設定目錄掩碼。這決定了本地檔案系統中遠端目錄的許可權。它不是掩碼而是實際的目錄許可權。預設值是根據當前的umask算出來的。

debug=<arg>
    設定除錯等級。對於跟蹤SMB的聯接問題非常有用。 建議的值是4. 如果設定得過高，會產生大量輸出，可能會掩蓋有用的輸出。

ip=<arg>
    設定目標主機或IP地址。

workgroup=<arg>
    設定目的工作組。

sockopt=<arg>
    設定TCP套接字的一些選項。參見smb.conf(5)配置檔案中的socket options選項。

scope=<arg>
    設定NetBIOS範圍。

guest
    不提示口令

ro  以只讀方式裝載。

rw  以讀寫方式裝載。

iocharset=<arg>
    sets the charset used by the Linux side for codepage to charset translations (NLS). Argument should be the name of a charset, like iso8859-1. (Note: only kernel 2.4.0 or later)

codepage=<arg>
    sets the codepage the server uses. See the iocharset option. Example value cp850. (Note: only kernel 2.4.0 or later)

ttl=<arg>
    sets how long a directory listing is cached in milliseconds (also affects visibility of file size and date changes). A higher value means that changes on the server take longer to be noticed but it can give better performance on large directories, especially over long distances. Default is 1000ms but something like 10000ms (10 seconds) is probably more reasonable in many cases. (Note: only kernel 2.4.2 or later)

ENVIRONMENT VARIABLES

The variable USER may contain the username of the person using the client. This information is used only if the protocol level is high enough to support session-level passwords. The variable can be used to set both username and password by using the format username%password.

The variable PASSWD may contain the password of the person using the client. This information is used only if the protocol level is high enough to support session-level passwords.

The variable PASSWD_FILE may contain the pathname of a file to read the password from. A single line of input is read and used as the password.

BUGS

Passwords and other options containing , can not be handled. For passwords an alternative way of passing them is in a credentials file or in the PASSWD environment.

The credentials file does not handle usernames or passwords with leading space.

One smbfs bug is important enough to mention here, even if it is a bit misplaced:

•   Mounts sometimes stop working. This is usually caused by smbmount terminating. Since smbfs needs smbmount to reconnect when the server disconnects, the mount will eventually go dead. An umount/mount normally fixes this. At least 2 ways to trigger this bug are known.

Note that the typical response to a bug report is suggestion to try the latest version first. So please try doing that first, and always include which versions you use of relevant software when reporting bugs (minimum: samba, kernel, distribution)

SEE ALSO

Documentation/filesystems/smbfs.txt in the linux kernel source tree may contain additional options and information.

FreeBSD also has a smbfs, but it is not related to smbmount

For Solaris, HP-UX and others you may want to look at smbsh(1) or at other solutions, such as Sharity or perhaps replacing the SMB server with a NFS server.

作者 AUTHOR

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

《中國linux論壇man手冊頁翻譯計劃》:
http://cmpp.linuxforum.net

  跋
本頁面中文版由中文 man 手冊頁計劃提供。
中文 man 手冊頁計劃：https://github.com/man-pages-zh/manpages-zh