[sudo-users] enforcing "sudo -i"

Grant Taylor gtaylor at tnetconsulting.net
Thu Aug 8 16:22:53 MDT 2019

On 8/8/19 10:54 AM, Michael W. Lucas wrote:
> Is there a reasonable way to ensure that users always use "sudo -i"?

I don't know if there is a way that sudo can do this itself per say. 
But I know a guy....

If I needed to do something like that, I'd be tempted to create a 
wrapper script named sudo that is earlier in the PATH and / or rename 
the sudo binary.  The idea being that the wrapper script run the real 
sudo binary with the -i flag.

Maybe I should ask said guy if there are any down sides to having -i be 
used for all sudo commands.

Grant. . . .
unix || die

More information about the sudo-users mailing list