4

First of all, I want to mention that I am running Manjaro Linux. Today when I wanted to install a new program I got the following error when trying to use sudo pacman:

sudo: account validation failure, is your account locked?

I googled around a bit and found a few possible causes of this issue, but none of the solutions I found seemed to fix my problem. What I tried so far:

  • booting with init=/bin/su and running /usr/bin/passwd
  • using chage to check the expiration dates of root and my user account

Another thing which might be important to mention is that I used to authenticate for sudo by using my fingerprint reader. I used fprintd to do this. I thought this might have been the reason for the error so i removed fprintd as well, however this did not resolve the issue. Does anyone have a clue of how I can fix this?

2 Answers 2

0

I fixed it by logging in as root by using:

su -

After which I examined /etc/pam.d/sudo and saw that my file looked different from the standard file (e.g. it still had some variable which had to do with my fingerprint reader in it). I changed it to look exactly like the default after which sudo worked again!

1
  • That still gives an Authentication failure
    – Lorenzo
    yesterday
0

I happened on this error on WSL2+Ubuntu after renaming the default user account name of the WSL container. Login was working in the sense that I could run wsl from the host and arrive in bash at my home directory within the Ubuntu instance, but sudo would fail.

For some reason my usermod command hadn't modified /etc/shadow and it still had the old account name.

oldname:$n$[...]$[...]:18529:0:99999:7:::

Solution was to manually correct the file to the correct account name, then sudo worked again. If you need root access to do this in WSL2 you can run wsl -u root from the host to get a root shell.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.