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.