On 3/19/09, Marc Wäckerlin <marc@xxxxxxxxxxxxxx> wrote: > Hi > > How can I find out which key slot was used to decrypt > mounted partition? Capture the output of cryptsetup luksOpen .... $> cryptsetup luksOpen /dev/sys/test test Enter LUKS passphrase: key slot 0 unlocked. $> But, given your use case outlined below, you'll have to modify your distro's decrypt script(s) in initramfs, and then somehow retain the information for your DE startup routine. If there is another way to find the open LUKS slot, I'd like to hear it also. > It's the following use case: > * I have three users on a notebook. > * Each has his own password for LUKS: > * User1: Key-Slot 1 > * User2: Key-Slot 2 > * User3: Key-Slot 2 > * Now I want a script to find out, which user decrypted > the drive (and is therfore sitting in front of the > laptop). > * With this knowledge, I want to autologon the user that > decrypted the hardisk to the desktop. > > This way, the user only needs to give his password (the > luks-password) once and does not have to choose his username > and password on KDM/GDM login screen. > > Any idea? I didn't find anything, neither in the manpage, > nor with cryptsetup status, nor in /proc nor /sys, nor with > Google. > > Thank you > Regards > Marc --------------------------------------------------------------------- dm-crypt mailing list - http://www.saout.de/misc/dm-crypt/ To unsubscribe, e-mail: dm-crypt-unsubscribe@xxxxxxxx For additional commands, e-mail: dm-crypt-help@xxxxxxxx