home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / hp / 10366 < prev    next >
Encoding:
Text File  |  1992-09-13  |  3.4 KB  |  79 lines

  1. Newsgroups: comp.sys.hp
  2. Path: sparky!uunet!spool.mu.edu!cserver!edsi!chuck
  3. From: chuck@edsi.plexus.COM (Chuck Tomasi)
  4. Subject: Re: root access over NFS
  5. Organization: Enterprise Data Systems Incorporated, Appleton WI
  6. Date: Sun, 13 Sep 1992 22:20:31 GMT
  7. Message-ID: <1992Sep13.222031.15434@edsi.plexus.COM>
  8. References: <1992Sep13.160455.4449@pollux.lu.se> <BuJ3uJ.8ML@ie.utoronto.ca>
  9. Lines: 68
  10.  
  11. andy@ie.utoronto.ca (Andy Sun) writes:
  12.  
  13. :)COMMANDS                               COMMENTS
  14. :)----------------------------------     -------------------------------
  15. :)# adb -w /hp-ux                        Run the absolute debugger with
  16. :)executable file = /hp-ux                 the write option on the kernel
  17. :)core file = core
  18. :)ready
  19.  
  20. :)nobody?D                               Display 'nobody' in decimal
  21. :)_nobody:    -2                         System's repsonse: its value is -2
  22.  
  23. :)nobody?W0                              Use a 4-byte write to change the
  24. :)                                         contents of 'nobody' to 0
  25. :)_nobody:    0xFFFFFFFE   =   0x0       System's response: its value is now 0
  26.  
  27. :)nobody?D                               Display (in decimal) the contents
  28. :)                                         of 'nobody' to double-check
  29. :)_nobody:    0                          System's response: its value is still 0
  30.  
  31. :)$q                                     Type '$q' to exit adb  
  32.  
  33.  
  34. This patch (as noted) will only patch /hp-ux.  If you don't want to
  35. reboot right away you should also patch the file /dev/kmem.  You can do
  36. both at once with the command:
  37.  
  38. # adb -w /hp-ux /dev/kmem
  39.  
  40. If you have plans of regenerating a new kernel some day (adding device
  41. drivers, modifying kernel parameters, etc) you'll have to do this all
  42. over again.  I called HP and asked how I could make this more permanent
  43. since I didn't want to patch the kernel after every iteration of a new
  44. kernel.  They said they couldn't say (another unsupported feature.)  I
  45. went ahead and hacked away and asked on the net.  I got the answer from
  46. both about the same time, but you need to go into the directory
  47. /etc/conf (on 400 systems) and /etc/conf/lib (on 700 systems) and use
  48. the "ar" command to extract the file nfs_server.o from the library
  49. archive libnfs.a.  This can be done with the command:
  50.  
  51. # ar xv libnfs.a nfs_server.o
  52.  
  53. Again, use adb in the same way as above to patch the file nfs_server.o
  54. and put it back in the file libnfs.a with the command:
  55.  
  56. # ar uv libnfs.a nfs_server.o
  57.  
  58. Now every time you regenerate a new kernel you don't have to do the
  59. patch since nobody is already set to 0 in the library that gets linked
  60. in.  Pretty neat.
  61.  
  62. NOTE:  This is all from memory (especially the part about the 700
  63. library).  My notes on this are at work and I'm writing this from home.
  64. I apologize for the misplacement of directories or filenames, but it
  65. should get you started in the right direction.
  66.  
  67. !!BIG NOTE!!  This is a security hole in your ENTIRE system since anyone
  68. who gains root access can create, delete, and modify files on other
  69. machines who have the kernel patch.  That is the primary reason HP
  70. doesn't support this feature.
  71.  
  72. !! SUPER BIG NOTE !! If the whole thing blows up and you lose data - I
  73. had nothing to do with it so don't call me.  :)
  74. -- 
  75. Chuck Tomasi             |     "It's my job to help
  76. chuck@edsi.plexus.COM    |      but I don't have to like it."
  77. spool!cserver!edsi!chuck |                    -Dr. Crusher, "I, Borg"
  78. ------<Enterprise Data Systems Incorporated, Appleton Wisconsin>------
  79.