* sudo and tramp ask for password twice
@ 2012-05-06 4:33 Eric Abrahamsen
2012-05-06 4:49 ` XeCycle
2012-05-06 11:10 ` Michael Albinus
0 siblings, 2 replies; 6+ messages in thread
From: Eric Abrahamsen @ 2012-05-06 4:33 UTC (permalink / raw)
To: help-gnu-emacs
Hi there,
I'm using tramp in emacs24, and have a small question about sudo. First
of all, I'm using ido-everywhere, so when I want to open a file I hit
"C-x C-f", then two forward slashes to get to the filesystem root.
Then it's "sudo:". At this point ido gives me three choices:
Find file: /sudo:{ . | localhost: | root@}
Going through "root@" just leads another "localhost", so there doesn't
seem to be any difference there. Is there? I suppose that's what I'd use
if I wanted to access files as a different user altogether.
So I choose localhost, then go for the file I want. Tramp asks me for my
password once when I choose localhost, and then again the next time it
needs to touch the filesystem (since I'm using ido, that means the first
time it starts completing filepaths).
Is there any way I can have it ask just once? Am I using it incorrectly?
Relevant settings:
--8<---------------cut here---------------start------------->8---
(ido-auto-merge-delay-time 1)
(ido-auto-merge-work-directories-length 0)
(ido-create-new-buffer (quote always))
(ido-enable-flex-matching t)
(ido-everywhere t)
(ido-file-extensions-order (quote (".org" ".py" ".el" ".html" ".org_archive")))
(ido-ignore-buffers (quote ("\\` " "/ssh")))
(ido-max-work-directory-list 10)
(ido-mode (quote both) nil (ido))
(ido-read-file-name-non-ido (quote (mm-save-part)))
(ido-record-ftp-work-directories nil)
(ido-show-dot-for-dired t)
(ido-use-filename-at-point (quote guess))
(ido-use-url-at-point nil)
(ido-use-virtual-buffers nil)
(ido-work-directory-list-ignore-regexps (quote ("/sudo:" "/scp")))
(mingus-use-ido-mode-p t)
(org-completion-use-ido t)
(tramp-default-method "scp")
--8<---------------cut here---------------end--------------->8---
Thanks!
Eric
--
GNU Emacs 24.1.50.3 (i686-pc-linux-gnu, GTK+ Version 2.24.10)
of 2012-05-01 on pellet
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: sudo and tramp ask for password twice
2012-05-06 4:33 sudo and tramp ask for password twice Eric Abrahamsen
@ 2012-05-06 4:49 ` XeCycle
2012-05-06 6:21 ` Eric Abrahamsen
2012-05-06 11:06 ` Michael Albinus
2012-05-06 11:10 ` Michael Albinus
1 sibling, 2 replies; 6+ messages in thread
From: XeCycle @ 2012-05-06 4:49 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1180 bytes --]
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
> Hi there,
>
> I'm using tramp in emacs24, and have a small question about sudo. First
> of all, I'm using ido-everywhere, so when I want to open a file I hit
> "C-x C-f", then two forward slashes to get to the filesystem root.
>
> Then it's "sudo:". At this point ido gives me three choices:
>
> Find file: /sudo:{ . | localhost: | root@}
>
> Going through "root@" just leads another "localhost", so there doesn't
> seem to be any difference there. Is there? I suppose that's what I'd use
> if I wanted to access files as a different user altogether.
>
> So I choose localhost, then go for the file I want. Tramp asks me for my
> password once when I choose localhost, and then again the next time it
> needs to touch the filesystem (since I'm using ido, that means the first
> time it starts completing filepaths).
Don't know about the rest of your questions, but isn't sudo
method supposed to be used like `/sudo::/etc/conf'?
--
Carl Lei (XeCycle)
Department of Physics, Shanghai Jiao Tong University
OpenPGP public key: 7795E591
Fingerprint: 1FB6 7F1F D45D F681 C845 27F7 8D71 8EC4 7795 E591
[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: sudo and tramp ask for password twice
2012-05-06 4:49 ` XeCycle
@ 2012-05-06 6:21 ` Eric Abrahamsen
2012-05-06 11:06 ` Michael Albinus
1 sibling, 0 replies; 6+ messages in thread
From: Eric Abrahamsen @ 2012-05-06 6:21 UTC (permalink / raw)
To: help-gnu-emacs
On Sun, May 06 2012, XeCycle wrote:
> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Hi there,
>>
>> I'm using tramp in emacs24, and have a small question about sudo. First
>> of all, I'm using ido-everywhere, so when I want to open a file I hit
>> "C-x C-f", then two forward slashes to get to the filesystem root.
>>
>> Then it's "sudo:". At this point ido gives me three choices:
>>
>> Find file: /sudo:{ . | localhost: | root@}
>>
>> Going through "root@" just leads another "localhost", so there doesn't
>> seem to be any difference there. Is there? I suppose that's what I'd use
>> if I wanted to access files as a different user altogether.
>>
>> So I choose localhost, then go for the file I want. Tramp asks me for my
>> password once when I choose localhost, and then again the next time it
>> needs to touch the filesystem (since I'm using ido, that means the first
>> time it starts completing filepaths).
>
> Don't know about the rest of your questions, but isn't sudo
> method supposed to be used like `/sudo::/etc/conf'?
Ha, I guess you're right. When I type /sudo:: at the prompt, ido tells
me the next completion is "localhost:", but if I ignore that and just
enter my path, it works fine -- only one password prompt.
I guess I thought ido was showing me something important about tramp
internals, something I didn't know before, but maybe it wasn't really
that helpful…
Thanks!
--
GNU Emacs 24.1.50.3 (i686-pc-linux-gnu, GTK+ Version 2.24.10)
of 2012-05-01 on pellet
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: sudo and tramp ask for password twice
2012-05-06 4:49 ` XeCycle
2012-05-06 6:21 ` Eric Abrahamsen
@ 2012-05-06 11:06 ` Michael Albinus
2012-05-07 1:40 ` Eric Abrahamsen
1 sibling, 1 reply; 6+ messages in thread
From: Michael Albinus @ 2012-05-06 11:06 UTC (permalink / raw)
To: XeCycle; +Cc: help-gnu-emacs
XeCycle <XeCycle@Gmail.com> writes:
> Don't know about the rest of your questions, but isn't sudo
> method supposed to be used like `/sudo::/etc/conf'?
"/sudo::" is an aabreviation for "/sudo:localhost:" is an abbreviation
for "/sudo:root@localhost:".
Best regards, Michael.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: sudo and tramp ask for password twice
2012-05-06 4:33 sudo and tramp ask for password twice Eric Abrahamsen
2012-05-06 4:49 ` XeCycle
@ 2012-05-06 11:10 ` Michael Albinus
1 sibling, 0 replies; 6+ messages in thread
From: Michael Albinus @ 2012-05-06 11:10 UTC (permalink / raw)
To: Eric Abrahamsen; +Cc: help-gnu-emacs
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
> Hi there,
Hi Eric,
> So I choose localhost, then go for the file I want. Tramp asks me for my
> password once when I choose localhost, and then again the next time it
> needs to touch the filesystem (since I'm using ido, that means the first
> time it starts completing filepaths).
>
> Is there any way I can have it ask just once? Am I using it incorrectly?
Set password-cache-expiry to nil:
+----- C-h v password-cache-expiry ------------------------------------
|
| password-cache-expiry is a variable defined in `password-cache.el'.
| Its value is nil
| Original value was 16
|
| Documentation:
| How many seconds passwords are cached, or nil to disable expiring.
| Whether passwords are cached at all is controlled by `password-cache'.
|
+--------------------------------------------------------------------
> Thanks!
>
> Eric
Best regards, Michael.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: sudo and tramp ask for password twice
2012-05-06 11:06 ` Michael Albinus
@ 2012-05-07 1:40 ` Eric Abrahamsen
0 siblings, 0 replies; 6+ messages in thread
From: Eric Abrahamsen @ 2012-05-07 1:40 UTC (permalink / raw)
To: help-gnu-emacs
On Sun, May 06 2012, Michael Albinus wrote:
> XeCycle <XeCycle@Gmail.com> writes:
>
>> Don't know about the rest of your questions, but isn't sudo
>> method supposed to be used like `/sudo::/etc/conf'?
>
> "/sudo::" is an aabreviation for "/sudo:localhost:" is an abbreviation
> for "/sudo:root@localhost:".
This cleared up most of my confusions right here. Thanks!
--
GNU Emacs 24.1.50.3 (i686-pc-linux-gnu, GTK+ Version 2.24.10)
of 2012-05-01 on pellet
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-05-07 1:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-06 4:33 sudo and tramp ask for password twice Eric Abrahamsen
2012-05-06 4:49 ` XeCycle
2012-05-06 6:21 ` Eric Abrahamsen
2012-05-06 11:06 ` Michael Albinus
2012-05-07 1:40 ` Eric Abrahamsen
2012-05-06 11:10 ` Michael Albinus
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.