sudo env variables

From: Abanowicz Tomasz (abanowicztomek_at_wp.pl)
Date: 09/20/05


Date: Tue, 20 Sep 2005 16:07:13 GMT

Hi
I think my sodo works incorrectly.
My /etc/sodoers file looks like:

Defaults env_reset
Defaults:%users env_keep=DISPLAY
root ALL=(ALL) ALL
myuser myhost = NOPASSWD: /usr/bin/xterm

myuser belongs to users group.
When I start the xterm:

myuser $ sudo xterm

It launches the xterm as root but many environment variables are still
for myuser user:

# pwd
/home/myuser
# echo $HOME
/home/myuser

I expect DISPLAY variable to be preserved from myuser.

What's wrong with my sudo ?
thanx
-at



Relevant Pages

  • Re: Easy File Permissions
    ... installed and created the user root. ... me to create another user which I did, "myuser" and installation created the ... >> Looking at YaST I see if I go to Security and Users, ...
    (alt.os.linux.suse)
  • Re: Easy File Permissions
    ... > root group, so I'm confused as to why I can edit the file logged in ... > as myuser. ... program you're editing it with did *not* ask for root password at ... > about SETUID/GID so that might apply here but I haven't even went ...
    (alt.os.linux.suse)
  • Re: Easy File Permissions
    ... |on the directory is rwxr-xr-x owned by root and part of the root group, ... |I'm confused as to why I can edit the file logged in as myuser. ...
    (alt.os.linux.suse)
  • Re: help
    ... I'm creating a shell script ... > Inside of the script i would like to do some operations as root. ... running c.sh was myuser do the following: ... so i can again execute b.sh ...
    (comp.unix.shell)
  • help
    ... Inside of the script i would like to do some operations as root. ... run an script as myuser that does some tasks. ... so i can again execute b.sh ...
    (comp.unix.shell)