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: David Kastrup
Subject: Re: sudo command with minibuffer password prompt
Date: Thu, 17 Dec 2009 11:44:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux)

Nordlöw <address@hidden> 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?

Something like

(with-temp-buffer
  (cd "/sudo::/")
  (shell-command "cat /etc/shadow"))

should work.

-- 
David Kastrup


reply via email to

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