Am 26.08.2023 um 16:25 schrieb Tom Browder:
> Is there a way to distinguish whether 'sudo -i' was used or not?
> 
Sorry, i am not an expert on this. But ... since years i am using this
to check for it:

> # if `echo $HOME` is not "/root" or the working dir (pwd) is not "/root", 
> then this was not executed with "sudo -i"
>               assert "echo $HOME" /root "nicht mit sudo -i aufgerufen"
>               assert pwd /root "nicht mit sudo -i aufgerufen"

hope, this will give you a clue ;-)
DdB

Reply via email to