Pam mount

The PAM module Article description::allows systems to automatically mount file systems when a user logs on, and unmount file systems when the user logs off.

USE flags
The package has a few USE flags that it supports:

Emerge
To install the package, just emerge it:

Configuration
No specific configuration is needed for the installation itself. The actual configuration entries are mentioned below under the Usage section.

Mounting regular file systems
Edit the PAM configuration file in which the mount action has to be configured. Add the required call to for   and   as shown in the next example:

Next, edit or create the following configuration file:

This file will establish the file systems to mount when a particular user logs on. Of course, replace the example values with actual ones.

Mounting encrypted file systems (dm-crypt/LUKS)
One might want to mount devices encrypted with cryptsetup. At the moment it's managed by automatically, just add   to the configuration file:

For other kind of encrypted file systems specify the appropriate customization for mount programs.

See for details.

Unmerge
Before removing the package, make sure that no PAM configuration file refers to the module anymore:

If no file refers to it anymore, then the package is safe to unmerge: