When I use e.g. firewall-cmd, which correctly needs root privileges to execute, I get prompted in a window (so not in the terminal as with sudo) to give my password when I try to autocomplete an option (e.g. write "--perm" and hit TAB). This happens every time I use autocompletion, even if I already entered my password before and/or ran a command with sudo (which is configured to not prompt me a second time for a certain time).
Is there any way to either make entering the password permanent for a certain time or complete disable authentication for mere autocompletion (I still want authentication for actually running the program)?
The obvious solution is to login as root (use su or sudo -i), but I'd like to avoid doing that.
I am using bash and my
.bashrc sources the standard
bash_completion file shipped with the
bash-completion package in Debian.
I can reproduce this with just
. /etc/bash_completion in my
complete -p firewall-cmd results in
bash: complete: firewall-cmd: no completion specification
The reason I thought polkit was involved (see original tags) is, that when I abort the authentication dialogue I get the following on stdout:
Authorization failed. Make sure polkit agent is running or run the application as superuser.