[Top][All Lists]

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

Re: auth-source source password lookup for ssh + sudo

From: Kai Tetzlaff
Subject: Re: auth-source source password lookup for ssh + sudo
Date: Sat, 19 Feb 2022 13:20:56 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Michael Albinus <> writes:

Hi Michael,

> The adapted patch is appended, and it works (in my environment) for
> local and remote sudo, for remote doas, and for local sudoedit.
> Waiting for comments :-)

here you are:

1. /|sudo::/etc/passwd

> Fixed. It should ask now 'Password for
> / '

   Yes, it does. I also tested local sudo (`/sudo::/etc/passwd`) and
   sudoedit (`/sudoedit::/etc/passwd`). All look good. I didn't try `doas`
   since I don't have it installed.

2. /|sudo::/etc/passwd

   a. now there is only a password prompt without any auth-source
      lookup attempt:

          `Password for / `

   => Not sure, but it might make sense to start an auth-source lookup
      for just hostname/port instead of skipping it completely (for
      my own use case this would not make a difference since I don't
      store host (only) passwords).

4. Result with 2nd version of your patch and an additional
   '(nil "" "remoteuser") in tramp-default-user-alist:

   a. auth-source lookup:

          host="", user="remoteuser", port="sudo"

   b. password prompt:

          `Password for / `

      (skipped if a. succeeds).

   => Great!

Now, the question is if this can just be added to TRAMP as it does
change existing behavior. From my perspective it is a clear improvement
and the current implementation could be considered as a bug. What do you

Thanks a lot, Best Regards and have a nice weekend,

reply via email to

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