all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Marcin Borkowski <mbork@mbork.pl>
Cc: Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>
Subject: Re: TRAMP sudo method not asking for password
Date: Sat, 12 Jan 2019 19:44:28 +0100	[thread overview]
Message-ID: <87k1j9sokz.fsf@gmx.de> (raw)
In-Reply-To: <87pnt1okze.fsf@mbork.pl> (Marcin Borkowski's message of "Sat, 12 Jan 2019 18:15:49 +0100")

Marcin Borkowski <mbork@mbork.pl> writes:

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.
>
> 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.)

In general, your password is written to .authinfo on demand only. That
is, either you add a respective line, or you confirm that the
auth-sources adds this once you have entered it interactively.

The latter feature has been added to Tramp some weeks ago in Emacs 27
(don't remember the commit date). But Tramp asks you for confirmation,
whether you agree to add the password to your .authinfo. So you have
answered "y"; likely by accident, w/o reading the question carefully.

And this IS documented. etc/NEWS says in the Tramp section

--8<---------------cut here---------------start------------->8---
*** Validated passwords are saved by auth-source backends which support this.
--8<---------------cut here---------------end--------------->8---

And in the Tramp manual, there is in (info "(tramp) Password handling")

--8<---------------cut here---------------start------------->8---
   If there doesn’t exist a proper entry, the password is read
interactively.  After successful login (verification of the password),
it is offered to save a corresponding entry for further use by
‘auth-source’ backends which support this.  This could be changed by
setting the user option ‘auth-source-save-behavior’ to ‘nil’.
--8<---------------cut here---------------end--------------->8---

> Best,

Best regards, Michael.



  reply	other threads:[~2019-01-12 18:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-12 16:36 TRAMP sudo method not asking for password Marcin Borkowski
2019-01-12 17:09 ` Marcin Borkowski
2019-01-12 17:15   ` Marcin Borkowski
2019-01-12 18:44     ` Michael Albinus [this message]
2019-01-16 19:06       ` Marcin Borkowski
2019-01-16 22:42         ` Michael Albinus
2019-01-20  5:59           ` Marcin Borkowski
2019-01-20 10:52             ` Michael Albinus
2019-01-24 17:11               ` Marcin Borkowski
2019-01-26 15:50                 ` Michael Albinus
2019-01-27 15:21                   ` Robert Pluim
2019-01-27 17:21                     ` Michael Albinus
2019-01-28 17:53                       ` Marcin Borkowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k1j9sokz.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=mbork@mbork.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.