So I have multiple hard drives encrypted with the same password and instead of having to enter it multiple times I’d like to have it set up so that after booting I automatically get a password-box displayed into which I enter the password once and which then mounts all the encrypted hard drives and securely removes the password from cache/memory afterwards.
Can this be done somehow? If it’s not possible via the GUI maybe via a script? I’m using Debian 9.1 with KDE.
This script works:
read -s password echo $password | sudo veracrypt --text --mount --stdin --non-interactive /dev/sdb /mount/drive_b echo $password | sudo veracrypt --text --mount --stdin --non-interactive /dev/sdc /mount/drive_c ...etc password=00000000000000000000
I’m not sure how secure this is but better than using the –password option since that shows up in
The “Auto-Mount Devices” feature is still available, at least in VeraCrypt 1.21.
There is a button available in the UI, or the following command will ask for the password/keyfiles/PIM once, and automatically mount multiple volumes, if they exist:
"VeraCrypt.exe" /auto devices /history n /cache n /quit
In TrueCrypt this WAS possible. If, for instance, 4 volumes are loaded at logon and these volumes have the same password, then the password only needs to be filled out once in the text box. Obviously this feature has delibarately been removed with VeraCrypt. I do not understand why, because if you want to avoid this behaviour you can give your volumes different pass words.
I find this so unhandy that I decided to stay with TrueCrypt, despite the security risks.
What I do is have a bat file that runs on startup for my PC that waits for the 2nd and 3rd drive to be mounted on my system then wipes the cache using the command line, you can then use a 3rd program to hide the command prompt if you like, example:
The batch file loops adding 1 every ten seconds to a variable, if it ever gets to 60 (600 seconds give or take) the bat file closes so it doesn’t run in the background forever.
DriveExists.txt text file doesn’t even need anything in it, it just needs to exist.
@echo off echo this window will close when the H and J drives exists set LoopCount=1 :waitLabel IF not exist H:\DriveExists.txt ( timeout 10 /nobreak > nul set /a LoopCount=%LoopCount%+1 if %LoopCount% equ 60 ( goto endOfScriptLabel ) goto waitLabel ) echo past H set /a LoopCount=0 :waitLabelTwo IF not exist J:\DriveExists.txt ( timeout 10 /nobreak > nul set /a LoopCount=%LoopCount%+1 if %LoopCount% equ 60 ( goto endOfScriptLabel ) goto waitLabelTwo ) echo past J REM the following if is only to indent the items run after mounting volumes IF exist H:\DriveExists.txt ( REM other code removed for example. cd C:\Program Files\VeraCrypt veracrypt /w ) :endOfScriptLabel @echo on