You are not logged in.

#1 2022-04-20 12:06:44

archInMarch
Member
Registered: 2022-03-23
Posts: 3

SUDO doesn't work after sudo passwd root [SOLVED]

WHAT I DID:
I have changed my user password, and then the root password using passwd, like follows:
passwd x
sudo passwd root

After observing the problem I did this process several times.

PROBLEM:
Now sudo authenticate me rarely. More or less it is not working at all.
Su seems to work all the time. And login into system after suspend (via password for normal user) seems to work well.
I am REALLY sure I type the password correctly.

[x@arch ~]$ su
Password: 
[root@arch x]# exit
exit
[x@arch ~]$ su
Password: 
su: Authentication failure
[x@arch ~]$ su
Password: 
[root@arch x]# exit
exit
[x@arch ~]$ sudo nano /etc/passwd
[sudo] password for x: 
Sorry, try again.
[sudo] password for x: 
Sorry, try again.
[sudo] password for x: 
sudo: 3 incorrect password attempts
[x@arch ~]$ 

THE REST:
I have read this issue: https://bbs.archlinux.org/viewtopic.php?id=259862 but it seems slightly different. Also I have tried to google the phrase "pam_faillock cron" and didn't found satisfied results.

QUESTIONS:
1. How can I bring sudo working well back?
2. What is proper way to change root password (for the future)?
3. What is good way to test password? I tried to use passwd and provide wrong password, then proper password. Also for root I just tried "sudo nano /etc/shadow".

EDIT:
I restarted system twice.
Please feel free to ask me for required information I didn't wrote.

EDIT 2:
Sorry a lot. I just figured out that sudo uses my own account password, not the root one. Just dumb mistake.

Last edited by archInMarch (2022-04-20 15:42:18)

Offline

Board footer

Powered by FluxBB