[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 <michael.albinus@gmx.de> 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. /ssh:remoteuser@host.example.com|sudo::/etc/passwd
> Fixed. It should ask now 'Password for
> /sudo:remoteuser@host.example.com: '
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. /ssh:host.example.com|sudo::/etc/passwd
a. now there is only a password prompt without any auth-source
lookup attempt:
`Password for /sudo:host.example.com: `
=> 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 "host.example.com" "remoteuser") in tramp-default-user-alist:
a. auth-source lookup:
host="host.example.com", user="remoteuser", port="sudo"
b. password prompt:
`Password for /sudo:remoteuser@host.example.com: `
(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
think?
Thanks a lot, Best Regards and have a nice weekend,
Kai
- Re: auth-source source password lookup for ssh + sudo, (continued)
- Re: auth-source source password lookup for ssh + sudo, Michael Albinus, 2022/02/18
- Re: auth-source source password lookup for ssh + sudo, Kai Tetzlaff, 2022/02/18
- Re: auth-source source password lookup for ssh + sudo, Michael Albinus, 2022/02/18
- Re: auth-source source password lookup for ssh + sudo, Kai Tetzlaff, 2022/02/18
- Re: auth-source source password lookup for ssh + sudo, Michael Albinus, 2022/02/18
- Re: auth-source source password lookup for ssh + sudo, Kai Tetzlaff, 2022/02/18
- Re: auth-source source password lookup for ssh + sudo, Michael Albinus, 2022/02/18
- Re: auth-source source password lookup for ssh + sudo, Michael Albinus, 2022/02/18
- Re: auth-source source password lookup for ssh + sudo, Kai Tetzlaff, 2022/02/18
- Re: auth-source source password lookup for ssh + sudo, Michael Albinus, 2022/02/19
- Re: auth-source source password lookup for ssh + sudo,
Kai Tetzlaff <=
- Re: auth-source source password lookup for ssh + sudo, Michael Albinus, 2022/02/19
- Re: auth-source source password lookup for ssh + sudo, Kai Tetzlaff, 2022/02/19
- Re: auth-source source password lookup for ssh + sudo, Michael Albinus, 2022/02/20
- Re: auth-source source password lookup for ssh + sudo, Kai Tetzlaff, 2022/02/20