You are not logged in.

#1 2015-08-03 18:06:59

KeNaCo
Member
Registered: 2012-11-01
Posts: 18

dm-crypt, pam, decrypt at login

Hi, I need help with my encryption-mount at login. I have encrypted only /home partition, and actualy decrypt it during boot, but this is not really comfort solution for me.
I also read https://wiki.archlinux.org/index.php/Dm … ile_system and https://wiki.archlinux.org/index.php/Pam_mount but obviously I do something wrong.

What should I change and what to keep or what else to setup?
Actual configuration:

/etc/fstab

# /dev/sda3
UUID=91d3b517-3573-43cb-894d-67aa581ce6cd    /             ext4          rw,relatime,data=ordered    0 1

# /dev/sda1
UUID=4530-8B0D          /boot         vfat          rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro    0 2

# /dev/mapper/home
UUID=b51fdbdf-9dd8-4805-9930-b54a7d2906f2    /home         ext4          rw,relatime,data=ordered    0 2

# /dev/sda2
UUID=2e239cac-d3b2-4465-a8ff-9fafbbae7ad1    none          swap          defaults      0 0

# /dev/media/kenaco.dev
root@kenaco.dev:/root    /home/kenaco/dev/kenaco.dev    fuse.sshfs    noauto,_netdev,users,idmap=user,IdentityFile=/home/kenaco/.ssh/id_rsa,allow_other,reconnect,transform_symlinks,follow_symlinks    0    0

# /dev/media/kenaco-docker.dev
root@kenaco-docker.dev:/root    /home/kenaco/dev/kenaco-docker.dev    fuse.sshfs    noauto,_netdev,users,idmap=user,IdentityFile=/home/kenaco/.ssh/id_rsa,allow_other,reconnect,transform_symlinks,follow_symlinks    0    0

/etc/crypttab

# crypttab: mappings for encrypted partitions
#
# Each mapped device will be created in /dev/mapper, so your /etc/fstab
# should use the /dev/mapper/<name> paths for encrypted devices.
#
# The Arch specific syntax has been deprecated, see crypttab(5) for the
# new supported syntax.
#
# NOTE: Do not list your root (/) partition here, it must be set up
#       beforehand by the initramfs (/etc/mkinitcpio.conf).

# <name>       <device>                                     <password>              <options>
# home         UUID=b8ad5c18-f445-495d-9095-c9ec4f9d2f37    /etc/mypassword1
# data1        /dev/sda3                                    /etc/mypassword2
# data2        /dev/sda5                                    /etc/cryptfs.key
# swap         /dev/sdx4                                    /dev/urandom            swap,cipher=aes-cbc-essiv:sha256,size=256
# vol          /dev/sdb7                                    none

/etc/mkinitcpio.conf

...
HOOKS="base udev autodetect modconf block encrypt filesystems keyboard fsck"
...

/etc/default/grub

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda4:home"

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable Hidden Menu, and optionally hide the timeout count
#GRUB_HIDDEN_TIMEOUT=5
#GRUB_HIDDEN_TIMEOUT_QUIET=true

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

#GRUB_SAVEDEFAULT="true"

This is first time I care about some safety of my data. Thank you.

Offline

Board footer

Powered by FluxBB