October 16

Ubuntu: Autologin to an encrypted drive on startup

Make certain that you understand the security implications of using auto login on an encrypted drive.

Part 1: Encrypt the secondary drive.

  1. In the Unity dash type “disks” and hit enter.
  2. Below “Devices” click on the hard drive you want to encrypt.
  3. Below “Volumes” click on the cog/more actions button.
  4. Click “Format Volume”. For type, choose “Encrypted, compatible with Linux systems.” Name your drive and give it a strong pass phrase.
  5. Click “Format”

 

Part 2: Automatically mount the HDD on system start-up.

  1. Keep the “Disks” application open, and click on the cog.
  2. Click “Edit Encryption Options.”
  3. “Automatic Encryption Options” will be turned on, and the menu below greyed out. Turn automatic encryption options off.
  4. Enter the pass phrase from when you formatted the disk. Click “Ok”.

You now have an encrypted hard drive that will automatically login when your computer boots.

By: Tryion

Automount your encrypted drive:
If you want to have your encrypted volume automount you can do the following:

1. Create a directory on your drive that you want to mount: mkdir /media/datavolume
2. Type: cat /etc/crypttab
2. Look for the LUKS UUID.  eg: luks-3d22f21c-22bc-2bb4-7be3-2bc1121a02d73
3. Using your newly discovered encrypted volume ID, add the following to your fstab file:
4. /dev/mapper/luks-3d22f21c-22bc-2bb4-7be3-2bc1121a02d73      /media/datavolume      ext4      defaults      0      2

By: Timothy Conrad


Copyright 2021. All rights reserved.

Posted October 16, 2017 by Timothy Conrad in category "Linux", "Security

About the Author

If I were to describe myself with one word it would be, creative. I am interested in almost everything which keeps me rather busy. Here you will find some of my technical musings. Securely email me using - PGP: 4CB8 91EB 0C0A A530 3BE9 6D76 B076 96F1 6135 0A1B