I just installed Ubuntu 15.10 on my new desktop. However, I want to erase the password of it. I followed the instructions here. I now can successfully login with out password, but I cannot use sudo
command. It prompt me to enter my password. I tried both empty and the old one. Neither of them will work. How to solve that problem?
1 Answer
Disclaimer: IMHO, this is a very bad idea. You should not erase the password of an account.
As explained here, you have to disable the password check in sudo
, editing the sudo
configuration file.
Note that the order is important. You have to change sudo configuration before to erase the password. If it is to late, you can simply set a new password, change the configuration and delete the password again.
-
Yeah, like you said, I first did
sudo visudo
and add[myusername] ALL=(ALL) NOPASSWD:ALL
in the file; next, I ransudo passwd [myusername] -d
to delete the password. After that I can actually login my account without password. However, in that circumstances, I cannot usesudo
command, like I put it in the question.– TramsMay 5, 2016 at 9:10
sudo
?[sudo] password for [myusername]
, what error message you get ?