If I create the script /root/bin/whoami.sh
containing:
#!/bin/bash
whoami
and this script is called by a user with a properly configured sudo, it will indicate
root
Is there a fast way to obtain the actual user in a script, or will I have to resort to parameters passing along this username?