From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.help Subject: Re: TRAMP sudo method not asking for password Date: Sat, 12 Jan 2019 19:44:28 +0100 Message-ID: <87k1j9sokz.fsf@gmx.de> References: <87r2dhq1do.fsf@mbork.pl> <87r2dholak.fsf@mbork.pl> <87pnt1okze.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 1547318586 11681 195.159.176.226 (12 Jan 2019 18:43:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 12 Jan 2019 18:43:06 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Help Gnu Emacs mailing list To: Marcin Borkowski Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 12 19:43:01 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 1giOFJ-0002rv-Hb for geh-help-gnu-emacs@m.gmane.org; Sat, 12 Jan 2019 19:43:01 +0100 Original-Received: from localhost ([127.0.0.1]:58378 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1giOHQ-0007gy-Cn for geh-help-gnu-emacs@m.gmane.org; Sat, 12 Jan 2019 13:45:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47446) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1giOGw-0007gj-KR for help-gnu-emacs@gnu.org; Sat, 12 Jan 2019 13:44:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1giOGv-0004Lt-FS for help-gnu-emacs@gnu.org; Sat, 12 Jan 2019 13:44:42 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:40947) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1giOGv-0004I3-3x for help-gnu-emacs@gnu.org; Sat, 12 Jan 2019 13:44:41 -0500 Original-Received: from detlef.gmx.de ([178.20.93.132]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M4nt7-1hU9dT1Ihp-00yviu; Sat, 12 Jan 2019 19:44:30 +0100 In-Reply-To: <87pnt1okze.fsf@mbork.pl> (Marcin Borkowski's message of "Sat, 12 Jan 2019 18:15:49 +0100") X-Provags-ID: V03:K1:08jFcf6GACipLr9O8mw2IBhVXNTol4N/27le3kCbRZQX5/GAHcw apCBZLXmHa6IsiPVl+40iqHtjWuuYtznUZUn+lMNDgFcRzIF28hTQQMXegRO8erV1007LY5 LOjhprmC5S2BAj6ZS1GroOuih8bdy7q3ID+Wnqx4+ofJIqGHDxHxoqlt+uhxLDhZCoKSooy F9/0w4mEb5KlwOlOgESVw== X-UI-Out-Filterresults: notjunk:1;V03:K0:9tj0af5DcAk=:LOgOaLxJVEqtElUHxPVnZi srmdtubRfknZRM27f283ESRB9mjwVjm6YOPCmKdnRv2OUJdBHTKIvw1QFOfmBXvq3UubeGz3/ bx9x4tYHBA/eNS8jhB/j+QJ0FctrE2FpI6ZZ0t43PEu7uG9optc4mFmPlwoh9HxrNE+y0Q/Dz oiT2tcoQRYgBKdrC4eeefgipx2U++YhRs+c7yWQyvHpO3yMiH+VgGBllBdXW6NtHE292LG8h+ p8hDLWKBeImcDLHhrKfvAo/BIZr8rpPt+COtrSB4Z2tfae5HIZbmfBj8mUZ77/G1VqL2o1lYJ VXgfbLSkWwACC1uVResfGBBdH/CHe0cab2cVQqkfM4FhWoA2o5QH3l+jynMH9KSmTC3vw1cgC G426aCoE4Fj0yTKJ5B+H7KcrC0AHGwd6pxhgE+qBC9wMpXKtMTFHpdvO/qUOL8WKkQ0ggX0aa BaQoLQ5ADL0YXxNB3dTbYuB6Pduwx/KpjiviU6TAPjR7Mel2k1gIbJLchHH/ron7KllJ5fgKF 6ji+vTFMY+spI8DG34OwE1ajoRkUmGOmtw98o+eVV56/qrAWr264nyIRi6Z1g3QbXbHwXxCOd 2PUZcW2n0AnBM0T+efNEwh+lSFXJFIgDe6b0LMbkMEQcyRfaluKaRrDKG7hc6uP6VmcbLMOY8 Itcw7Mf6P8OCJf3MvmZ18DyEMbLudbx6jtzVNoNwG+70t52eCz7vHsf6YQC7aD+lbt55IpoNM 20md8m3op8Rxl/Ig8l7fxD/CZoLosbyOhHPajzPeqtwXSFpdaR2AtGz+7UHgEoHdQVVP/nWq X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.18 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:119116 Archived-At: Marcin Borkowski 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 thi= s. --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=E2=80=99t 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 =E2=80=98auth-source=E2=80=99 backends which support this. This could be c= hanged by setting the user option =E2=80=98auth-source-save-behavior=E2=80=99 to =E2= =80=98nil=E2=80=99. --8<---------------cut here---------------end--------------->8--- > Best, Best regards, Michael.