public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Where does sudo get the PATH ?
@ 2012-10-08 14:20 Nicolas Richard
  2012-10-09  5:11 ` J. Roeleveld
  2012-10-23  9:26 ` Nicolas Richard
  0 siblings, 2 replies; 13+ messages in thread
From: Nicolas Richard @ 2012-10-08 14:20 UTC (permalink / raw
  To: gentoo-user

Hi everybody,

I don't understand where sudo finds the value for the PATH env variable.

Here is the output of the relevant (at least I thought they were)
commands. Can somebody explain to me why I still  have
/usr/local/texlive/*2011*/bin/i386-linux in the first sudo output ? I
don't get it, and did not find anything in the man page of sudo.

Thanks in advance for your help.

youngfrog@geodiff-mac3 ~ $ bash -c 'echo $PATH'
~/bin/overrideglobal:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.5.4:/usr/games/bin:/usr/local/texlive/2012/bin/i386-linux:~/bin

youngfrog@geodiff-mac3 ~ $ source /etc/profile

youngfrog@geodiff-mac3 ~ $ bash -c 'echo $PATH'
/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.5.4:/usr/games/bin:/usr/local/texlive/2012/bin/i386-linux

youngfrog@geodiff-mac3 ~ $ sudo bash -c 'echo $PATH'
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/usr/local/texlive/2011/bin/i386-linux

youngfrog@geodiff-mac3 ~ $ sudo -i bash -c 'echo $PATH'
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.5.4:/usr/local/texlive/2012/bin/i386-linux:/root/bin

youngfrog@geodiff-mac3 ~ $ sudo grep -r texlive/2011 /etc

youngfrog@geodiff-mac3 ~ $ sudo grep -r texlive/2011 ~root
/root/.bash_history:cd /usr/local/texlive/2011
/root/.bash_history:grep texlive/2011 * -r
/root/.bash_history:grep texlive/2011 . -r
/root/.bash_history:grep texlive/2011 .* -r

youngfrog@geodiff-mac3 ~ $ grep -v '^#\|^$' /etc/environment
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.5.3:/usr/local/texlive/2012/bin/i386-linux:/root/bin

-- 
N.R.



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-10-23  9:28 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-08 14:20 [gentoo-user] Where does sudo get the PATH ? Nicolas Richard
2012-10-09  5:11 ` J. Roeleveld
2012-10-09 15:03   ` [gentoo-user] " Nicolas Richard
2012-10-10  9:49     ` J. Roeleveld
2012-10-10  9:50     ` J. Roeleveld
2012-10-10 14:57       ` Nicolas Richard
2012-10-10 18:43         ` Joost Roeleveld
2012-10-11 14:25           ` Nicolas Richard
2012-10-11 16:24             ` Pandu Poluan
2012-10-11 16:50               ` Nicolas Richard
2012-10-11 17:24                 ` Pandu Poluan
2012-10-12  8:55                   ` Nicolas Richard
2012-10-23  9:26 ` Nicolas Richard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox