2013-09-19

How to unlock encrypted file system on Linux automatically


  1. create a keyfile with random content
  2. $ sudo su -
    $ dd if=/dev/random of=/root/keyfile bs=1024 count=4
  3. Add the file to LUKS
  4. $ cryptsetyp luksAddKey /dev/sdb1 /root/keyfile
  5. Edit /etc/crypttab
  6. $ sdb1_crypt /dev/sdb1 /root/keyfile luks
  7. Edit /etc/fstab
  8. /dev/mapper/sdb1_crypt /media/Repository ext4 defaults 0 2
  9. Reboot or Remount

No comments:

Post a Comment