SUMMARY: Corrupt Root Account

From: Ralf Borowski (rborowski@tembec.ca)
Date: Tue Jun 04 2002 - 18:09:00 EDT


As usual, this list has saved the day! Responses came in within 10
minutes.

Original Problem:

>Hello managers,
>
>I have a 5.1A server, PK1, advfs for all filesets, that has a corrupt
>passwd file. Most accounts are fine; root is missing from the file.
>
>Does anyone have any suggestions for fixing the root account entry in
>the passwd file? I suspect that I could boot from the CD, mount the
>boot disk, edit the passwd file, and then re-boot, but that's not
>something I want to do....
>
>Thanks!
>
>Ralf Borowski
>Senior Systems Specialist
>Tembec Inc. - Pulp Group
>Tel. (819) 627-4103
>Fax. (819) 627-9908
>rborowski@tembec.ca

Suggestions were received from:

Cian O'Sullivan
alan@nabeth.cxo.cpqcorp.net
Dr. Thomas Blinn
A. Mahendra Rajah
David Ross
Paul Crittenden

Several people agreed that booting the CD would work; others suggested
booting to single-user mode, and some suggested that I hack my server ;)

I liked the idea of single user mode and solved this problem as follows:

Step 1 - shutdown all database instances and listeners to reduce risk of
data corruption
Step 2 - press the halt button
Step 3 - Boot to single-user mode with ">>> boot -fl s"
Step 4 - Mount all file systems with "bcheckrc"
Step 5 - Add a new root account to the passwd file
   # cp passwd passwd.new
   # ed passwd
   i
   root::0:1:system PRIVILEGED account:/:/bin/sh
   .
   w
   q
Step 6 - Go to run-level 2 to test this with "init 2"
Step 7 - login as root. This worked so finish the boot with "init 3"
Step 8 - login as root and change password. Also, moved the "root"
entry in the passwd file to be the first entry, not the second last as
it was after my experiment with "ed".

So far, the server seems to be normal...

Thanks again!



This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 10:48:43 EDT