other languages
other sections
SMBPASSWD(8) | SMBPASSWD(8) |
NAME¶
smbpasswd - 改變使用者的SMB口令總覽 SYNOPSIS¶
smbpasswd [-a] [-x] [-d] [-e] [-D debuglevel] [-n] [-r <remote machine>] [-R <name resolve order>] [-m] [-U username[%password]] [-h] [-s] [-w pass] [-i] [-L] [username]描述 DESCRIPTION¶
此程式是 Samba(7)套件的一部分。選項 OPTIONS¶
- -a
- 在這個選項後跟上使用者名用來實現在本地smbpasswd檔案中增加使用者,並且同時設置口令(提示原口令時用<Enter>)。如果smbpasswd檔案中已經存在了這個使用者時,命令就變成通常的修改口令模式。注意,預設的passdb後端要求所要加入的SMB使用者必須是系統口令檔案中(通常是/etc/passwd)已經存在的使用者否則加入操作將會失敗。
- -x
- This option specifies that the username following should be
deleted from the local smbpasswd file.
- -d
- 這個選項後跟使用者名用來禁止存在於smbpasswd檔案中的這個賬號。通過在smbpasswd檔案的賬號控制部分寫入
'D'標誌來實現這個功能。一旦賬號被禁止,所有使用這個賬號作SMB身份驗証的嘗試都將失敗。
- -e
- 這個選項後跟使用者名用來在本地smbpasswd檔案中的這個賬號被禁止時重新允許使用。如果賬號並未被禁止的話,使用這個選項不會有什麼結果。被允許的賬號將可以通過SMB的身份驗証。
- -D debuglevel
- debuglevel
是一個從0到10的整數。如果沒有指定此參數則預設的值是0。
- -n
- 用這個選項後跟使用者名來把這個賬號的口令設為空(也就是沒有口令)。程式會把本地smbpasswd檔案中該口令項的第一部分改為「NO
PASSWORD」。
- -r remote machine name
- 使用這個選項來讓使用者指定他們所希望改變口令的主機,不用此參數時預設對本地更改口令。SMB/CIFS伺服器會試圖聯接以remote
machine
name作為NetBIOS名字的主機以更改口令。Samba套件中的所有程式都使用標準的名字解析機制來把這樣的名字轉換成IP地址。參見
-R name resolve
order參數來獲得改變解析機制的詳細信息。
- -R name resolve order
- 用這個選項來讓使用smbclient的使用者在查詢主機NetBIOS名字用於聯接時,決定使用怎樣的名字解析服務。
- -m
- 這個選項來把賬號改為一個MACHINE賬號。通常當Samba作為Windows
NT主域控制器的時候可以使用它。
- -U username
- 這個選項只能和
-r選項聯合使用。當從遠程主機更改口令時,用它來允許使用者指定要改變的遠程主機口令的使用者賬號。這使得在不同的系統上使用不同的賬號的使用者可以口令。
- -h
- 使用這個選項可以列印出
smbpasswd的幫助信息,注意選擇正確的幫助:
root使用者和普通使用者使用的。
- -s
- 使用這個選項會使smbpasswd保持安靜(不發出提示),在標準輸入上讀取原口令和新口令。而不是從/dev/tty上讀口令(像passwd(1)那樣)。使用稿本來處理smbpasswd時可以用它。
- -w password
- This parameter is only available if Samba has been
configured to use the experimental --with-ldapsam option. The
-w switch is used to specify the password to be used with the
ldap admin dn. Note that the password is stored in the
secrets.tdb and is keyed off of the admin's DN. This means that if
the value of ldap admin dn ever changes, the password will need to
be manually updated as well.
- -i
- This option tells smbpasswd that the account being changed
is an interdomain trust account. Currently this is used when Samba is
being used as an NT Primary Domain Controller. The account contains the
info about another trusted domain.
- -L
- Run in local mode.
- username
- This specifies the username for all of the root only
options to operate on. Only root can specify this parameter as only root
has the permission needed to modify attributes directly in the local
smbpasswd file.