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: Editing Files Like /etc/hosts Date: Fri, 10 Mar 2006 09:11:22 +0100 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1141989065 2143 80.91.229.2 (10 Mar 2006 11:11:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 10 Mar 2006 11:11:05 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 10 12:11:03 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FHfWP-000152-Mx for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Mar 2006 12:11:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FHfPQ-000657-IV for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Mar 2006 06:03:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FHcih-0008Rf-LU for help-gnu-emacs@gnu.org; Fri, 10 Mar 2006 03:11:31 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FHcig-0008RI-3o for help-gnu-emacs@gnu.org; Fri, 10 Mar 2006 03:11:30 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FHcif-0008RA-LV for help-gnu-emacs@gnu.org; Fri, 10 Mar 2006 03:11:29 -0500 Original-Received: from [194.113.59.96] (helo=mailrelay2.alcatel.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FHclu-0000vy-Vz for help-gnu-emacs@gnu.org; Fri, 10 Mar 2006 03:14:51 -0500 Original-Received: from slbwba.alcatel.de (slbwba.bln.sel.alcatel.de [149.204.93.70]) by mailrelay2.alcatel.de (8.12.10/8.12.10/ICT TSC MAIL 2005) with ESMTP id k2A8BO3g002838; Fri, 10 Mar 2006 09:11:24 +0100 Original-To: Annamalai Gurusami In-Reply-To: (Annamalai Gurusami's message of "Fri, 10 Mar 2006 11:31:17 +0530") User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/20.7 (hpux) X-Scanned-By: MIMEDefang 2.49 on 149.204.45.73 X-Mailman-Approved-At: Fri, 10 Mar 2006 06:03:30 -0500 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:33681 Archived-At: Annamalai Gurusami writes: > Hi All, Hi, > > Suppose I am currently logged in as a normal user, and am using emacs > for editing some files. And while in the middle of such an emacs > session, I would like to change the file /etc/hosts. How can I open > this file such that I can edit it? > > If I do something like this > > C-x C-f /root@localhost:/etc/hosts RET > > I am getting login incorrect, because I think by default we cannot > login as 'root' in a ftp session. You might try Tramp . Then you could edit something like "/su:root@localhost:/etc/hosts" (or "/su::/etc/hosts" in short). > Rgds, > anna Best regards, Michael.