Menu

Auto-prompt for password when USB is plugged in?

2020-03-04
2020-03-08
  • skroderider

    skroderider - 2020-03-04

    I have a Veracrypt encrypted volume on a USB drive (as a file on it, not the entire drive). What I am ideally looking for is when I plug in the USB drive, Veracrypt should attempt to mount the volume and ask me for the password. Is there a way to do this either via some setting or by using CLI commands?

    I'm on Ubuntu 18.04.4 LTS.

     
  • skroderider

    skroderider - 2020-03-05

    Should this post be in the "Technical Topics" forum?

     
  • Adrian Kentleton

    AFAIK, in Linux there is no option to mount favorite volumes when its host device gets connected (as there is in Windows).

    A simple shell script, located on your desktop, would enable you to mount the volume after you plug the USB drive in. Something like:

    #!/bin/bash
    veracrypt /pathtoyour/usbdrive/wheninserted /pathto/mountpoint
    

    Save the script as eg mountvol.sh, and make it executable.

    Post back if you need me to provide more details!

     
    👍
    1
  • skroderider

    skroderider - 2020-03-08

    Thanks a lot. I have set this to trigger when the USB drive is mounted. That solves my use case.

     

Log in to post a comment.

MongoDB Logo MongoDB