------------------------------------------------------------------------
Emacs Version:

This is GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2018-02-22

------------------------------------------------------------------------
System:

 #  lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 16.04.4 LTS
Release:    16.04
Codename:    xenial


------------------------------------------------------------------------
Problem:

Emacs password cache not working as hoped.

------------------------------------------------------------------------
Details:



(1)

I have

    (require 'password-cache)
    (setq password-cache-expiry nil)

set in my .emacs file.


(2)
When I connect to "machine" via tramp with:

    dired /ssh:user@machine:

I get logged via ssh and don't need a password, as expected and desired.
Then, when I want to sudo I need to give the password for user@machine, as
expected and desired.
However, emacs doesn't seem to remember that password and periodically I
have to reenter it.

(3)
A partial workaround is to connect to "machine" via tramp in sudo mode:

    dired /ssh:user@machine|sudo:user:/home/user

This allows sudo priveleges without experiation within a single emacs
session.
The drawback is that it doesn't allow dropping down out of sudo mode into
ordinary user mode.
Tying "exit" into the shell kills the sudo shell but doesn't go to a user
shell.

**In a single session using tramp to remote as in (1), is there a way to
get emacs to remember the sudo password and apply it automatically whenever
the prompt comes up?**

*Note: I don't want to remove the timeout on the remote sudo  password via
a setting file on the remote machine.*

------------------------------------------------------------------------
What I have tried so far:


(1) Corespond with eamacs developer Micheal Albinus on stackexchange emacs
https://emacs.stackexchange.com/questions/40902/emacs-password-cache-not-working-as-hoped

(2) Download dev version of tramp from git and put it in load path.
Unfortunately initialization failed.

(3) Download entire emacs dev version from git and try to compile it.
Unfortunately configuration failed.

(4) Look at emacs dev history.
I saw Micheal Albinus modified tramp on June 12, 2017 to deal with
password caching on remote systems.


------------------------------------------------------------------------
What next:

I would like to enquire whether Micheal Albinus' password cache
modifications are already in emacs 25.3.

If so, they are not working for the abover described cases.  So how to
proceed?

If not, then I would like to try patching my version in the simplest way
possible.  What would be best?

------------------------------------------------------------------------
Thanks for your time and consideration

Craig Hicks

emacs-trbl...@pindertek.com
_______________________________________________
Tramp-devel mailing list
Tramp-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to