all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Nordlöw <per.nordlow@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: sudo command with minibuffer password prompt
Date: Wed, 16 Dec 2009 21:37:35 +0100	[thread overview]
Message-ID: <87d42eodtc.fsf@gmx.de> (raw)
In-Reply-To: <c56323c2-7de2-4f62-bd0a-f7dca20f41e7@r1g2000vbp.googlegroups.com> ("Nordlöw"'s message of "Wed, 16 Dec 2009 03:48:51 -0800 (PST)")

Nordlöw <per.nordlow@gmail.com> writes:

> Is it possible to call
> sudo CMD
> from within Emacs and get the password prompt in the minibuffer like
> TRAMP does when we open a file with super user privs?

In GNU Emacs 23.1.90, I've recently added su and sudo support via Tramp
in eshell. Once you have loaded eshell via "M-x eshell", you can do the
following (for example):

  ~ $ cd /etc
  /etc $ sudo find-file shadow

It works even on remote hosts:

  ~ $ cd /ssh:otherhost:/etc
  /ssh:user@otherhost:/etc $ sudo find-file shadow

The password prompt is handled by Tramp, in the minibuffer.

See (info "(eshell)Built-ins")

> Thanks,
> Nordlöw

Best regards, Michael.




  parent reply	other threads:[~2009-12-16 20:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-16 11:48 sudo command with minibuffer password prompt Nordlöw
2009-12-16 13:04 ` Pascal J. Bourguignon
2009-12-16 13:56   ` Nordlöw
2009-12-16 13:59     ` Nordlöw
2009-12-17  2:39     ` Steve Revilak
2009-12-17  6:22       ` Thierry Volpiatto
2009-12-16 20:37 ` Michael Albinus [this message]
2009-12-17 10:44 ` David Kastrup
     [not found] <20091216170829.14846AF606@mxperim7.sea5.speakeasy.net>
     [not found] ` <mailman.13084.1261017601.2239.help-gnu-emacs@gnu.org>
2009-12-17 10:03   ` Nordlöw
2009-12-17 21:15     ` Pascal J. Bourguignon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d42eodtc.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=per.nordlow@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.