Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

/etc/passwd file was renamed & system is not accessible

SOLVED
Go to solution
sharif naser_1
Frequent Advisor

/etc/passwd file was renamed & system is not accessible

Hello all,

unlucky guy renamed the /etc/passwd file while he was shifting users & forgot to bring it back
Now the system is not accessible he tried hpux -is but it gave him :
fix root entry in the passwd file & reboot .
he is not able to get system prompt
what should he do to resolve this matter ?
O.S hpux11
any help is highly appreciated .

TIA
S.N.
6 REPLIES
Bill McNAMARA_1
Honored Contributor
Solution

Re: /etc/passwd file was renamed & system is not accessible

when the system boots up with
hpux -is you should get a prompt.

Then just rename the moved file back
to /etc/passwd

or

add a root user to it, you can add it with
normal password file syntax
Name:Password: UserID:PrincipleGroup:Gecos: HomeDirectory:Shell

passwd root
at the prompt

The passwd file is overlooked on hpux -is
It works for me (tm)
Shannon Petry
Honored Contributor

Re: /etc/passwd file was renamed & system is not accessible

Bill is right. From ISL >hpux -is will bring you to single user mode and /sbin/sh!

This does not require /etc/passwd, so should give you ample opportunity to move the passwd file back, or copy /usr/newconfig/etc/passwd to /etc/passwd.

Exceptions would be if you were running in trusted mode!

Regards,
Shannon
Microsoft. When do you want a virus today?
Manuel Plaza
Regular Advisor

Re: /etc/passwd file was renamed & system is not accessible

Hi sharif,

If you can't boot with "hpux -is", you could try to boot from the Recovery CD, and from the recovery shell you can mount the root disk and modify the /etc/passwd.
If you use LVM, in manual "Support Media User's Manual" P/N: 92453-90081 say you how activate LVM.

Regards and good luck !
sharif naser_1
Frequent Advisor

Re: /etc/passwd file was renamed & system is not accessible

Hi all,
all of you are right , the problem was it keeps
on asking init 0 fix root entry in the /etc/passwd file i tried ctrl-c to get rid of it but i could not .
finally i switched the console off & on & then i get the prompt .
many thanks to all of you
Regards
S.N.
John Bolene
Honored Contributor

Re: /etc/passwd file was renamed & system is not accessible

Also make sure that root is the top entry.
We had one security person who was cleaning up the password file and sorted it.
This was a version on our security server that gets rcp'd to all the rest of the 250 servers.
Needless to say, it took hours of time from several people to go thru and boot each server into single user mode and restore a good password file.
That security person is no longer with the company because he made a few more bonehead mistakes.
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
Nancy Brzezinski
Occasional Visitor

Re: /etc/passwd file was renamed & system is not accessible

Hi,

Do you have a make_recovery tape?

Nancy Brzezinski
Alterra Healthcare