I am using the system as "user1" and I sudo as different user say "sudo -u user2 sbsh" and the execute a perl script.
Is there a way to get the "user1" in the script I am running ?
I used ENV{'USER'}. but it is giving "user2". 'SUDO_USER' is also not working.