Difference between revisions of "Pam mount"

From ArchWiki
Jump to: navigation, search
(pam_mount installation)
 
Line 1: Line 1:
To have an encrypted home partition mounted automatically when logging in, you can use pam_mount. It will mount your /home (or whatever mount point you like) when you log in using your login manager or when logging in on console. As a requirement the crypted drive's passphrase has to be the same as your user's linux password.
+
To have an encrypted home partition mounted automatically when logging in, you can use pam_mount. It will mount your /home (or whatever mount point you like) when you log in using your login manager or when logging in on console. The encrypted drive's passphrase should be the same as your linux user's password, so you don't have to type in two different passphrases to login.
  
 
==General Setup==
 
==General Setup==
Line 7: Line 7:
  
 
Insert a new line at the end of the file, but '''before''' the last closing tag, ''</pam_mount>''.
 
Insert a new line at the end of the file, but '''before''' the last closing tag, ''</pam_mount>''.
Replace USERNAME with your linux-username and sdaX with the corresponding device. Add mount options, if needed.
+
Replace  
 +
*USERNAME with your linux-username
 +
*sdaX with the corresponding device.
 +
 
 +
Add mount options, if needed.
  
 
{{File|name=/etc/security/pam_mount.conf.xml|content=
 
{{File|name=/etc/security/pam_mount.conf.xml|content=
<!--
 
Added 03/16/11
 
-->
 
 
 
<volume user="USERNAME" fstype="crypt" path="/dev/sdaX" mountpoint="/home" options="fsck,noatime" />
 
<volume user="USERNAME" fstype="crypt" path="/dev/sdaX" mountpoint="/home" options="fsck,noatime" />
 
<mkmountpoint enable="1" remove="true" />
 
<mkmountpoint enable="1" remove="true" />
 
<!--
 
end of changes
 
-->
 
  
 
</pam_mount>
 
</pam_mount>
Line 28: Line 24:
 
In general, you have to edit the corresponding file in /etc/pam.d . After adding some lines, pam_mount will be called on login. The correct order of entries in each file is important.
 
In general, you have to edit the corresponding file in /etc/pam.d . After adding some lines, pam_mount will be called on login. The correct order of entries in each file is important.
  
===[[Slim]]===
+
=== [[Slim]] ===
  
 
{{File|name=/etc/pam.d/slim|content=
 
{{File|name=/etc/pam.d/slim|content=

Revision as of 14:30, 17 March 2011

To have an encrypted home partition mounted automatically when logging in, you can use pam_mount. It will mount your /home (or whatever mount point you like) when you log in using your login manager or when logging in on console. The encrypted drive's passphrase should be the same as your linux user's password, so you don't have to type in two different passphrases to login.

General Setup

  1. Install pam_mount from the AUR: [1]
  2. Edit /etc/security/pam_mount.conf.xml as follows:

Insert a new line at the end of the file, but before the last closing tag, </pam_mount>. Replace

  • USERNAME with your linux-username
  • sdaX with the corresponding device.

Add mount options, if needed.

Template:File

Login Manager Configuration

In general, you have to edit the corresponding file in /etc/pam.d . After adding some lines, pam_mount will be called on login. The correct order of entries in each file is important.

Slim

Template:File