Samba, Failed to find entry for user

Posted in May 2012 by under sysadmin

When trying to set up a samba user, you set the password using

smbpasswd joebloggs
            

You are prompted for the new password but then it gives the error

Failed to find entry for user
            

This has happened because it is the first time you have set the password. You need to add the user first, so the command should be

smbpasswd -a joebloggs