home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / emacs / 2858 < prev    next >
Encoding:
Internet Message Format  |  1992-08-13  |  2.3 KB

  1. Path: sparky!uunet!psinntp!crynwr!nelson
  2. From: nelson@crynwr.com (Russell Nelson)
  3. Newsgroups: comp.emacs
  4. Subject: Question: How to use Emacs to access root-owned files 
  5. Distribution: world
  6. Message-ID: <713718335snx@crynwr.com>
  7. References: <RG.92Aug12201702@nymph.msel.unh.edu>
  8. Date: Thu, 13 Aug 92 15:05:35 GMT
  9. Organization: Crynwr Software
  10. Lines: 37
  11.  
  12. In article <RG.92Aug12201702@nymph.msel.unh.edu> rg@msel.unh.edu writes:
  13.  
  14.    >>>>> "Bob" == Bob Sutterfield <bob@MorningStar.Com> writes:
  15.    Bob> Nntp-Posting-Host: volitans.morningstar.com
  16.    
  17.    Bob> In article <BETSYS.92Aug10171110@ra.cs.umb.edu> betsys@cs.umb.edu    (Elizabeth Schwartz) writes:
  18.    
  19.    Elizabeth> I need a bit of code that prompts me for the root passwd and then
  20.    Elizabeth> lets me read and write as root. (obviously, it mustn't know the
  21.    Elizabeth> passwd!)
  22.    
  23.    Bob> Get .. [ange-ftp]
  24.    
  25.    Bob> I say ^X^F/user@hostname:/path/to/file, and ange-ftp prompts me for
  26.    Bob> that user's password on that host.  If "user" is "root", you'll be
  27.    Bob> editing a file as root on that host.  If "hostname" is "localhost",
  28.    Bob> you'll have an Emacs buffer that's root on the same machine as the
  29.    Bob> Emacs is running on.  When you ^X^S (or whatever), ange-ftp does
  30.    Bob> whatever's necessary to write the file back appropriately via FTP.
  31.    
  32.    KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE!
  33.    KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE!
  34.    KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE!
  35.    KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE! KLUDGE!
  36.  
  37. IT WORKS! IT WORKS! IT WORKS! IT WORKS! IT WORKS! IT WORKS! IT WORKS!
  38. IT WORKS! IT WORKS! IT WORKS! IT WORKS! IT WORKS! IT WORKS! IT WORKS!
  39. IT WORKS! IT WORKS! IT WORKS! IT WORKS! IT WORKS! IT WORKS! IT WORKS!
  40. IT WORKS! IT WORKS! IT WORKS! IT WORKS! IT WORKS! IT WORKS! IT WORKS!
  41.  
  42. [ Hi, Rog ]
  43.  
  44. I do this all the time, and even though you think it's a kludge, it's
  45. much more secure than making Emacs suid root.  And anyway, ange-ftp
  46. is SOOOO useful that you should have it installed anyway.  I'm
  47. thinking about adding it to my MS-DOS Emacs editor, Freemacs.
  48.  
  49. -russ <nelson@crynwr.com>  I'm proud to be a humble Quaker!
  50. Crynwr Software            Crynwr Software sells packet driver support.
  51. 11 Grant St.               315-268-1925 Voice
  52. Potsdam, NY 13676          315-268-9201 FAX
  53.