who called sudo ?

Padraig padraigrorry at gmail.com
Sat Mar 15 19:09:59 UTC 2008


On Sat, Mar 15, 2008 at 11:02 AM, Derek Broughton <news at pointerstop.ca>
wrote:

> Karl Larsen wrote:
>
> > dave selby wrote:
> >>
> >> 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 ?
> >>
> >     If it is an install script there is no user identified so sudo can't
> > work. You need to figure out what your going to use this for and make
> > sure it can be used.
>
> Clearly not true:
>
> $ sudo -i
> root at bella:~# echo $SUDO_USER
> derek
>
> As for what you might use it for, I can imagine countless situations. Say
> you want to install a product with an "initial user" - who better to make
> the initial user than the actual person who does the install, who clearly
> has the privilege to set themselves up, anyway, and is also the only
> account you can immediately tell ever gets used.
>
> Karl, don't automatically assume the poster doesn't have a clue.


Anyone, I repeat _anyone_, that listens to a word Karl says would be well
advised to seek a second opinion.  He's a troll that has on numerous
occasions given people malicious information.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20080315/ff4fead6/attachment.html>


More information about the ubuntu-users mailing list