0

I tried changing my sudoers.d file to remove authentication from my pc by typing %admin ALL=(ALL) NOPASSWD:ALL without using visudo. However, after doing that anywhere where the sudo command is used, it says that the password that I've entered is incorrect. I tried correcting it, by logging with my username to virtual terminal and running sudo visudo and typing %<username> ALL=(ALL) ALL in vain.

How do I get sudo to recognize my password?

user221478
  • 31
  • 1
  • 10
  • 1
    Unless you are using an ANCIENT version of Ubuntu, the admin group is only there for historic reasons (the relevant group now is sudo), and your changes should have had no effect. Are you sure it's not a simple case of How do I reset a lost administrative password? – steeldriver Dec 20 '15 at 19:23
  • @steeldriver - I am sorry for the mistake. It was username and not admin. I rectified the mistake in that question. Also, I haven't forgotten my password. Since, before making the change in the sudoers.d file, i made another change i.e., System Settings -> User Account -> unlock. However, now whenever i log in, it asks me for my login keyring and accepts my password as valid. But, in any interaction with sudo, like while using update manager or the termnal (not the virtual terminal), it doesn't accept my password as valid – user221478 Dec 21 '15 at 10:35
  • @David Foerster- I was actually trying something similar to that. But it didnt work out well, and now each time , sudo asks for my password, it doesn't accept my correct passoword as valid. – user221478 Dec 21 '15 at 10:37

1 Answers1

1

I had to log into the virtual terminal via my username and run passwd username to get a new password. The surprising thing was that changing the password helped when i am extremely confident about my previous password.

user221478
  • 31
  • 1
  • 10