1848640 Members
5218 Online
104034 Solutions
New Discussion

Re: forgot root password

 
Grant Wenstrand
Occasional Advisor

forgot root password

Hello all,

I have a customer that has forgotten their root password. I have recovered from this situation using Solaris, but not HPUX. I am assuming I can do something like boot from the HPUX CD. Is this correct. Can someone point me in a direction that I can provide my clients (very non-unix types) a step-by-step process?

Thanks,

Grant
4 REPLIES 4
John Bolene
Honored Contributor

Re: forgot root password

If there is a root window open to the machine, it can be shut down first, otherwise you have to just power it off.

ON power up, it will present the boot menu and tell you to interrupt it in 10 seconds if you need to. You want to hit the enter key here and then type in bo pri -is

This will boot to single user mode where they can issue the command passwd to change the root password.

They will then want to reboot the machine.
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
Jim Moffitt_1
Valued Contributor

Re: forgot root password

You need to reboot into single user mode. To do this in HP-UX issue the shutdown -r now command. When the system is starting to boot up, it will say you have 10 seconds to interrupt boot. Do this. Then type:
bo
It will ask you if you want to interact with ISL, type y. Once at the ISL> prompt type:
ISL>hpux -is
This will bring you into single user mode. Mount your filesystems and issue the password command. Then type reboot and you should be all set.
Brian Markus
Valued Contributor

Re: forgot root password

You can reboot the machine by typeing CLT-B then use the command to reset. From there interupt the boot and go into single user mode. It's always better to cleanly shutdown the system. Check the shutdown.allow file to see if there is a user you can log in as to cleanly shutdown the system. Also a user might have "restricted SAM" access. if they do, you can use SAM to fix this problem.


I posted a bit of info on recovery and prevention a while back. Hope it helps

http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0x3475dfe5920fd5118fef0090279cd0f9,00.html


Good luck

Brian.
When a sys-admin say's maybe, they don't mean 'yes'!
Joseph C. Denman
Honored Contributor

Re: forgot root password

I'm assuming no root window open. If there were, you would just issue the passwd command.

##non trusted system
turn power off
break boot sequence
type "boot pri"
answer "y" to interact with ipl
type "hpux -is" (boots in single user)
fsck /dev/dsk/???? (/usr/disk/device)
mount /usr
at prompt type "passwd root" (Change your password)
type "reboot"

##trusted system with no passwd on single user
same as prior.

##trusted system with passwd on single user
put core_os cdrom in drive
turn power off
break boot sequence
boot (cdrom hardware path)
answer "n" to interact with IPL
at the menu go to the recovery shell
fsck /dev/dsk/(your / device driver)
I'm not sure but i think it is /mnt (dir for mounting on the cdrom) check this
mount /dev/dsk/(your / device) /mnt
cd /mnt/tcb/files/auth/r
cp -p root root.bak
vi root
go down to the u_pwd variable
remove everything between the = and the :
type reboot
you should be able to login with no password

Hope this helps

...jcd...


If I had only read the instructions first??