[Top][All Lists]

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

Re: TRAMP sudo method not asking for password

From: Marcin Borkowski
Subject: Re: TRAMP sudo method not asking for password
Date: Sat, 12 Jan 2019 18:15:49 +0100
User-agent: mu4e 1.1.0; emacs 27.0.50

On 2019-01-12, at 18:09, Marcin Borkowski <address@hidden> wrote:

> On 2019-01-12, at 17:36, Marcin Borkowski <address@hidden> 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 address@hidden using sudo...
> Tramp: Sending command ‘exec env SHELL=/bin/sh sudo -u root -s -H -p 
> P""a""s""s""w""o""r""d"":’
> Tramp: Waiting for prompts from remote shell...
> Tramp: Sending Password
> Tramp: Waiting for prompts from remote shell...done
> Tramp: Found remote shell prompt on ‘tars’
> Tramp: Opening connection for address@hidden 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.)


Marcin Borkowski

reply via email to

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