zlacker

[parent] [thread] 4 comments
1. mekste+(OP)[view] [source] 2022-05-11 11:25:45
Don't you need sbin in PATH anyway when you want to run them with sudo?
replies(2): >>smhend+sq >>robone+YV
2. smhend+sq[view] [source] 2022-05-11 13:55:00
>>mekste+(OP)
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.

replies(1): >>mekste+8s
◧◩
3. mekste+8s[view] [source] [discussion] 2022-05-11 14:03:15
>>smhend+sq
Isn't that for executing than autocompleting?
replies(1): >>smhend+wa1
4. robone+YV[view] [source] 2022-05-11 16:08:43
>>mekste+(OP)
What if I want to run fsck on a drive image owned by my user? If I can run /sbin/fsck, I can rightly run that on such a file without using sudo.
◧◩◪
5. smhend+wa1[view] [source] [discussion] 2022-05-11 17:08:12
>>mekste+8s
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.

[go to top]