From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.help Subject: Re: TRAMP sudo method not asking for password Date: Sat, 12 Jan 2019 18:15:49 +0100 Message-ID: <87pnt1okze.fsf@mbork.pl> References: <87r2dhq1do.fsf@mbork.pl> <87r2dholak.fsf@mbork.pl> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1547313343 31580 195.159.176.226 (12 Jan 2019 17:15:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 12 Jan 2019 17:15:43 +0000 (UTC) User-Agent: mu4e 1.1.0; emacs 27.0.50 To: Help Gnu Emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 12 18:15:39 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1giMsl-00086G-IU for geh-help-gnu-emacs@m.gmane.org; Sat, 12 Jan 2019 18:15:39 +0100 Original-Received: from localhost ([127.0.0.1]:35800 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1giMus-0005VI-Fr for geh-help-gnu-emacs@m.gmane.org; Sat, 12 Jan 2019 12:17:50 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51928) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1giMtm-0005UT-EU for help-gnu-emacs@gnu.org; Sat, 12 Jan 2019 12:16:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1giMtj-00015Y-Rh for help-gnu-emacs@gnu.org; Sat, 12 Jan 2019 12:16:41 -0500 Original-Received: from mail.mojserwer.eu ([195.110.48.8]:57238) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1giMtj-00010x-Iu for help-gnu-emacs@gnu.org; Sat, 12 Jan 2019 12:16:39 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id A2E00E66FC for ; Sat, 12 Jan 2019 18:16:31 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NVRF2SsU1vVn for ; Sat, 12 Jan 2019 18:16:28 +0100 (CET) Original-Received: from localhost (static-dwadziewiec-jedenpiec7.echostar.pl [109.232.29.157]) by mail.mojserwer.eu (Postfix) with ESMTPSA id AE96FE6695 for ; Sat, 12 Jan 2019 18:16:28 +0100 (CET) In-reply-to: <87r2dholak.fsf@mbork.pl> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.110.48.8 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:119114 Archived-At: On 2019-01-12, at 18:09, Marcin Borkowski wrote: > On 2019-01-12, at 17:36, Marcin Borkowski wrote: > >> Hi all, >> >> I have a very strange problem: the TRAMP sudo method stopped asking me >> for the password. How is that possible? sudo in terminal behaves >> normally, so it cannot be some global setting I messed up. >> >> emacs -Q does TRT, i.e., asks for the password. >> >> I understand that I can bisect my init.el, but it is almost 2 klines >> long, so before I do that, I'd like to ask - maybe someone will know the >> answer off the top of their head? >> >> Note: deleting ~/.emacs.d/tramp didn't help. > > OK, so I have some further details. > > Bisecting init.el didn't help. > > For completeness, I have this in my `*Messages*': > > --8<---------------cut here---------------start------------->8--- > Tramp: Opening connection for root@tars using sudo... > Tramp: Sending command =E2=80=98exec env SHELL=3D/bin/sh sudo -u root -s = -H -p P""a""s""s""w""o""r""d"":=E2=80=99 > Tramp: Waiting for prompts from remote shell... > Tramp: Sending Password > Tramp: Waiting for prompts from remote shell...done > Tramp: Found remote shell prompt on =E2=80=98tars=E2=80=99 > Tramp: Opening connection for root@tars using sudo...done > --8<---------------cut here---------------end--------------->8--- > > Using apropos-value, I found my password in `password-data'. After > skimming through `password-cache.el', I tried `M-x password-reset' to no > avail. > > I looked into ~/.emacs.d for some file/directory named `cache' or > similar, but didn't find anything. Finally, I ran out of ideas. > > I ran out of ideas. > > I understand that I probably accidentally told Emacs to cache my > password. What can I do to un-cache it? (While convenient, it doesn't > seem very safe.) I found it! My passwords were cached in ~/.authinfo. After cleaning it, TRAMP asks me the password again. Now, this file is only mentioned once in the Emacs manual, and in a different context. I think not having it even mentioned in some other place is a serious security bug in the docs. Am I correct? If so, I'll gladly file a bug report. (I won't try to fix it myself since I do not know enough to be sure I'm doing it right.) Best, --=20 Marcin Borkowski http://mbork.pl