How To Install libpam-mklocaluser on Ubuntu 20.04
Introduction
In this tutorial we learn how to install libpam-mklocaluser
on Ubuntu 20.04.
What is libpam-mklocaluser
libpam-mklocaluser is:
When the user log in for the first time, a local user is created in /etc/passwd and primary group created in /etc/group, and a local home directory is created in /home. This is useful on roaming computers when the password is set up to be cached by for example libpam-ccreds or sssd to allow login without network connectivity using the password provided by a network authentication service like Kerberos or LDAP.
There are three methods to install libpam-mklocaluser
on Ubuntu 20.04. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install libpam-mklocaluser Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install libpam-mklocaluser
using apt-get
by running the following command:
sudo apt-get -y install libpam-mklocaluser
Install libpam-mklocaluser Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install libpam-mklocaluser
using apt
by running the following command:
sudo apt -y install libpam-mklocaluser
Install libpam-mklocaluser Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install libpam-mklocaluser
using aptitude
by running the following command:
sudo aptitude -y install libpam-mklocaluser
How To Uninstall libpam-mklocaluser on Ubuntu 20.04
To uninstall only the libpam-mklocaluser
package we can use the following command:
sudo apt-get remove libpam-mklocaluser
Uninstall libpam-mklocaluser And Its Dependencies
To uninstall libpam-mklocaluser
and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:
sudo apt-get -y autoremove libpam-mklocaluser
Remove libpam-mklocaluser Configurations and Data
To remove libpam-mklocaluser
configuration and data from Ubuntu 20.04 we can use the following command:
sudo apt-get -y purge libpam-mklocaluser
Remove libpam-mklocaluser configuration, data, and all of its dependencies
We can use the following command to remove libpam-mklocaluser
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge libpam-mklocaluser
References
Summary
In this tutorial we learn how to install libpam-mklocaluser
package on Ubuntu 20.04 using different package management tools: apt
, apt-get
and aptitude
.