[xubuntu-users] Detecting login name after su

Peter Flynn peter at silmaril.ie
Sat Oct 5 20:39:11 UTC 2013


On 10/05/2013 05:14 PM, Joshua O'Leary wrote:
> You could pass the username as a parameter to the script at runtime:
> myscript.sh `whoami`

But the script is being run automatically as root, after sudo su -, so
whoami would always return root.

///Peter





More information about the xubuntu-users mailing list