I am following the guide add new user accounts with SSH access to my Amazon EC2 the point 2 has this note

If you add the new_user to an Ubuntu instance, include the --disabled-password option to avoid adding a password to the new account

Because I use an instance of ubuntu, I proceed as the note suggests

$ sudo adduser new_user --disabled-password

But when I get to the optional section in step 7 I want to allow the new user to use sudo so I try the following, as the guide tells me

$ sudo passwd new_user

But here a password is required, I try to just press enter but keep asking for a password that it obviously doesn't have. I suppose there is something that skipped the guide, could you tell me how to proceed in this case


1 Answer 1


When you run the command:

$ sudo passwd new_user

sudo will prompt you for your password (to verify that you are you), then it will run passwd (as root), which will prompt you for the new password for new_user.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .