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
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
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 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
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)
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
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
Comments