6 ms·
There's a "secure path" option in sudoers that you can use to add additional directories to the path that is searched when sudo is invoked. Most examples will
by smhenderson 4y ago
There's a "secure path" option in sudoers that you can use to add additional directories to the path that is searched when sudo is invoked.
Most examples will include the standard user path plus /sbin and /usr/sbin but you can add any directories you want to the option.
- mekster 4y agoIsn't that for executing than autocompleting?
- smhenderson 4y agoYes, that's correct, it's only about searching the right directories to find and execute the program you asked for. But autocomplete after sudo doesn't work for me on a stock Debian install anyway, not sure what one needs to do to get around that. I don't really rely on it. If I'm doing enough work that needs root I start the session with "sudo su -" anyway so not having autocomplete after sudo is not a big deal for me.