
In this article, we will be discussing a common error that Ubuntu 20.04 LTS users may encounter: “passwd: Module is unknown”. This error typically occurs when trying to use the passwd command to change a user’s password. We will guide you through the steps to diagnose and resolve this issue.
To fix the "passwd: Module is unknown" error in Ubuntu 20.04 LTS, you can try reinstalling the libpam-pwquality package using the command sudo apt-get install --reinstall libpam-pwquality
. If that doesn’t work, you can create a symbolic link using the command sudo ln -s /lib/x86_64-linux-gnu/security /lib/security
. If the error still persists, check the /var/log/auth.log file for any related error messages.
Understanding the Error
The “passwd: Module is unknown” error is often related to a missing file or incorrect configuration in the libpam-pwquality package. This package is responsible for enforcing password policies such as minimum length and complexity. If this package is not correctly installed or configured, it can cause the passwd command to fail.
Solution 1: Reinstalling the libpam-pwquality package
The first step in resolving this issue is to reinstall the libpam-pwquality package. This can be done by running the following command in the terminal:
sudo apt-get install --reinstall libpam-pwquality
In this command, sudo
is used to run the command with root privileges, apt-get
is the package handling utility in Ubuntu, install
is the command to install a package, --reinstall
is an option that tells apt-get to reinstall the package, and libpam-pwquality
is the name of the package to be reinstalled.
Once the package is reinstalled, try using the passwd command again to see if the error has been resolved.
Solution 2: Creating a Symbolic Link
If the error persists after reinstalling the package, the next step is to create a symbolic link to ensure the correct file path. This can be done by running the following command:
sudo ln -s /lib/x86_64-linux-gnu/security /lib/security
In this command, ln
is the command to create a link, -s
is an option that tells ln to create a symbolic link, and /lib/x86_64-linux-gnu/security
and /lib/security
are the source and target directories, respectively.
Checking the auth.log File
If the error still persists, you can check the /var/log/auth.log file for any error messages related to the missing file. This can be done by running the following command:
sudo tail -n 2 /var/log/auth.log
In this command, tail
is the command to display the end of a file, -n 2
is an option that tells tail to display the last two lines, and /var/log/auth.log
is the file to be displayed.
Conclusion
In summary, the “passwd: Module is unknown” error can typically be resolved by reinstalling the libpam-pwquality package and creating a symbolic link. If these steps do not resolve the issue, checking the auth.log file can provide further insights. We hope this guide has been helpful in resolving this common Ubuntu error. As always, remember to exercise caution when modifying system files and configurations.
Ubuntu 20.04 LTS is a long-term support version of the Ubuntu operating system. LTS stands for "Long Term Support," which means it will receive security updates and support for a longer period compared to regular releases. It was released in April 2020 and is widely used for its stability and reliability.
You can install the libpam-pwquality package in Ubuntu by running the following command in the terminal:
sudo apt-get install libpam-pwquality
This command will use the apt-get package handling utility to install the libpam-pwquality package with root privileges.
A symbolic link, also known as a symlink or soft link, is a special type of file that points to another file or directory. In the context of fixing the "passwd: Module is unknown" error, creating a symbolic link ensures that the correct file path is used for the libpam-pwquality package. It helps resolve any issues related to file path discrepancies and allows the passwd command to function properly.
You can check the auth.log file in Ubuntu by running the following command in the terminal:
sudo tail -n 2 /var/log/auth.log
This command will display the last two lines of the auth.log file, which often contains error messages related to authentication and authorization processes. Checking this file can provide insights into any error messages related to the missing file causing the "passwd: Module is unknown" error.