-
-
Notifications
You must be signed in to change notification settings - Fork 983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Veracrypt 1.26.18 doesn't show admin/user password dialog for mounting container file on Linux Mint #1473
Comments
I've seen the same problem in Linux Mint 22.1 Cinnamon 6.4.6. However, I found a workaround by adding the parameter "--use-dummy-sudo-password" to the command line when launching VeraCrypt 1.26.18 from the GUI or terminal. In this case, after entering the volume password the user is presented with the "Administrator privileges required" prompt through which the user password may be provided. This results in the volume being mounted and dismounted correctly. Is this issue related to the recent change "* Simplify sudo session detection logic" ? Despite a potential workaround, I have reverted to version 1.26.14 pending more information. System Environment:
Desktop Environment: Cinnamon 6.4.6 |
Thank you for this detailed report. As indicated by @H-andy, using FYI, the new logic in 1.26.18 is based on I will install Linux Mint to investigate the reason. |
@PlayfulThomas @H-andy
the last echo statement should print 1 since no sudo session is active. But in Linux Mint, it prints 0. More over, sudo -n -l prints long text that is not printed on Ubuntu. There is clearly something wrong in sudo of Linux Mint because "man sudo" on it contains the following:
So the observed behavior of sudo -l on Linux Mint contradicts its own man documentation! To me, Linux Mint maintainers have done something to sudo that changed its behavior compared to its base distribution Ubuntu and going against sudo official documentation. This is strange and a little worrying. In my opinion, this behavior should be reported to Linux Mint maintainers to seek clarifications. |
I got the same "no admin/user password dialog"-issue with Debian 12, so this problem is not only affecting Linux Mint. |
@affe42 Can you please run the commands shown above in a new Terminal and report the result: echo should print 1 like the screenshot below taken on Debian 12: |
Below is a recording of a mounting a file container on Debian 12 that works as expected: Debian12-screen0.webmI'm really interested in knowing what is different in your case. On my Debian 12 system, sudo version is 1.9.13p3. |
Hi @idrassi It's like that (account / system name masked with XXXX):
And like others reported, reverting to previous version of VeraCrypt fixes the "no prompt"-problem. |
Thank you for sharing the results. This is intriguing because I cannot replicate the behavior on any Debian 12 image, including cloud environments like AWS and Azure. So there must be some non-standard configuration affecting the behavior of the After digging sudo source code and analyzing the Linux Mint sudo configuration, I identified the root cause: the presence of NOPASSWD rules in These NOPASSWD rules allow specific commands to be executed without requiring a password. When you run @affe42: Could you please check the contents of This explains why I’m unable to reproduce the behavior on my end. By default, there are no NOPASSWD rules in the configuration and I avoid using them in my setups. Unfortunately, the use of NOPASSWD rules breaks the new VeraCrypt implementation. Given this, I will revert the change as there doesn’t seem to be a viable alternative. For reference, here is the flow I extracted from the sudo source code. The presence of NOPASSWD rules falls under Case 2:
|
Copy of my comment on the Forum: Here some additional data to the issue: Debian 12 Debian 13 Linux Mint 21.1 #Debian 12:
#Debian 13:
#Linux Mint 21.1:
|
Thank you @morton-f for the information. This confirms my analysis of NOPASSWD effect. I just have a doubt about the output of commands you shared for Debian11/Debian12/Mint21.1 because all of them have exit code 0. I suspect that you had an active sudo session because on Debian without NOPASSWD, exit code is 1 when there is no active sudo session. Anyway, parsing files in /etc/sudoers.d in not possible without root privileges and I couldn't find a way to detect if a NOPASSWD rule is enabled. So, I will revert the change. |
"I just have a doubt about the output of commands you shared for Debian11/Debian12/Mint21.1 because all of them have exit code 0." |
On my system (LM 22.1, upgraded from 22.0), the relevant section says:
Nothing about the return value when run without a specific command. So it looks like not every LM has the same sudo. Running apt install sudo reports that it's already the latest version. If it matters, my system pulls from the Cogent mirror of the repositories rather than the "main" ones, although hopefully there's no discrepancy there. |
Linux Mint is using Ubuntu sudo man pages as well as other related to sudo files. sudo man pages were edited between realeses, your is 24.04 LTS, see https://manpages.ubuntu.com/manpages/noble/man8/sudo.8.html |
Compiled from git and resulting VeraCrypt 1.26.19 was flawless on Linux Mint 21.2. |
Thank you @morton-f for the confirmation. I will publish new release with this change. |
Hi, I have the problem with Linux Mint 21.3 Mate, based on Ubuntu 22.04, and Veracrypt 1.26.18 (installed from https://launchpad.net/veracrypt/trunk/1.26.18/+download/veracrypt-1.26.18-Ubuntu-22.04-amd64.deb). I use GUI version only. Note that I don't use Linux Mint sudo, but "sudo1.9.16p2" downloaded from sudo.ws website, https://github.com/sudo-project/sudo/releases/download/SUDO_1_9_16p2/sudo_1.9.16-3_ubu2204_amd64.deb. Here is the output of my "sudo -n -l" command: Entrées Defaults correspondant pour username sur computername : Paramètres par défaut de runas ou spécifiques aux commandes pour username : L'utilisateur username peut utiliser les commandes suivantes sur computername : Here is the corresponding extract of "man sudo": So, I am not sure the problem comes from "Linux Mint sudo". Finally, note that sudo should not be used to launch graphics applications, but commands only. Graphics applications needing super-user privileges should be launched with pkexec command. Without an available polkit policy, you can use a pseudo one, replace "sudo" by "pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY". Regards, MN PS: @H-andy, thanks for the workaround, it does work. |
Thank you @MikeNavy for the feedback. As indicate above, the issue is linked to the presence of NOPASSWD rules that affects the behavior of sudo, so it is not specific to Mint: it just happens that Mint uses NOPASSWD rule to allows anyone to run updates without authentication. VeraCrypt doesn't use sudo for GUI: sudo is used to spawn a CLI only veracrypt process to manage privileges actions. But indeed, using pkexec could be a better alternative to request credential when VeraCrypt GUI is used while sudo remain for VeraCrypt CLI scenarios. I will look how complex is it to integrate pkexec support while keeping sudo for CLI and as fallback if pkexec is not available. PS: there is an old issue about removing admin prompt and the idea is to use a daemon that will run in the background and which VeraCrypt client process will call to perform mount/dismount. This will replicate the behavior on Windows and macOS where no admin password is requested. see #496. This is also something that is worth looking at. |
I'm a Linux Mint user and considered opening an issue for this, glad to see that someone already did! Hope it get fixed soon. |
@idrassi Do you think this contradiction(?) between man document and behavior caused by NOPASSWD usage should still be reported to LM maintainers? |
This error is also present on OpenSuse Leap 15.6 |
Broken on KDE Neon 6.2 too. The only way I could get out of the infinite loop was to force-terminate VeraCrypt. |
Version 1.26.20 that fixes this issue is in the process of being released. Linux packages are already available on Sourceforge at https://sourceforge.net/projects/veracrypt/files/VeraCrypt%201.26.20/Linux/ |
version 1.26.20 has been published on Github: https://github.com/veracrypt/VeraCrypt/releases/tag/VeraCrypt_1.26.20 |
is there an easy way to revert to a previous version of veracrypt ? :-) ...my system: ps. I have a script that I run on the LAN to mount drives and so far it has worked fine but now I have a problem and have to do it manually. ..... OK / Github / version: VeraCrypt_1.26.20 / deb working ! :-) |
A heart-felt Thank You for the quick fix (and from the release here to availability in the PPA was super fast too). I originally thought I had upgraded Mint 22.0 to 22.1 without changing the VeraCrypt version, and since Mint changed the dialog style and method with 22.1, I assumed it must have been an issue with that. I actually got VeraCrypt 1.26.18 to mount volumes on the new Mint, showing the new-style dialog - but I couldn't reproduce how I tricked it into doing so, thus I didn't post a report here... |
Expected behavior
After showing dialog to enter file container password for decrypting, Veracrypt should display a dialog to enter admin/user password for mounting decrypted file.
Observed behavior
Veracrypt doesn't show admin/user password dialog at all, but instead shows processing symbol for few seconds, possibly trying to mount decrypted container file, and then displays error message like "Unable to gain administrator privileges". After this, it keeps trying again to mount, but fails again with same error message.
Steps to reproduce
Environment
This behaviour has been tested on following OS - installer combinations
("Works" meaning Veracrypt is functioning as it should)
VeraCrypt version:
1.26.18
Operating system and version:
System type:
64-bit
The text was updated successfully, but these errors were encountered: