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