who called sudo ?
dave selby
dave6502 at googlemail.com
Sat Mar 15 13:30:31 UTC 2008
A huge THANK YOU
Dave
On 15/03/2008, Raj Kiran Grandhi <grajkiran at gmail.com> wrote:
> dave selby wrote:
> > Hi all,
> >
> > I am writing an install script that needs to be root, its started with
> >
> > sudo install.py
> >
> > It needs to know who was the user that executed 'sudo install.py' ...
> > any ideas how I get that info from the shell or sudo command ?
>
>
> import os
> print os.environ['SUDO_USER']
>
>
> --
> Raj Kiran Grandhi
> --
> At the source of every error which is blamed on the computer, you will
> find at least two human errors, including the error of blaming it on the
> computer.
>
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
--
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
More information about the ubuntu-users
mailing list