Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 3328  / 2 Years ago, mon, april 4, 2022, 8:37:45

I was reading about passwordless authentication with ssh. So I made a key and published it to my Ubuntu server, and it worked well.



Then decided to lock my password with passwd -l lucas, and I was not longer able to use sudo. I was thinking that sudo would also be without a password.



My question now is: how can I regain the ability to use sudo?


More From » password

 Answers
0

After running passwd -l on a user, that user can't set their password (until after it's set back to something usable).



Since you cannot use sudo, you'll need to reset your user account password, the same way as if you'd just forgotten what it was:





Then you can use sudo again, and you can set PasswordAuthentication no as explained in steeldriver's answer.


[#23532] Tuesday, April 5, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ingsta

Total Points: 391
Total Questions: 103
Total Answers: 124

Location: Bonaire
Member since Wed, Mar 29, 2023
1 Year ago
ingsta questions
Sun, Oct 23, 22, 01:42, 2 Years ago
Sat, Oct 30, 21, 11:27, 3 Years ago
Sun, Nov 28, 21, 12:49, 2 Years ago
;