[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible issue with sudo in eshell
From: |
Thierry Volpiatto |
Subject: |
Re: Possible issue with sudo in eshell |
Date: |
Fri, 06 Apr 2012 18:22:18 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux) |
Hi Sven,
Sven Joachim <address@hidden> writes:
> 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
> | ~ $
> `----
I see, thanks for these infos.
The timestamp is recorded here in "/var/lib/sudo/thierry/3" which would
correspond with /dev/pts/3.
I am already using an alias for sudo:
alias sudo *sudo -p Password: $*
and with it, "sudo tty" always return "/dev/pts/3", but I have anyway to
reenter password at each time.
> 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.
I think this is same as using "*sudo" which work badly too.
> Any eshell guru around with better suggestions?
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997