svendahlstrand/supervision — Issue #2: Should know original users home directory when ran as sudo
Author: svendahlstrand
Created: 2012-01-06 23:07:30+00:00
State: open

supervision won't work in a system that don't keep the $HOME environment variable when a user runs sudo. The solution:

who am i | awk '{print $1}'

http://stackoverflow.com/questions/4598001/how-do-you-find-the-original-user-through-multiple-sudo-and-su-commands