Re:Understanding the bin, sbin, usr/bin, usr/sbin split (2010)
by mekster on Wednesday May 11, 2022 @07:25AM
(#31338339)
Don't you need sbin in PATH anyway when you want to run them with sudo?
[ Parent
| on HN ]
Re:Understanding the bin, sbin, usr/bin, usr/sbin split (2010)
by smhenderson on Wednesday May 11, 2022 @09:55AM
(#31339979)
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.
Re:Understanding the bin, sbin, usr/bin, usr/sbin split (2010)
by mekster on Wednesday May 11, 2022 @10:03AM
(#31340083)
Isn't that for executing than autocompleting?
Re:Understanding the bin, sbin, usr/bin, usr/sbin split (2010)
by smhenderson on Wednesday May 11, 2022 @01:08PM
(#31342835)
Yes, 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.