Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
$ smbpasswd
Old SMB password:
New SMB password:
Retype new SMB password:
Could not connect to machine NT_STATUS_LOGON_FAILURE

One suggestion was to add the user to samba

smbpasswd -a frank 

This brought up list of options, should it tell me user added?

Samba quick start guide use smbadduser name:name but that gave command not found

Did that but when I retry to change password I get same error message.

Browsing around it suggests that this error message is that you did not enter old password, as it is a new install I presumed it to be blank and googling samba default password came up with 1234 as default password, so tried that in the old SMB password... same error.

share|improve this question
up vote 0 down vote accepted

First try to add a user.

useradd -c "User Name" -d /home/user -s /sbin/nologin user

The create a password for that user

smbpasswd -a user
New SMB password:
Retype new SMB password:

and you will get

Added user user.

After that, you have to define shares. Let me know if it works.

*Make sure you replace User Name and user, with the real user

Try run passwd, then sudo smbpasswd

share|improve this answer
useradd: cannot lock /etc/passwd; try again later Just wonder that is because my username already exists? I do not want a different user name. Also entering the smbpasswd -a user just brings up command options no prompt – Frank A Jun 27 '12 at 18:06
did you try smbpasswd -a frank – Mitch Jun 27 '12 at 18:12
OOps I had not changed other ´user' did so and got useradd: user 'frank' already exists So I guess I was right there – Frank A Jun 27 '12 at 18:14
Try creating a another user, and see if it will let you login. – Mitch Jun 27 '12 at 18:15
Yes I got - $ smbpasswd -a frank When run by root: smbpasswd [options] [username] otherwise: smbpasswd [options] options: etcetera – Frank A Jun 27 '12 at 18:16

First check if your account already exists among smbdclients:

sudo pdbedit -L

if the account is not there just run (e.g on pc: myaccount@server):

sudo smbpasswd -a myaccount

otherwise if already exists, you have to delete first and recreate a new one:

sudo pdbedit -x -u myaccount 
sudo smbpasswd -a myaccount
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.