I am trying to run a script that auto mounts drives into my system. It uses sudo with -A
flag to use a gui askpass to get the user pass but fails to do so. I am sure different programs like GnuPG for example has such an app. There is a place in sudo.config file for such a thing. But I am not sure which program should I install ans how to use it to solve this problem.
The easy answer is to use pkexec
instead of sudo
1 Like
I’m using kde so, I’m just using kdialog
since I already have it. In order to make it work, I needed to write a short script that contains
#!/bin/bash
kdialog --title "This Action Requires Root Permissions" --password "Password Please"
Then inside of /etc/sudo.conf
You should include a line that looks like this
Path askpass /path/to/script
At least this is how I setup a custom askpass program.
The should be something similar in XFCE. This is what Thunar shows me when I try to open a folder in it with root access. I just don’t know its name.
It’s called pkexec
.
1 Like