From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.help Subject: Re: Tramp multi-hop on localhost: su:sudo Date: Sun, 07 Jun 2009 18:54:48 +0200 Message-ID: <87ljo4q90n.fsf@gmx.de> References: <20090518101805.GD26546@groll.co.za> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1244393726 18977 80.91.229.12 (7 Jun 2009 16:55:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Jun 2009 16:55:26 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Jonathan Groll Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jun 07 18:55:22 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MDLeT-0000XX-KW for geh-help-gnu-emacs@m.gmane.org; Sun, 07 Jun 2009 18:55:21 +0200 Original-Received: from localhost ([127.0.0.1]:45125 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MDLeS-0004FS-Vx for geh-help-gnu-emacs@m.gmane.org; Sun, 07 Jun 2009 12:55:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MDLe6-0004FC-6h for help-gnu-emacs@gnu.org; Sun, 07 Jun 2009 12:54:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MDLe0-0004ED-OT for help-gnu-emacs@gnu.org; Sun, 07 Jun 2009 12:54:56 -0400 Original-Received: from [199.232.76.173] (port=54398 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MDLe0-0004E6-Kz for help-gnu-emacs@gnu.org; Sun, 07 Jun 2009 12:54:52 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]:36466) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MDLe0-0002Od-0j for help-gnu-emacs@gnu.org; Sun, 07 Jun 2009 12:54:52 -0400 Original-Received: (qmail invoked by alias); 07 Jun 2009 16:54:49 -0000 Original-Received: from p57A21E18.dip0.t-ipconnect.de (EHLO arthur.local) [87.162.30.24] by mail.gmx.net (mp013) with SMTP; 07 Jun 2009 18:54:49 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1/pWtgOTM3pdkhMwrt8f++TkL27qKwHiDSc0gQZhi hgqt5fSzb9WTqK In-Reply-To: <20090518101805.GD26546@groll.co.za> (Jonathan Groll's message of "Mon, 18 May 2009 12:18:05 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.65 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:65016 Archived-At: Jonathan Groll writes: > On OS X (perhaps not unwarranted) I'm too afraid to let my regular > user have sudo rights, so if I want to edit a file as root, I need to > first su to another user account (that is in the sudoers file) and > then sudo to root. > > All works well except for tramp. I can su and edit files that belong > to another user, but still haven't worked out how to get multihop to > the root user working. > > I've read the manual, on other hosts I can use tramp multihop to first > ssh into another host and then sudo to root (eg. ubuntu boxes), but > still haven't managed to get the > su> sudo hop working on my mac. > > How do I do this? Is it possible even on the localhost? I would do (untested) (add-to-list 'tramp-default-proxies-alist '("\\`localhost\\'" "\\`root\\'" "/su:otheruser@%h:")) Then you can apply "C-x C-f /sudo:root@localhost:". > Many thanks, > Jonathan Best regards, Michael.