0

This question already has an answer here:

I know this has probably been asked before, but I just installed Ubuntu last night and all the replies I read I honestly couldn't understand anything :p

I need to make some changes, and all of them seem to use sudo. When I formatted the pc and installed Ubuntu, it asked me for a password and didn't give me a chance, to have no password. So I then went on and removed the password completely, when the pc was on and the installation was complete.

I then had to use sudo as I said for a couple things, but it asked for a password. I tried to put the old one, I tried to leave it blank, I also typed NOPASSWD, and other variations of that. Nothing worked. I have rebooted the pc also in between of that so for now I have no idea what to do.

Please help, it's really frustrating :(

Edit: I am not looking to reset or restore any password. All I want is to not have a password set at all, and to not be asked for one by sudo, when there is none.

marked as duplicate by vidarlo, mikewhatever, karel, Rinzwind command-line Jan 20 '18 at 13:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • I wasn't aware that the issue is losing the password? I haven't lost it I just removed it completely? Is this a bug? – Gogo Jan 20 '18 at 12:09
  • I did remove the password. I went into the user profile/ account, and removed it completely. Now it says "none". Sudo is still asking for password though. – Gogo Jan 20 '18 at 13:03
0

From the title :

You can edit your sudoers file like:

sudo visudo

And add the following entry, replace user with your username, for example gogo:

user ALL=(ALL) NOPASSWD:ALL

Press ESC then :wq to save it. Then re-login.

However this is consider as a very bad security approach. Note that each active non-root account needs to have a password.

Edit:

Abbreviation sudo means super user do. Certain binaries are executable only from privileged account - root. Normal user accounts can escalate this by configuring their account in the sudoers file.

If you are asking for restoring the password, refer to the mentioned links in the comments.

  • This pc is in our living room and will be used only by my parents (that are 100% irrelevant with technology, to watch movies. Therefore having a password is completely useless in this case, and most of the time annoying when I'm trying to do things quickly. I never asked for restoring any password I'm not sure why my post is marked this way. But I will try what you said a bit later and let you know how it went! Thanks – Gogo Jan 20 '18 at 12:44
  • If then so - please follow the instructions from my answer. – fugitive Jan 20 '18 at 12:48
  • Okay I will do that later and update this post thanks a lot! – Gogo Jan 20 '18 at 13:04
  • Now I've read the question more closely sorry, before applying my suggestion, you will need to apply @Matteo S. answer first probably if you don't you know your root password as well. If need more help, let me know. – fugitive Jan 20 '18 at 13:08
  • What is a root password and when was that set? The only password I set was the profile password, that I have removed. – Gogo Jan 20 '18 at 13:18

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