How To Install pam_mount on Rocky Linux 8

In this tutorial we learn how to install pam_mount on Rocky Linux 8. pam_mount is A PAM module that can mount volumes for a user session

Introduction

In this tutorial we learn how to install pam_mount on Rocky Linux 8.

What is pam_mount

This module is aimed at environments with central file servers that a user wishes to mount on login and unmount on logout, such as (semi-)diskless stations where many users can logon and where statically mounting the entire /home from a server is a security risk, or listing all possible volumes in /etc/fstab is not feasible. * Users can define their own list of volumes without having to change (possibly non-writable) global config files. * Single sign-on feature - the user needs to type the password just once (at login) * Transparent mount process * No stored passwords * Volumes are unmounted on logout, freeing system resources and not leaving data exposed. The module also supports mounting local filesystems of any kind the normal mount utility supports, with extra code to make sure certain volumes are set up properly because often they need more than just a mount call, such as encrypted volumes. This includes SMB/CIFS, FUSE, dm-crypt and LUKS. If you intend to use pam_mount to protect volumes on your computer using an encrypted filesystem system, please know that there are many other issues you need to consider in order to protect your data. For example, you probably want to disable or encrypt your swap partition (the cryptoswap can help you do this). Do not assume a system is secure without carefully considering potential threats.

We can use yum or dnf to install pam_mount on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install pam_mount.

Install pam_mount on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install pam_mount using dnf by running the following command:

sudo dnf -y install pam_mount

Install pam_mount on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install pam_mount using yum by running the following command:

sudo yum -y install pam_mount

How To Uninstall pam_mount on Rocky Linux 8

To uninstall only the pam_mount package we can use the following command:

sudo dnf remove pam_mount

pam_mount Package Contents on Rocky Linux 8

/etc/security/pam_mount.conf.xml
/sbin/mount.crypt
/sbin/mount.crypto_LUKS
/sbin/umount.crypt
/sbin/umount.crypto_LUKS
/usr/lib/.build-id
/usr/lib/.build-id/14
/usr/lib/.build-id/14/29fbe2a411bbac652bc256c5cfd10907c49a8b
/usr/lib/.build-id/18
/usr/lib/.build-id/18/e02fde1633ab2293a042ba08aa6f807403359a
/usr/lib/.build-id/9e
/usr/lib/.build-id/9e/a9abf16d47644f98f1959fd59fba9b2c73498b
/usr/lib/.build-id/ab
/usr/lib/.build-id/ab/734f7453a8117ff053164c9ccfdbc5a5013fe1
/usr/lib/.build-id/d4
/usr/lib/.build-id/d4/586e29acaa109fe5f46bfe2e58041cec57ddd7
/usr/lib64/libcryptmount.so.0
/usr/lib64/libcryptmount.so.0.0.0
/usr/lib64/security/pam_mount.so
/usr/sbin/pmt-ehd
/usr/sbin/pmvarrun
/usr/share/doc/pam_mount
/usr/share/doc/pam_mount/LICENSE.GPL2
/usr/share/doc/pam_mount/LICENSE.GPL3
/usr/share/doc/pam_mount/LICENSE.LGPL2
/usr/share/doc/pam_mount/LICENSE.LGPL3
/usr/share/doc/pam_mount/bugs.txt
/usr/share/doc/pam_mount/faq.txt
/usr/share/doc/pam_mount/news.txt
/usr/share/doc/pam_mount/options.txt
/usr/share/doc/pam_mount/pam_mount.conf.xml
/usr/share/doc/pam_mount/todo.txt
/usr/share/man/man5/pam_mount.conf.5.gz
/usr/share/man/man8/mount.crypt.8.gz
/usr/share/man/man8/mount.crypto_LUKS.8.gz
/usr/share/man/man8/pam_mount.8.gz
/usr/share/man/man8/pmt-ehd.8.gz
/usr/share/man/man8/pmvarrun.8.gz
/usr/share/man/man8/umount.crypt.8.gz
/usr/share/man/man8/umount.crypto_LUKS.8.gz
/usr/share/xml/pam_mount
/usr/share/xml/pam_mount/dtd
/usr/share/xml/pam_mount/dtd/pam_mount.conf.xml.dtd
/var/run/pam_mount

References

Summary

In this tutorial we learn how to install pam_mount on Rocky Linux 8 using yum and dnf.