1. Create a keyfile.
sudo dd if=/dev/urandom of=/root/keyfile bs=1024 count=4
2. Set keyfile permissions.
sudo chmod 0400 /root/keyfile
3. Adding keyfile to LUKS.
sudo cryptsetup luksAddKey /dev/sdb1 /root/keyfile
4. Get the UUID of LUKS partition.
sudo cryptsetup luksUUID /dev/sdb1
5. Edit crypttab file.
sudo pluma /etc/crypttab
6. Add this line to the crypttab file.
Documentos /dev/disk/by-uuid/"YOUR_DISK_UUID" /root/keyfile luks
7. Edit fstab file.
sudo pluma /etc/fstab
8. Add the mount point to FSTAB.
/dev/mapper/Documentos /media/debian/Documentos ext4 defaults 0 2
No comments
Post a Comment