[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: setting path for root after "sudo su" and "sudo" for Debian Bullseye (11)



On Thu, May 19, 2022 at 06:03 Greg Wooledge <greg@wooledge.org> wrote:
On Thu, May 19, 2022 at 05:47:29AM -0500, Tom Browder wrote:
>     $ sudo su
>     # ./myprog install

Again, there's no reason to use both "sudo" AND "su".  Just "sudo -s"
would give you the interactive root shell, without changing directory.

I feel like you're doing "sudo su" out of some bad habit that you've
developed.  You'd be doing yourself a favor if you retrain yourself
to use "sudo -s" instead.

Greg, I think I need to change the paths in the sudoer file. I just tried the "sudo -i" and sudo -s" incantations on my script and they still don't have the needed path component.

I use the "/etc/sudoers.d" directory with my "username-sudoer" file under it. Is that file a place where I could affect the path with some kind of bashism?

-Tom

Reply to: