all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* tramp vs. sudo
@ 2011-06-21 12:41 Neal Becker
  2011-06-21 13:02 ` suvayu ali
  0 siblings, 1 reply; 9+ messages in thread
From: Neal Becker @ 2011-06-21 12:41 UTC (permalink / raw
  To: help-gnu-emacs

I have a minor issue with tramp.  If sudo is setup to not ask for pw, everything 
is fine.  If sudo is setup to ask for the user's pw, then 
/sudo:root@localhost:/whatever

will ask for the pw 2 times.  The 2nd time it will work.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: tramp vs. sudo
  2011-06-21 12:41 tramp vs. sudo Neal Becker
@ 2011-06-21 13:02 ` suvayu ali
  2011-06-21 19:00   ` Michael Albinus
  0 siblings, 1 reply; 9+ messages in thread
From: suvayu ali @ 2011-06-21 13:02 UTC (permalink / raw
  To: Neal Becker; +Cc: help-gnu-emacs

On Tue, Jun 21, 2011 at 5:41 AM, Neal Becker <ndbecker2@gmail.com> wrote:
> I have a minor issue with tramp.  If sudo is setup to not ask for pw, everything
> is fine.  If sudo is setup to ask for the user's pw, then
> /sudo:root@localhost:/whatever
>
> will ask for the pw 2 times.  The 2nd time it will work.
>

Its the same here. I just assumed thats how tramp behaves with sudo.

-- 
Suvayu

Open source is the future. It sets us free.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: tramp vs. sudo
  2011-06-21 13:02 ` suvayu ali
