How To Install libpam-alreadyloggedin on Ubuntu 18.04

In this tutorial we learn how to install libpam-alreadyloggedin on Ubuntu 18.04. libpam-alreadyloggedin is PAM module to skip password authentication for logged users

Introduction

In this tutorial we learn how to install libpam-alreadyloggedin on Ubuntu 18.04.

What is libpam-alreadyloggedin

libpam-alreadyloggedin is:

libpam-alreadloggedin is a PAM module which allows users to skip authentication if they are already logged in on another console.

Note that this module trades a bit of security for users’ convenience and thus should be used cautiously.

There are three methods to install libpam-alreadyloggedin on Ubuntu 18.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-alreadyloggedin 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-alreadyloggedin using apt-get by running the following command:

sudo apt-get -y install libpam-alreadyloggedin

Install libpam-alreadyloggedin Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libpam-alreadyloggedin using apt by running the following command:

sudo apt -y install libpam-alreadyloggedin

Install libpam-alreadyloggedin 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-alreadyloggedin using aptitude by running the following command:

sudo aptitude -y install libpam-alreadyloggedin

How To Uninstall libpam-alreadyloggedin on Ubuntu 18.04

To uninstall only the libpam-alreadyloggedin package we can use the following command:

sudo apt-get remove libpam-alreadyloggedin

Uninstall libpam-alreadyloggedin And Its Dependencies

To uninstall libpam-alreadyloggedin and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove libpam-alreadyloggedin

Remove libpam-alreadyloggedin Configurations and Data

To remove libpam-alreadyloggedin configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge libpam-alreadyloggedin

Remove libpam-alreadyloggedin configuration, data, and all of its dependencies

We can use the following command to remove libpam-alreadyloggedin configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libpam-alreadyloggedin

References

Summary

In this tutorial we learn how to install libpam-alreadyloggedin package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.