home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / sgi / 16250 < prev    next >
Encoding:
Internet Message Format  |  1992-11-10  |  2.1 KB

  1. Path: sparky!uunet!mcsun!ub4b!news.cs.kuleuven.ac.be!blekul11!frmop11!barilvm!vms.huji.ac.il!pita.cs.huji.ac.il!nntpserver!amoss
  2. Newsgroups: comp.sys.sgi
  3. Subject: Re: fsck problem in single user mode
  4. Message-ID: <AMOSS.92Nov6134723@shuldig.cs.huji.ac.il>
  5. From: amoss@shuldig.cs.huji.ac.il (Amos Shapira)
  6. Date: 6 Nov 92 13:47:23
  7. References: <1992Nov5.113332.22423@sun1.ruf.uni-freiburg.de> <s05345o@zuni.esd.sgi.com>
  8. Organization: Inst. of Comp. Sci., Hebrew University, Jerusalem, Israel
  9. NNTP-Posting-Host: shuldig.cs.huji.ac.il
  10. In-reply-to: olson@anchor.esd.sgi.com's message of 5 Nov 92 18:04:55 GMT
  11. Lines: 45
  12.  
  13. In article <s05345o@zuni.esd.sgi.com> olson@anchor.esd.sgi.com (Dave Olson) writes:
  14.  
  15.    (Rainer Kleinrensing) writes:
  16.    | today we had a problem with a mangled root entry in /etc/passwd.
  17.    | To fix it, we booted single user and manually did a /etc/fsck /dev/usr
  18.    | in order to be able to mount it and use 'vi'. However, fsck wanted to
  19.    | print a message like 'UNREF FILE, OWNER=root', but what was printed was
  20.    | 'UNREF FILE, OWNER=Bus error (ore dumped)', fsck was not able to
  21.    | continue beyond this point.
  22.    | With 'echo' we created a passwd file with only the root entry,
  23.    | after that fsck worked. Perhaps one could fix this ?
  24.  
  25. That's why ed is under the /bin directory, so you are not completly dependent
  26. on /usr. (just a quick ed(1) lesson:
  27. # /bin/ed /etc/passwd
  28. 1s/:[^:]*:/::
  29. w
  30. q
  31. #
  32.  
  33. or just rewrite the entire root entry:
  34.  
  35. 1p
  36. (ed will print the root entry, presuming you left it first)
  37. 1c
  38. (re-enter the root entry without the password)
  39.  . (a bare dot, I can't show you here since it might confuse the news
  40.     software)
  41. w
  42. q
  43.  
  44.  
  45. Other ways to overcome this would be to mv (again under /bin) the
  46. password file to /etc/passwd.bad and do an
  47. 'echo "root::0:0:Super-User:/:/bin/csh" > /etc/passwd' just until you can
  48. get the system up (or just to let fsck to finish properly?).  Another, I guess
  49. easier, way would be to just move the disk to another machine and fix it there.
  50.  
  51. Hope you find one of these solutions helpfull.
  52.  
  53. Cheers,
  54. --
  55. --Amos Shapira (Jumper Extraordinaire)
  56. C.S. System Group, Hebrew University, Jerusalem, Israel
  57. amoss@cs.huji.ac.il
  58.