home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / hp / 8580 < prev    next >
Encoding:
Internet Message Format  |  1992-07-27  |  3.3 KB

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!usc!rpi!psinntp!psinntp!eye!paul
  2. From: paul@eye.com (Paul B. Booth)
  3. Newsgroups: comp.sys.hp
  4. Subject: Re: Backup to DAT over net
  5. Message-ID: <1992Jul27.095125.2987@eye.com>
  6. Date: Mon, 27 Jul 92 13:51:25 GMT
  7. References: <1992Jul23.170942.11576@cs.nott.ac.uk>
  8. Organization: 3D/EYE, Inc.  Ithaca, NY
  9. Lines: 78
  10.  
  11. In article <1992Jul23.170942.11576@cs.nott.ac.uk> pczip@mips.Berkeley.EDU (Ivan Powis) writes:
  12. >We recently installed several hp9000/700's which are all networked together
  13. >along with a single DAT drive. One question we asked all suppliers, including
  14. >hp , was "can you run a backup over the net?". They all said yes. However,
  15. >having chosen hp, I now find its not so simple. Using fbackup and traversing
  16. >nfs mounts to get at files on the remote systems (ie not having the DAT drive)
  17. >isn't adequate, because the superuser protection applied by NFS stops me 
  18. >accessing remote files that don't have general access permission. So using
  19. >NFS to get at the remote file sytems isn't the answer.
  20. >
  21. >How do you go about this? At the moment we're having to physically carry the DAT
  22. >drive around from machine to machine. This surely isn't the way it has to be done
  23. >is it? 
  24. >
  25. >Ivan Powis
  26.  
  27. At 9.0, rumor has it, hp-ux will update its NFS implementation to allow you
  28. to permit root access on an nfs-mounted filesystem.  Until then, there is a
  29. quick hack that will let you do this now.  Here's the deal.  When the
  30. super user accesses an nfs-mounted filesystem, NFS maps the UID of root to
  31. "nobody", which is defined in the kernel of the remote machine.  Generally,
  32. "nobody" is defined to be -2 or some such, so root can't access any non
  33. world-readable files on the remote server.  But, if you redefine "nobody"
  34. to be 0 on the remote server, root gets full access there.
  35.  
  36. The classic way to do this is to use adb to edit /hp-ux (or /dev/kmem
  37. directly) on the remote server.  BE AWARE, though, that this procedure asks
  38. you to do "bad" things:  1) disable an important NFS security measure, and 2)
  39. edit a (running) kernel.  Assuming that you are aware of the risks (and that
  40. you won't come looking for me if you cause yourself problems!), here's a
  41. little ditty I use to enable/disable nfs root access on a running machine
  42. (credit for this script should go to the anonymous netster who sent it to me
  43. some time ago):
  44.  
  45.     #! /bin/sh
  46.     #
  47.     #  rootaccess - enable/disable root access for nfs clients
  48.     #
  49.     KERNEL="/hp-ux"
  50.     MEMORY="/dev/kmem"
  51.     NOBODY="nobody"
  52.     #
  53.     case "$1" in
  54.         on|yes|enable|allow)
  55.             ANONUID="0x00000000";;
  56.         off|no|disable|deny)
  57.             ANONUID="0xfffffffe";;
  58.         *)
  59.             echo "usage: rootaccess [on|off]" 1>&2;
  60.             exit 1
  61.     esac
  62.     #
  63.     (echo "$NOBODY/W $ANONUID"; echo '$q') | \
  64.         adb -w $KERNEL $MEMORY
  65.     #
  66.     exit 0
  67.  
  68. This script modifies /dev/kmem directly, so the change takes place immediately
  69. and will only last until the next reboot.  If you modify /hp-ux instead, you
  70. need to reboot to effect the change, which lasts until you build a new
  71. kernel.
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84. -- 
  85. Paul B. Booth  (paul@eye.com)
  86. -------------------------------------------------------------------------------
  87. 3D/EYE, Inc., 2359 N. Triphammer Rd., Ithaca, NY  14850    voice: (607)257-1381
  88.                                                              fax: (607)257-7335
  89.