Thursday, May 2, 2024
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 5200  / 1 Year ago, sat, april 22, 2023, 4:40:04

In the terminal, whenever I try to perform sudo, Ubuntu asks my password and it always says I typed it in wrong.



I tried changing the password as root, but then it says password unchanged.



My user don't have to enter its password on the login screen, and I think that may have something to do with it.



Does anyone know how to fix this?


More From » command-line

 Answers
0

  • Boot in recovery mode as root



perform these commands:




  • mount -o rw,remount /

  • nano /etc/sudoers



Look for a line containing root ALL=(ALL:ALL) ALL, below that add this line:



your_username_here ALL=(ALL:ALL) ALL



(change your_username_here to your actual username)



(Press Ctrl+X to exit nano, and answer 'y' to save the changes)




  • Enter passwd your_username_here and set a new password.



(change your_username_here to your actual username)




  • Reboot



(source)


[#30262] Sunday, April 23, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
montwim

Total Points: 103
Total Questions: 112
Total Answers: 120

Location: Vietnam
Member since Mon, Mar 14, 2022
2 Years ago
montwim questions
;