Wednesday, May 27, 2009

Failed to modify password entry for user while adding user with smbpasswd

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.


Qriz said...

did the same thing ;-)


Anonymous said...

Thanks! I completely forgot to add the user to the system before adding to smbpasswd.

Anonymous said...

Thanks. Very useful for newbie [me]. -Daniel

Anonymous said...

lol i've come to this post to relearn this... twice.