# haalp! cant get pam_mount to work anymore..

## dirtbag

ive found https://bugs.gentoo.org/show_bug.cgi?id=318865

but still cant figure out whats wrong.. im trying to automount my dm_crypted home directory image when I login.

*  sys-fs/cryptsetup

      Latest version available: 1.1.2

      Latest version installed: 1.1.2

*  sys-auth/pam_mount

      Latest version available: 2.1

      Latest version installed: 2.1

in my  /etc/security/pam_mount.conf.xml (im not sure if its right) , I have 

<luserconf name=".pam_mount.conf.xml" />

-->

<volume user="jason"

path="/home/jason_crypt/jason.img"

mountpoint="/home/jason"

fstype="crypt"

fskeypath="/home/jason_crypt/jason.key"

fskeycipher="aes-256-cbc" />

<!-- Note that commenting out mntoptions will give you the defaults.

but when I try to login, I get 

zim login: jason

pam_mount(rdconf1.c:1325): Volume /home/jason_crypt/jason.img: consider specifying the fskeyhash

pam_mount password:

Last login: Tue Jun 22 11:28:09 EDT 2010 on tty1

pam_mount(rdconf1.c:1325): Volume /home/jason_crypt/jason.img: consider specifying the fskeyhash

pam_mount(mount.c:64): Errors from underlying mount program:

pam_mount(mount.c:6 :Cool: : crypt_activate_by_passphrase: Operation not permitted

pam_mount(pam_mount.c:520): mount of /home/jason_crypt/jason.img failed

if I go back down to pam_mount 1.3.3, i get 

zim ~ # mount -t crypt /home/jason_crypt/jason.img /home/jason

Password: 

No key available with this passphrase.

zim ~ # 

-db

----------

## dirtbag

Old key suffered from the newline problem (see doc/bugs.txt),

subsequently fixed and replaced by more secure cipher.

openssl aes-256-ecb -d old.key | perl -pe 's{\n}{}gs' | openssl aes-256-cbc >new.key

and adjusted my /etc/security/pam_mount.conf.xml accordingly for the new cipher.

-db

----------

