D
djbitchpimp
How do I retrieve the username of the currently logged in user? I
basically to check if the user is logged in as root and if not, exit
the program.
I though about using the LOGNAME environment variable, but if a regular
user used su root, the environment variable still has the user's login
name.
basically to check if the user is logged in as root and if not, exit
the program.
I though about using the LOGNAME environment variable, but if a regular
user used su root, the environment variable still has the user's login
name.