all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sven Joachim <svenjoac@gmx.de>
To: Thierry Volpiatto <thierry.volpiatto@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Possible issue with sudo in eshell
Date: Fri, 06 Apr 2012 14:22:21 +0200	[thread overview]
Message-ID: <8762dd59tu.fsf@turtle.gmx.de> (raw)
In-Reply-To: <87sjgh9mm8.fsf@gmail.com> (Thierry Volpiatto's message of "Fri,  06 Apr 2012 12:32:31 +0200")

On 2012-04-06 12:32 +0200, Thierry Volpiatto wrote:

> Hi all,
>
> when I run a command with sudo in eshell, e.g "sudo ls /etc"
> I must enter a password as expected, but I must reenter this password at
> each time I repeat the command. This is annoying.
>
> This works fine in M-x shell and term.
>
> It seem the timestamp is recorded in /var/lib/sudo, but eshell is not
> reading it before running command again.

That's because eshell special cases sudo and uses an internal command
that calls tramp behind the scenes.  The result is this:

,----
| ~ $ tty
| /dev/pts/3
| ~ $ sudo tty
| not a tty
| ~ $ /usr/bin/sudo tty
| /dev/pts/3
| ~ $ 
`----

If sudo is configured with the tty_tickets option (recommended for
security reasons), you'll have to enter the password each time.

> I have no idea how to fix this, any hints welcome.

I tried "alias sudo /usr/bin/sudo", but that worked badly.  Any eshell
guru around with better suggestions?

Cheers,
       Sven



  reply	other threads:[~2012-04-06 12:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-06 10:32 Possible issue with sudo in eshell Thierry Volpiatto
2012-04-06 12:22 ` Sven Joachim [this message]
2012-04-06 13:11   ` Tom Willemsen
2012-04-06 16:30     ` Thierry Volpiatto
2012-04-06 16:22   ` Thierry Volpiatto

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=8762dd59tu.fsf@turtle.gmx.de \
    --to=svenjoac@gmx.de \
    --cc=emacs-devel@gnu.org \
    --cc=thierry.volpiatto@gmail.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.