Disable password for program operation

My VeraCrypt encryption program keeps asking for the password, and it happens twice.
How can I disable the password request for this veracrypt program?

This is probably related to the mount, which requires a password.

# nano /etc/sudoers

add line:

$YOURUSERNAME ALL=NOPASSWD: /usr/bin/veracrypt, /usr/bin/uptime

Friendly reminder: Wrong syntax in sudoers break your system.

1 Like

visudo ā€” edit the sudoers file :slight_smile:


That will disable the password check completely, did I understand that correctly?

On my system VeraCrypt requires me to enter the password everytime I attempt to mount. Is there a way to have VeraCrypt (or any program) to ask only once per session or per program run?

Iā€™m not entirely sure, but I think a while ago VeraCrypt only required to enter the password once instead of every time one opens a container.

Why did you add the "uptime command as well?

It is needed since 1.24 somethingsomething (AFAIK the reason you get the prompt a 2nd time).

1 Like