Nicolas Richard <theonewiththeevill...@yahoo.fr> wrote:

>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

Nicolas.

I can see several /usr/local/... paths in your /etc/environment.

--
Joost
-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

Reply via email to