From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1NiSa3-0006IW-TJ for garchives@archives.gentoo.org; Fri, 19 Feb 2010 13:07:40 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B95EFE0905; Fri, 19 Feb 2010 13:07:07 +0000 (UTC) Received: from mta-2.ms.rz.rwth-aachen.de (mta-2.ms.rz.RWTH-Aachen.DE [134.130.7.73]) by pigeon.gentoo.org (Postfix) with ESMTP id 82BC1E0905 for ; Fri, 19 Feb 2010 13:07:07 +0000 (UTC) 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-transfer-encoding: 7BIT Content-disposition: INLINE Content-type: TEXT/PLAIN; CHARSET=us-ascii Received: from ironport-out-1.rz.rwth-aachen.de ([134.130.5.40]) by mta-2.ms.rz.RWTH-Aachen.de (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008)) with ESMTP id <0KY300IJ4B3UXX20@mta-2.ms.rz.RWTH-Aachen.de> for gentoo-user@lists.gentoo.org; Fri, 19 Feb 2010 14:07:06 +0100 (CET) X-IronPort-AV: E=Sophos;i="4.49,503,1262559600"; d="scan'208";a="45688643" Received: from relay-2.ms.rz.rwth-aachen.de (HELO relay.rwth-aachen.de) ([134.130.7.75]) by ironport-in-1.rz.rwth-aachen.de with ESMTP; Fri, 19 Feb 2010 14:07:06 +0100 Received: from numa-i.igpm.rwth-aachen.de (numa-i.igpm.RWTH-Aachen.DE [134.130.161.252]) by relay.rwth-aachen.de (8.13.8+Sun/8.13.8/1) with ESMTP id o1JD76N0022003 for ; Fri, 19 Feb 2010 14:07:06 +0100 (CET) Received: by numa-i.igpm.rwth-aachen.de (Postfix, from userid 230) id F3BC9DAA; Fri, 19 Feb 2010 14:07:05 +0100 (CET) Date: Fri, 19 Feb 2010 14:07:05 +0100 (CET) From: Helmut Jarausch Subject: Re: [gentoo-user] zsh and sudo To: gentoo-user@lists.gentoo.org In-reply-to: <3ac129341002181733m4af5bea0j53e67fcd09100470@mail.gmail.com> Message-id: References: <3ac129341002181733m4af5bea0j53e67fcd09100470@mail.gmail.com> X-Archives-Salt: a59f0a52-5b3e-403c-b580-4cc3dc99fb2a X-Archives-Hash: dd13b1841ec0d8a1643f2b407f27ee61 On 19 Feb, daid kahl wrote: > Hello, > > I just installed zsh recently and was working on making the switch > over from bash for my daily user, provided I can get a few things > worked out. > > The biggest problem that I can't find useful results googling is zsh > interaction with sudo. > > I'm noticing some strange behavior with the PATH and also the > interpretation of '='. > > daid@flux log % sudo which useradd > which: no useradd in > (/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.4.3:/opt/sun-jdk-1.4.2.17/bin:/opt/sun-jdk-1.4.2.17/jre/bin:/opt/sun-jdk-1.4.2.17/jre/javaws:/usr/kde/3.5/bin:/usr/qt/3/bin:/usr/games/bin) > daid@flux log % sudo echo $PATH > /usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.4.3:/opt/sun-jdk-1.4.2.17/bin:/opt/sun-jdk-1.4.2.17/jre/bin:/opt/sun-jdk-1.4.2.17/jre/javaws:/usr/kde/3.5/bin:/usr/qt/3/bin:/usr/games/bin:/home/daid/scripts:/sbin:/home/daid/.gentoo/java-config-2/current-user-vm/bin:/usr/sbin:/usr/local/warlock2:/usr/local/sbin:/home/daid/physics/transport_for_crib/transport1.6/bin > daid@flux log % which useradd > /usr/sbin/useradd > > So sudo has the PATH set correctly, but it doesn't actually use the > correct path. Fishy! SNIP AFAIK, sudo invokes the shell specified in the environment. What is echo $SHELL saying? Here, is says /bin/zsh and your examples works just fine. Helmut. -- Helmut Jarausch Lehrstuhl fuer Numerische Mathematik RWTH - Aachen University D 52056 Aachen, Germany