veracrypt / VeraCrypt

Disk encryption with strong security based on TrueCrypt
https://www.veracrypt.fr
Other
6.98k stars 953 forks source link

VeraCrypt crashes when launched as another user #1436

Open theprivacydesigner opened 4 weeks ago

theprivacydesigner commented 4 weeks ago

Expected behavior

I’d like to launch VeraCrypt (on macOS) as another user (see below why). From Terminal I did su user, followed by /Applications/VeraCrypt.app/Contents/MacOS/VeraCrypt

Observed behavior

VeraCrypt crashes on launch.

Steps to reproduce

  1. Setup two accounts, one admin and one standard
  2. Log into the standard account
  3. From Terminal, execute:

    su admin

  4. Type your password, then:

    /Applications/VeraCrypt.app/Contents/MacOS/VeraCrypt

  5. App crashes on launch

Your Environment

Software versions

Why two users?

For security (see this guide), I mostly use my Mac from the standard account. And only log into my admin account for tasks like installing apps.

Why not launch VeraCrypt when you’re logged in as an admin?

I logged into the admin account to create a VeraCrypt partition on an external device (necessary since this operation asks for an admin password). Now I’d like to backup the standard user’s data to that encrypted partition. In order to mount the encrypted partition while logged in as the standard user, though, I’m asked for an admin password. The standard user doesn’t have admin rights and I thus need to type the admin’s password. Unfortunately, though, the VeraCrypt credentials prompt does NOT allow to specify which user (it only has a field for the password). Launching the app as the admin user would solve that — when the password dialog appears, I can type the admin’s password and proceed.

theprivacydesigner commented 3 weeks ago

For anyone having the same issue, a workaround is to use the command

This is how to mount a volume:

su admin
/Applications/VeraCrypt.app/Contents/MacOS/VeraCrypt -t --mount "/dev/diskXsY" /Volumes/Disk --pim 0 --keyfiles "" --protect-hidden no --verbose

And dismount:

su admin
/Applications/VeraCrypt.app/Contents/MacOS/VeraCrypt -t --dismount "/Volumes/Disk"