Created
December 13, 2022 00:09
-
-
Save tegila/04af8df8c03f52fee8dc3a41e633fb2a to your computer and use it in GitHub Desktop.
loop luks pam_mount
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
truncate -s 1G ~/.priv | |
cryptsetup luksFormat ~/.priv | |
sudo cryptsetup luksOpen ~/.priv priv | |
sudo mkfs.ext4 /dev/mapper/priv | |
sudo cryptsetup luksClose priv | |
/etc/security/pam_mount.conf.xml: | |
<volume path="~/.priv" mountpoint="~/priv" /> | |
# right after where it says <!-- Volume definitions --> | |
/etc/pam.d/system-login: | |
auth optional pam_mount.so | |
session optional pam_mount.so | |
https://askubuntu.com/questions/1020390/how-do-i-auto-mount-luks-partition | |
https://wiki.gentoo.org/wiki/Pam_mount |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment