“Failed to find entry for user…” appears when Linux uses samba

The following error occurred today when installing Samba to add users and using Smbpasswd to generate the password:
[email protected] / backup $the smbpasswd test
New SMB password:
Retype new SMB password:
Failed to find entry for user test.
Failed to modify password entry for user test

Note that there is no such user, please use the -a parameter

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</enter>
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.


Add parameter ‘-a’ :

# smbpasswd-a user

Read More: