今天在安装samba增加用户,并且使用smbpasswd生成密码的时候出现如下错误:
[root@10.60.10.27 /backup]$ smbpasswd test
New SMB password:
Retype new SMB password:
Failed to find entry for user test.
Failed to modify password entry for user test
说明是没有该用户,请使用 -a 参数
OPTIONS
-a
This option specifies that the username following should be added to the local smbpasswd file, with the new
password typed (type <Enter> for the old password). This option is ignored if the username following
already exists in the smbpasswd file and it is treated like a regular change password command. Note that
the default passdb backends require the user to already exist in the system password file (usually
/etc/passwd), else the request to add the user will fail.
This option is only available when running smbpasswd as root.
解决方法:
加参数‘-a’:
# smbpasswd -a 用户即可