@ 2011-06-21 19:00   ` Michael Albinus
  2011-06-21 20:11     ` Suvayu Ali
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Albinus @ 2011-06-21 19:00 UTC (permalink / raw
  To: suvayu ali; +Cc: Neal Becker, help-gnu-emacs

suvayu ali <fatkasuvayu+linux@gmail.com> writes:

> On Tue, Jun 21, 2011 at 5:41 AM, Neal Becker <ndbecker2@gmail.com> wrote:
>> I have a minor issue with tramp.  If sudo is setup to not ask for
>> pw, everything
>> is fine.  If sudo is setup to ask for the user's pw, then
>> /sudo:root@localhost:/whatever
>>
>> will ask for the pw 2 times.  The 2nd time it will work.
>>
>
> Its the same here. I just assumed thats how tramp behaves with sudo.

I cannot reproduce it locally. I'm running Ubuntu 11.11, and I've tested
it with both Emacs 23.2 and 24.0.50, calling "emacs -Q" in both cases.

Could you, please, call Emacs the same way. *Before* you open
/sudo:root@localhost:/whatever you should eval 

(setq tramp-verbose 6)

Please show Tramp's debug buffer afterwards. It does not contain any
password string (but you might crosscheck before sending).

Best regards, Michael.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: tramp vs. sudo
  2011-06-21 19:00   ` Michael Albinus
@ 2011-06-21 20:11     ` Suvayu Ali
  2011-06-22 10:22       ` Richard Riley
  0 siblings, 1 reply; 9+ messages in thread
From: Suvayu Ali @ 2011-06-21 20:11 UTC (permalink / raw
  To: Michael Albinus; +Cc: Neal Becker, help-gnu-emacs

On Tue, 21 Jun 2011 21:00:23 +0200
Michael Albinus <michael.albinus@gmx.de> wrote:

> > Its the same here. I just assumed thats how tramp behaves with
> > sudo.  
> 
> I cannot reproduce it locally. I'm running Ubuntu 11.11, and I've
> tested it with both Emacs 23.2 and 24.0.50, calling "emacs -Q" in
> both cases.
> 
> Could you, please, call Emacs the same way. *Before* you open
> /sudo:root@localhost:/whatever you should eval 
> 
> (setq tramp-verbose 6)

Strange, I can't reproduce this behaviour any more. It has been a long
time since I used it last (AFAIR sometime in 2010). 

-- 
Suvayu

Open source is the future. It sets us free.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: tramp vs. sudo
  2011-06-21 20:11     ` Suvayu Ali
@ 2011-06-22 10:22       ` Richard Riley
  2011-06-23 13:35         ` Michael Albinus
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Riley @ 2011-06-22 10:22 UTC (permalink / raw
  To: help-gnu-emacs

Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:

> On Tue, 21 Jun 2011 21:00:23 +0200
> Michael Albinus <michael.albinus@gmx.de> wrote:
>
>> > Its the same here. I just assumed thats how tramp behaves with
>> > sudo.  
>> 
>> I cannot reproduce it locally. I'm running Ubuntu 11.11, and I've
>> tested it with both Emacs 23.2 and 24.0.50, calling "emacs -Q" in
>> both cases.
>> 
>> Could you, please, call Emacs the same way. *Before* you open
>> /sudo:root@localhost:/whatever you should eval 
>> 
>> (setq tramp-verbose 6)
>
> Strange, I can't reproduce this behaviour any more. It has been a long
> time since I used it last (AFAIR sometime in 2010). 


I get prompted twice here when opening a local file as sudo.

e.g

(defun find-alternative-file-with-sudo ()
  "Open current buffer as root!"
  (interactive)
  (when buffer-file-name
    (find-alternate-file
     (concat "/sudo:root@localhost:"
	     buffer-file-name))))

GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0) of 2010-12-11
on raven, modified by Debian




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: tramp vs. sudo
  2011-06-22 10:22       ` Richard Riley
@ 2011-06-23 13:35         ` Michael Albinus
  2011-06-24  1:25           ` Neal Becker
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Albinus @ 2011-06-23 13:35 UTC (permalink / raw
  To: help-gnu-emacs

Richard Riley <rileyrg@googlemail.com> writes:

> I get prompted twice here when opening a local file as sudo.

I still cannot reproduce it here.

Could somebody, please, provide the traces, using tramp-verbose 6?
Furthermore, it might be helpful to set auth-source-debug to t, because
there could be an interference with auth-sources.el. Messages of
auth-sources.el are written to *Messages*.

Without any traces, I cannot analyze. Sorry.

Best regards, Michael.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: tramp vs. sudo
  2011-06-23 13:35         ` Michael Albinus
@ 2011-06-24  1:25           ` Neal Becker
  2011-06-24 11:30             ` Neal Becker
  0 siblings, 1 reply; 9+ messages in thread
From: Neal Becker @ 2011-06-24  1:25 UTC (permalink / raw
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 527 bytes --]

Michael Albinus wrote:

> Richard Riley <rileyrg@googlemail.com> writes:
> 
>> I get prompted twice here when opening a local file as sudo.
> 
> I still cannot reproduce it here.
> 
> Could somebody, please, provide the traces, using tramp-verbose 6?
> Furthermore, it might be helpful to set auth-source-debug to t, because
> there could be an interference with auth-sources.el. Messages of
> auth-sources.el are written to *Messages*.
> 
> Without any traces, I cannot analyze. Sorry.
> 
> Best regards, Michael.

How's this?

[-- Attachment #2: tramp --]
[-- Type: text/plain, Size: 846 bytes --]

;; GNU Emacs: 23.2.1 Tramp: 2.1.18-23.2 -*- mode: outline; -*-
21:23:22.639919 tramp-maybe-open-connection (3) # Opening connection for root@localhost using sudo...
21:23:22.642648 tramp-maybe-open-connection (6) # /bin/sh
21:23:22.643003 tramp-maybe-open-connection (3) # Waiting 60s for local shell to come up...
21:23:22.650913 tramp-wait-for-regexp (6) # 
#$ 
21:23:22.651544 tramp-maybe-open-connection (3) # Sending command `exec sudo -u root -s -H -p Password:'
21:23:22.651698 tramp-send-command (6) # exec sudo -u root -s -H -p Password:
21:23:22.651997 tramp-process-actions (3) # Waiting for prompts from remote shell
21:23:22.712697 tramp-process-one-action (5) # Looking for regexp "\(.*ogin\( .*\)?: *\)\'" from remote shell
21:23:22.712875 tramp-process-one-action (5) # Looking for regexp "\(^.*\([pP]assword\|[pP]assphrase\).*:


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: tramp vs. sudo
  2011-06-24  1:25           ` Neal Becker
@ 2011-06-24 11:30             ` Neal Becker
  2011-06-24 19:01               ` Michael Albinus
  0 siblings, 1 reply; 9+ messages in thread
From: Neal Becker @ 2011-06-24 11:30 UTC (permalink / raw
  To: help-gnu-emacs

Neal Becker wrote:

> Michael Albinus wrote:
> 
>> Richard Riley <rileyrg@googlemail.com> writes:
>> 
>>> I get prompted twice here when opening a local file as sudo.
>> 
>> I still cannot reproduce it here.
>> 
>> Could somebody, please, provide the traces, using tramp-verbose 6?
>> Furthermore, it might be helpful to set auth-source-debug to t, because
>> there could be an interference with auth-sources.el. Messages of
>> auth-sources.el are written to *Messages*.
>> 
>> Without any traces, I cannot analyze. Sorry.
>> 
>> Best regards, Michael.
> 
> How's this?

Sorry - that got truncated.  I need to find somewhere to upload these.  Or 
should I just mail them to you?




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: tramp vs. sudo
  2011-06-24 11:30             ` Neal Becker
@ 2011-06-24 19:01               ` Michael Albinus
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Albinus @ 2011-06-24 19:01 UTC (permalink / raw
  To: Neal Becker; +Cc: help-gnu-emacs

Neal Becker <ndbecker2@gmail.com> writes:

> Sorry - that got truncated.  I need to find somewhere to upload these.  Or 
> should I just mail them to you?

Yes, please do. I'm still too busy @work, but I hope to have a look on
them latest on Sunday.

Best regards, Michael.



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-06-24 19:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-21 12:41 tramp vs. sudo Neal Becker
2011-06-21 13:02 ` suvayu ali
2011-06-21 19:00   ` Michael Albinus
2011-06-21 20:11     ` Suvayu Ali
2011-06-22 10:22       ` Richard Riley
2011-06-23 13:35         ` Michael Albinus
2011-06-24  1:25           ` Neal Becker
2011-06-24 11:30             ` Neal Becker
2011-06-24 19:01               ` 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.