From: Helmut Jarausch <jarausch@igpm.rwth-aachen.de>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] zsh and sudo
Date: Fri, 19 Feb 2010 14:07:05 +0100 (CET) [thread overview]
Message-ID: <tkrat.06e2765dbda0e9a3@igpm.rwth-aachen.de> (raw)
In-Reply-To: <3ac129341002181733m4af5bea0j53e67fcd09100470@mail.gmail.com>
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
next prev parent reply other threads:[~2010-02-19 13:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-19 1:33 [gentoo-user] zsh and sudo daid kahl
2010-02-19 13:07 ` Helmut Jarausch [this message]
2010-02-20 22:00 ` Etaoin Shrdlu
2010-02-21 16:33 ` daid kahl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tkrat.06e2765dbda0e9a3@igpm.rwth-aachen.de \
--to=jarausch@igpm.rwth-aachen.de \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox