1

There are many solutions to encrypt an external disk. Unfortunately, they require me to type my long password every time I plug the disk, which is several times per day.

My special need: I don't want to enter a password each time I connect the disk

After initial setup, I would use it this way:

  1. Plug the disk to my Linux via USB.
  2. Linux somehow recognizes the disk, gets some key stored in my Linux home, use it to mount the disk. Within a few seconds, without asking me for anything.
  3. I can use the disk normally.

I am on Ubuntu, if that matters. Bonus if the password can be saved to a file, so that my disk content does not become unreadable forever if my PC is stolen.

2 Answers 2

3

You can use LUKS encryption for your external hard drive.

Anytime you plug in the drive, Ubuntu automonts the drive and directly asks for the password. Showing you an option when to forget it:

  • immediately
  • at the end of the session
  • never

--> looks like this:

unlock
Unlock dialog (source: gnu-designs.com; click image to enlarge)

9
  • Strange I don't remember seeing that option (I don't have any encrypted disk to check right now). Would you have a screenshot showing that popup? That would be a wonderfully simple solution, as I believe Ubuntu uses LUKS+ext4 by default for external encrypted disks :-)
    – Nicolas Raoul
    Jan 4, 2017 at 8:47
  • I'm at work, having my external hard drive at home, but it looks like this via
    – pLumo
    Jan 4, 2017 at 8:48
  • Same image I had found, but sonehow the website times out for me, and the name "gnu-designs.com" made me think it might be only mockups...
    – Nicolas Raoul
    Jan 4, 2017 at 8:52
  • I use it exactly that way and I can confirm that it works just perfect.
    – pLumo
    Jan 4, 2017 at 8:53
  • 1
    @VladislavRastrusny: First you need physical access to that computer, then you need the password for the User Account. That's a two-factor authentication. That is for most personal use cases enough security.
    – pLumo
    Jan 4, 2017 at 14:35
0

You could use TrueCrypt. This has a "cache passwords in memory" option, that will do this for you.

This is a cross-platform solution, so you can also easily then mount the drive on Windows, etc.

If you use the pre-boot authentication to encrypt your system drive, then you can even cache that password, so you never have to enter the password for external drives.

[Yes, I know Truecrypt is out of support, but it still works well enough for most purposes]

2
  • Thanks! Does it mount within a few seconds, without asking me for anything? Or do I have to run something after plugging the USB cable in?
    – Nicolas Raoul
    Jan 5, 2017 at 2:36
  • You can set it to auto-mount devices on connection.
    – xorsyst
    Jan 5, 2017 at 12:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.