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 A1042138010 for ; Tue, 9 Oct 2012 15:05:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 57CB221C015; Tue, 9 Oct 2012 15:05:03 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id BD06121C023 for ; Tue, 9 Oct 2012 15:03:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 5103833D789 for ; Tue, 9 Oct 2012 15:03:51 +0000 (UTC) X-Virus-Scanned: by amavisd-new using ClamAV at gentoo.org X-Spam-Flag: NO X-Spam-Score: -1.246 X-Spam-Level: X-Spam-Status: No, score=-1.246 tagged_above=-999 required=5.5 tests=[AWL=-0.308, DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=1.2, RP_MATCHES_RCVD=-2.138, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=no Received: from smtp.gentoo.org ([IPv6:::ffff:127.0.0.1]) by localhost (smtp.gentoo.org [IPv6:::ffff:127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n5e-8Zz72cye for ; Tue, 9 Oct 2012 15:03:45 +0000 (UTC) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9F71C335E33 for ; Tue, 9 Oct 2012 15:03:44 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TLbLW-0004Ww-9z for gentoo-user@gentoo.org; Tue, 09 Oct 2012 17:03:46 +0200 Received: from geodiff-mac3.ulb.ac.be ([164.15.131.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 09 Oct 2012 17:03:46 +0200 Received: from theonewiththeevillook by geodiff-mac3.ulb.ac.be with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 09 Oct 2012 17:03:46 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: "Nicolas Richard" Subject: [gentoo-user] Re: Where does sudo get the PATH ? Date: Tue, 09 Oct 2012 17:03:50 +0200 Message-ID: <874nm38z6x.fsf@yahoo.fr> References: <878vbh82qs.fsf@yahoo.fr> 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 X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: geodiff-mac3.ulb.ac.be User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) Cancel-Lock: sha1:fCmCcMilmMiWpYHDReCWBWOex6Y= X-Archives-Salt: 223cbb51-2a2a-4793-810e-138e412d2425 X-Archives-Hash: 9ca7f3a58acfa74d081c95dc8f43ff2a >>>>> "Joost" == 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 output >> 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 ~ $ 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 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. -- N.