I was trying to create a user today in samba and was getting the error "Failed to modify password entry for user [USER]".
I read over the man pages for smbpasswd and saw that I needed to add the -n switch because this user will not have a password. So again I tried to add the user with "smbpasswd -a -n [USER]" and got the same error.
A quick Google search lead me to a newb mistake on my part... I didn't have the user I was trying to add in my UNIX password file. A quick "useradd [USER]" followed by the same "smbpasswd -a -n [USER]" and I was all set.
Granted there are other reasons why this process might fail, but for me this was the reason.