2 minutes reading time (440 words)

SOLVED: sudo: account validation failure, is your account locked? sudo: 3 incorrect password attempts

How to fix errors - sudo: account validation failure, is your account locked? sudo: 3 incorrect password attempts. Manually download and install libc packages. Run apt dist-upgrade and auto-remove.

Errors when running sudo on Kali Linux running on Windows Server 2019 using Windows Subsystem for Linux (WSL)

Kali Linux was installed on WSL (running on Server 2019) using an appx package, not from the Windows store

sudo: account validation failure, is your account locked?

sudo: 3 incorrect password attempts

Troubleshooting steps

Reset Kali admin password using WSL root

passwd: Authentication token manipulation error

From Windows PowerShell, I tried connecting to WSL as root and resetting the kali-admin password. This didnt work and I got another error.

Authentication token manipulation error

Run apt-dist upgrade

Next, I tried running apt-dist upgrade hoping that it would resolve any package dependencies or conflicts

From Windows PowerShell

# login to WSL
wsl -u root
# run apt dist-upgrade
apt dist-upgrade 

The following packages have unmet dependencies: libc-bin

The output of apt-dist upgrade gave me another error about missing dependencies for libc and suggests running apt --fix-broken install to fix the issue. 

The following packages have unmet dependencies: libc-bin : Depends: libc6 (< 2.28) but 2.36-4 is installed

Run apt --fix-broken install

Running apt --fix-broken install also didnt fix the problem

dpkg: error processing package libc6:amd64 (--configure):
installed libc6:amd64 package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
libc6:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

Solution: Step1. Manually download and install libc packages

This problem can be fixed by downloading and installing the libc packages individually without using apt

From Windows PowerShell

# login to WSL
wsl -u root

cd ~

wget http://deb.debian.org/debian/pool/main/g/glibc/libc6_2.28-10+deb10u1_amd64.deb 
wget http://deb.debian.org/debian/pool/main/g/glibc/libc-bin_2.28-10+deb10u1_amd64.deb
wget http://deb.debian.org/debian/pool/main/g/glibc/locales_2.28-10+deb10u1_all.deb
wget http://deb.debian.org/debian/pool/main/g/glibc/libc-l10n_2.28-10+deb10u1_all.deb

dpkg -i libc6_2.28-10+deb10u1_amd64.deb libc-bin_2.28-10+deb10u1_amd64.deb locales_2.28-10+deb10u1_all.deb libc-l10n_2.28-10+deb10u1_all.deb 

Solution: Step2. Run apt dist-upgrade and auto-remove

From Windows PowerShell

# login to WSL
wsl -u root

# run apt update, dist-upgrade, autoremove
apt update 
apt dist-upgrade
apt dist-upgrade
apt auto-remove 

sudo apt update && sudo apt upgrade

Related Posts

 

Comments

No comments made yet. Be the first to submit a comment
Already Registered? Login Here
Saturday, 23 September 2023
You can help support this website by buying me a coffee!
Buy Me A Coffee