From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 1D2A2138010 for ; Wed, 10 Oct 2012 09:51:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DDAF921C01D; Wed, 10 Oct 2012 09:50:55 +0000 (UTC) Received: from smtpq1.gn.mail.iss.as9143.net (smtpq1.gn.mail.iss.as9143.net [212.54.34.164]) by pigeon.gentoo.org (Postfix) with ESMTP id DBAF621C00F for ; Wed, 10 Oct 2012 09:49:34 +0000 (UTC) Received: from [212.54.34.133] (helo=smtp2.gn.mail.iss.as9143.net) by smtpq1.gn.mail.iss.as9143.net with esmtp (Exim 4.71) (envelope-from ) id 1TLsv0-0004Ve-60 for gentoo-user@lists.gentoo.org; Wed, 10 Oct 2012 11:49:34 +0200 Received: from 54698b76.cm-12-2c.dynamic.ziggo.nl ([84.105.139.118] helo=data.antarean.org) by smtp2.gn.mail.iss.as9143.net with esmtp (Exim 4.71) (envelope-from ) id 1TLsuz-0006eb-0b for gentoo-user@lists.gentoo.org; Wed, 10 Oct 2012 11:49:34 +0200 Received: from localhost (localhost [127.0.0.1]) by data.antarean.org (Postfix) with ESMTP id F1DEA1D31 for ; Wed, 10 Oct 2012 11:50:12 +0200 (CEST) X-Virus-Scanned: amavisd-new at antarean.org Received: from data.antarean.org ([127.0.0.1]) by localhost (data.antarean.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kEjTkimJEYbS for ; Wed, 10 Oct 2012 11:50:11 +0200 (CEST) Received: from www.antarean.org (net.antarean.org [10.10.11.5]) by data.antarean.org (Postfix) with ESMTP id 448231CDA for ; Wed, 10 Oct 2012 11:50:11 +0200 (CEST) Received: from 62.132.204.84 (SquirrelMail authenticated user joost) by www.antarean.org with HTTP; Wed, 10 Oct 2012 11:50:10 +0200 Message-ID: In-Reply-To: <874nm38z6x.fsf@yahoo.fr> References: <878vbh82qs.fsf@yahoo.fr> <874nm38z6x.fsf@yahoo.fr> Date: Wed, 10 Oct 2012 11:50:10 +0200 Subject: Re: [gentoo-user] Re: Where does sudo get the PATH ? From: "J. Roeleveld" To: gentoo-user@lists.gentoo.org User-Agent: SquirrelMail/1.4.21 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 X-Priority: 3 (Normal) Importance: Normal Content-Transfer-Encoding: quoted-printable X-Ziggo-spambar: --- X-Ziggo-spamscore: -3.1 X-Ziggo-spamreport: BAYES_00=-1.9,RDNS_DYNAMIC=0.982,RP_MATCHES_RCVD=-2.141 X-Ziggo-Spam-Status: No X-Spam-Status: No X-Spam-Flag: No X-Archives-Salt: b1c05c09-e3d2-4549-9849-de0352bf5ccc X-Archives-Hash: b6abe4292730c74e0bb1d93650866c21 On Tue, October 9, 2012 5:03 pm, Nicolas Richard wrote: >>>>>> "Joost" =3D=3D J Roeleveld writes: > > Joost> Nicolas Richard wrote: > >> 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 outpu= t > > >> youngfrog@geodiff-mac3 ~ $ sudo bash -c 'echo $PATH' > >> /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/op= t/bin:/usr/local/texlive/2011/bin/i386-linux > > >> youngfrog@geodiff-mac3 ~ $ grep -v '^#\|^$' /etc/environment > >> PATH=3D/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 > > Joost> I can see several /usr/local/... paths in your > Joost> /etc/environment. > > > Hello Joost, > > Yes, I see them too, but they are pointing to the more recent 2012 > release of texlive, not the older 2011 one. What I don't understand is > where /sudo/ finds the environment when called without the "-i" option > (and in particular, that entry for texlive 2011). The manpage seems to > say that it simply uses the current environment (quoting the manpage : > "Note, however, that the actual PATH environment variable is not > modified and is passed unchanged to the program that sudo executes.") > but that does not seem right. And, what is in the .bash_profile and .bashrc files in your homedir and i= n root's homedir? --=20 Joost