From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sven Joachim Newsgroups: gmane.emacs.devel Subject: Re: Possible issue with sudo in eshell Date: Fri, 06 Apr 2012 14:22:21 +0200 Message-ID: <8762dd59tu.fsf@turtle.gmx.de> References: <87sjgh9mm8.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1333714960 25999 80.91.229.3 (6 Apr 2012 12:22:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 6 Apr 2012 12:22:40 +0000 (UTC) Cc: emacs-devel@gnu.org To: Thierry Volpiatto Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 06 14:22:38 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SG8BY-0006EL-HN for ged-emacs-devel@m.gmane.org; Fri, 06 Apr 2012 14:22:36 +0200 Original-Received: from localhost ([::1]:34605 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SG8BV-0006ig-Qp for ged-emacs-devel@m.gmane.org; Fri, 06 Apr 2012 08:22:33 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45837) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SG8BS-0006iA-9C for emacs-devel@gnu.org; Fri, 06 Apr 2012 08:22:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SG8BM-0000gz-1R for emacs-devel@gnu.org; Fri, 06 Apr 2012 08:22:29 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:46088) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SG8BL-0000gS-NJ for emacs-devel@gnu.org; Fri, 06 Apr 2012 08:22:23 -0400 Original-Received: (qmail invoked by alias); 06 Apr 2012 12:22:21 -0000 Original-Received: from p4FC75D34.dip.t-dialin.net (EHLO turtle.gmx.de) [79.199.93.52] by mail.gmx.net (mp001) with SMTP; 06 Apr 2012 14:22:21 +0200 X-Authenticated: #28250155 X-Provags-ID: V01U2FsdGVkX1+/+iY/wFG/5nGGJpx8pEufe5f4FuPs1XHCiZ3lxP HFRHGOCnZauHI7 Original-Received: by turtle.gmx.de (Postfix, from userid 1000) id 1FD7F3F48E; Fri, 6 Apr 2012 14:22:21 +0200 (CEST) In-Reply-To: <87sjgh9mm8.fsf@gmail.com> (Thierry Volpiatto's message of "Fri, 06 Apr 2012 12:32:31 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 213.165.64.23 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:149425 Archived-At: 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