On Sat, Aug 26, 2023 at 09:32 Roberto C. Sánchez <robe...@debian.org> wrote:
> On Sat, Aug 26, 2023 at 09:25:10AM -0500, Tom Browder wrote: > > In a previous thread it was shown how to detect a SUDO_USER in a bash > > shell. > > Is there a way to distinguish whether 'sudo -i' was used or not? I would like to know whether 'sudo -i' or 'sudo -s' was used. The reason is to know if the cwd is set to '/root' or '.' It's critical for the script execution -Tom