home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.emacs
- Path: sparky!uunet!nic.unh.edu!newshost.unh.edu!rg
- From: rg@msel.unh.edu (Roger Gonzalez)
- Subject: Re: Question: How to use Emacs to access root-owned files
- In-Reply-To: bob@MorningStar.Com's message of Wed, 12 Aug 1992 16:01:49 GMT
- Message-ID: <RG.92Aug12201702@nymph.msel.unh.edu>
- Sender: news@newshost.unh.edu (USENET News System)
- Organization: UNH Marine Systems Engineering Lab
- References: <BETSYS.92Aug10171110@ra.cs.umb.edu>
- <BOB.92Aug12120143@volitans.MorningStar.Com>
- Distribution: comp
- Date: Thu, 13 Aug 1992 01:17:02 GMT
- Lines: 37
-
- >>>>> "Bob" == Bob Sutterfield <bob@MorningStar.Com> writes:
- Bob> Nntp-Posting-Host: volitans.morningstar.com
-
- Bob> In article <BETSYS.92Aug10171110@ra.cs.umb.edu> betsys@cs.umb.edu (Elizabeth Schwartz) writes:
-
- Elizabeth> I need a bit of code that prompts me for the root passwd and then
- Elizabeth> lets me read and write as root. (obviously, it mustn't know the
- Elizabeth> passwd!)
-
- Bob> Get .. [ange-ftp]
-
- Bob> I say ^X^F/user@hostname:/path/to/file, and ange-ftp prompts me for
- Bob> that user's password on that host. If "user" is "root", you'll be
- Bob> editing a file as root on that host. If "hostname" is "localhost",
- Bob> you'll have an Emacs buffer that's root on the same machine as the
- Bob> Emacs is running on. When you ^X^S (or whatever), ange-ftp does
- Bob> whatever's necessary to write the file back appropriately via FTP.
-
- KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE!
- KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE!
- KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE!
- KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE!
-
- Its much less kludgey if you just add a built-in command to Emacs called
- "su-command", that prompts for a password, and does a setuid. Of course, this
- requires that you make Emacs suid root, which is probably a Bad Thing.
-
- -Roger
- --
- "The question of whether a computer can think is no more interesting
- than the question of whether a submarine can swim" - Edsger W. Dijkstra
-
- Roger Gonzalez - rg@msel.unh.edu
- Division of Bit Banging and Reluctant Robotics
- UNH Marine Systems Engineering Laboratory, Durham, NH 03824-3525
- (603) 862-4600 -4399 (fax)
-
-