emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Possible issue with sudo in eshell


From: Sven Joachim
Subject: Re: Possible issue with sudo in eshell
Date: Fri, 06 Apr 2012 14:22:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]