help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sudo command with minibuffer password prompt


From: Michael Albinus
Subject: Re: sudo command with minibuffer password prompt
Date: Wed, 16 Dec 2009 21:37:35 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux)

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]