1834650 Members
2212 Online
110069 Solutions
New Discussion

/etc/passwd corrupted

 
achache
New Member

/etc/passwd corrupted

Hi,
I use a HP-UX B.10.20 A 9000/810.
My /etc/passwd file is corrupt and I am not abble to log on my system. I have a shell problem cause by the passwd file.
Is there a way to log on the system.
Thakns,
Fred
7 REPLIES 7
Sandip Ghosh
Honored Contributor

Re: /etc/passwd corrupted

Boot the system in single user mode. Do a vgchange -a y. Mount all the filesystems . And edit the passwd file as required.

Sandip
Good Luck!!!
Charles McCary
Valued Contributor

Re: /etc/passwd corrupted

Yes - boot to single user mode, then re-create or restore the /etc/password file.
hpuxrox
Respected Contributor

Re: /etc/passwd corrupted

You will need access to the systems console.
Access the GSP and and reset your box.


when you see the system coming up again you can interrupt the system boot sequence (it will ask you to press any key in 10 sec to stop booting), and then after pressing the key at that stage type

hpux -is

this will take you to single user mode

vgchange -a y /dev/vg00

mount -a

then edit your password file or recover it from an ignite tape.

# mt -t /dev/rmt/0mn fsf 1
# tar -xvf /dev/rmt/0m /etc/passwd


Peace.......

John Bolene
Honored Contributor

Re: /etc/passwd corrupted

Which brings up a story.

We had one security admin that sorted the password file, guess where root ended up!! Not at the top.

You will probably have to TOC the box to get it to boot, interupt the boot at the ISL prompt, then enter bo -is

This will boot the machine in single user mode, get onto a terminal attached to the serial port, and change that root password.

After you have a good root password, you can reboot the box into multi user and then get a good password file from somewhere else.
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
MANOJ SRIVASTAVA
Honored Contributor

Re: /etc/passwd corrupted

Hi Achache,

Is there a way you can ftp in to the system using another 10.2 system , if yes then ftp inot /etc and copy the paswd file from the other system or you can put a file which atleast has root into that machine . if you cant do that then you will have to boot in single user miode and edit the file manually.


Manoj Srivastava
David Burgess
Esteemed Contributor

Re: /etc/passwd corrupted

I guess if he can't login then he won't be able to ftp in. Without the password file the login won't get authenticated.

I think single user mode will be the only option.

pap
Respected Contributor

Re: /etc/passwd corrupted

Hi,
Boot the system in to single user mode Tou have to press any key at 10 sec notification. You will get BOOT ADMIN rompt.
Then boot the system using bo command. and interect with ISL.
At ISL prompt give
ISL> hpux -is

this will boot the system in to single user mode.
Then issue mountall command. and use vi to edit the password file or restore it from backup.

thanks,
-pap
"Winners don't do different things , they do things differently"