From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Ralf Borowski Newsgroups: gmane.os.tru64.managers Subject: SUMMARY: Corrupt Root Account Date: Tue, 04 Jun 2002 18:09:00 -0400 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: <000001c20c14$6de3a570$f7c8030a@rborowski> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1023228729 539 127.0.0.1 (4 Jun 2002 22:12:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 4 Jun 2002 22:12:09 +0000 (UTC) Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.20.101]) by main.gmane.org with smtp (Exim 3.33 #1 (Debian)) id 17FMXB-00008a-00 for ; Wed, 05 Jun 2002 00:12:09 +0200 Original-Received: (qmail 25263 invoked by uid 5); 4 Jun 2002 22:11:40 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 25255 invoked from network); 4 Jun 2002 22:11:40 -0000 Original-Received: from unknown (HELO emroute2.cind.ornl.gov) (128.219.159.41) by 0 with SMTP; 4 Jun 2002 22:11:40 -0000 Original-Received: from emroute2.cind.ornl.gov (LOCALHOST [127.0.0.1]) by emroute2.cind.ornl.gov (PMDF V6.1-1 #39060) with ESMTP id <0GX700LJMCBF1A@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 04 Jun 2002 18:11:40 -0400 (EDT) Original-Received: from onlink2-2.onlink.net (onlink2-2.onlink.net [206.108.253.77]) by emroute2.cind.ornl.gov (PMDF V6.1-1 #39060) with SMTP id <0GX700METCBANS@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 04 Jun 2002 18:11:34 -0400 (EDT) Original-Received: (qmail 25768 invoked from network); Tue, 04 Jun 2002 22:12:06 +0000 Original-Received: from unknown (HELO rborowski) ([209.105.210.238]) (envelope-sender ) by 0 (qmail-ldap-1.03) with SMTP for ; Tue, 04 Jun 2002 22:12:06 +0000 Original-To: tru64-unix-managers@ornl.gov X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Mailer: Microsoft Outlook, Build 10.0.2627 Importance: Normal X-Priority: 3 (Normal) X-MSMail-priority: Normal Xref: main.gmane.org gmane.os.tru64.managers:440 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:440 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!