title: How do I get the users real uid if the program is run with sudo?
body: <p>The program I am running needs root privledges and therefore is run with <code>sudo</code>, but it also needs to know what user is running it. <code>getuid</code> and <code>geteuid</code> both return <code>root</code>. How do I get the actual users username (or uid)?</p>
  
  <p>Thanks!</p>