Operating System - HP-UX
1833873 Members
1569 Online
110063 Solutions
New Discussion

Forgotten root password !

 
Jemida Gabber
New Member

Forgotten root password !

I have recently bought a HP 712/80 running
hpux [B 10.01]
it boots ok to a generic console login but i have no password.
Do i go in with a disk editor and rename
/etc/passwd or can i boot single user like in linux ?
I know nothing about hpux but have experience with rh & mandrake linux.

Any help /advice will be greatly appreciated

thanks -
Jemida. [farmer@cyberspace.org]
24 REPLIES 24
Albert E. Whale, CISSP
Honored Contributor

Re: Forgotten root password !

If you rename the /etc/passwd file, then you'll need to reload the OS.

I would boot into the Single User mode (follow these instructions http://us-support.external.hp.com/cki/bin/doc.pl/sid=e8b4add20e3834639b/screen=ckiDisplayDocument?docId=200000048117891 ), from there you can reset the root password!

Hope that helps!

Sr. Systems Consultant @ ABS Computer Technology, Inc. http://www.abs-comptech.com/aewhale.html & http://www.ancegroup.com
Antoanetta Naghiu
Esteemed Contributor

Re: Forgotten root password !

Hello,
Once you boot in single user mod (hpux -is), you can edit /etc/passwd. Just vi /etc/passwd and delete the password field. In /etc/passwd file, : (colon) is the field delimitator and encrypted password field is the second one after user name. (root::0:3::/:/sbin/sh).
If you have password for single user mod you have to boot from cdrom.
If your box is in network with others, you can try to get an .rhosts or /etc/hosts.equiv file that allowed you to get in as root.
CHRIS_ANORUO
Honored Contributor

Re: Forgotten root password !

Hello Jemida,

Reboot and interact through ISL. From ISL prompt use hpux -is, this will take you into single user mode. At the prompt you can change your root password. Then reboot the system.

Cheers!
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Andreas Voss
Honored Contributor

Re: Forgotten root password !

Hi,

just for convenience:

Turn on your box
Hold on the Escape key until a menu appears.
Type 'boot pri isl'
When the ISL> prompt appears type:
hpux -is
(if you have HP-UX 9.x type: hpux -is boot)
The system is now booting in single user mode.
When you get the root shell prompt (#) type:
passwd root
The system asks you twice for the new root's password.
If you have done type:
reboot
Now your box reboots and comes normally up and you can login as root with your previous changed password.

Greetings

Andrew
Gino Valdés
Occasional Contributor

Re: Forgotten root password !

Turn on your box
Type 'boot pri isl'
When the ISL> prompt appears type:
hpux -is
When you get the root shell prompt (#) type,
mount -a
passwd root
the system asks you twice for the new root's password.
type reboot, in shell prompt (#)
Now your box reboots and comes normally up and you can login as root with your previous changed password
Venu_2
Regular Advisor

Re: Forgotten root password !

Hi,

Adding for the above

In case pressing ESC key doesn't bring you to the menu, it means the workstation is secured.

I such condition you have to disconnect the disks and switch it on.

As the disks are not available autoboot comes out with error,here you can disable the secure mode.

Switch off, connect the disks and follow the procedure give by Andreas voss.

Cheers

venu
Pedro Luis Estraño
Contributor

Re: Forgotten root password !

Jemida,

1) Interrup the boot
2) boot in single user mode (ISL> hpux -is)
3) mount /var, /usr
4) cd /etc
5) vi passwd
6) delete the password encripted
7) reboot the system

Bye
Hello everyone
Philip Chan_1
Respected Contributor

Re: Forgotten root password !

Guys,

What if the system is in trusted mode? does it mean something got to do with the shadow password file too? I ran into the above problem before and luckly I had another account that could run restricted SAM, through that I un-trusted the system then do the single user mode trick.

Rgds,
Philip
Rick Garland
Honored Contributor

Re: Forgotten root password !

Another option is to disconnect all bootable devices from the system and then boot. If the root passwd is locked in single user mode (can't change unless you know the root passwd) the system will boot, look for bootable devices, not find any, come up to unsecure mode so you can change the root passwd.
Dave Wherry
Esteemed Contributor

Re: Forgotten root password !

Rick,
How does that work? /etc/passwd is typically on your bootable device. If you go to single user without a bootable device and try to change the password, where does the change get written to?
If you reconnect your bootable devices and come back up you're still reading your old unchanged copy of /etc/passwd.
Rick Garland
Honored Contributor

Re: Forgotten root password !

The system is out there looking for some boot device. It can't find any and will go to the (I believe) the PDC.

It's been awhile since I did this but it was done with a 10.20 system K box. Also, it has been only twice I have had to do this.

The secure function of the root passwd (in single user mode) is not written to the /etc/passwd. This procedure allows you to bypass the single user secure function.

Dave Wherry
Esteemed Contributor

Re: Forgotten root password !

Right. I've done something similar. Used to be that if you pulled the terminator off of a bus it would panic the box and drop you to single user where you were root without needing a password.
The problem here is that with the boot disk disconnected, when he reconnects that disk he's going to come back up with the same bad password. It does not get changed.
I was just curious if you had something I had not seen before, which is likely.
Curt Kissinger
Advisor

Re: Forgotten root password !

What if you have no login and no password? Does HP-UX 9.X have a default login?
MCP
Antoanetta Naghiu
Esteemed Contributor

Re: Forgotten root password !

Even in 9.x you have root. And the possibility to boot in single user mode. Also, it is a little switch on the back of the machine (at least E35) to get the service mode.
Also, you can boot from the cdrom (if you have) or bootable tape.
Could be a long topic. Do you realy need help or is just a Friday afternoon disscution? Anyhow, it is interesting. Come back if you need more...
Curt Kissinger
Advisor

Re: Forgotten root password !

Yes! I/we really need help! We have a 382 controller with HP-UX 9.X and all the people that worked on it are no longer available or have forgotten their login and pass. We have no cd-rom or tape to boot from. The 382 has one scsi hdd in it, and the data on that drive is very important. We need root on this controller. Can anyone help?
Thanks.
MCP
Antoanetta Naghiu
Esteemed Contributor

Re: Forgotten root password !

Curt,
I am not familiar with 382 controller. I worked with E35 machine (server 9000) with 9.04 and K class server with 9.01.
Is this 382 an 3000 one? (sorry if this is a very silly question, but if was not a ws or server everything below is non sense).
You said you do not have cdrom or tape. You mean you do not have media (we can get one) or the box doesn't have the physical drive? Is the box into the network? do you know its IP address? If power on, can you ping it?
Try to log a post. Maybe someone else can help better.
Curt Kissinger
Advisor

Re: Forgotten root password !

The 382 Controller is from the 9000 series-- Workstation. This equipment was retired in '92. It was on a network then, but it is not now. I never saw it in '92 so I dont know the configuration of that time, and nothing was documented. Correct NO MEDIA! It has 1 scsi hardrive with the OS and programs on it.(I think). It will boot to a login screen, but we have no login and pass.
What we need most is the HP Basic programs we believe are stored on this 382's hard drive. Can anyone help?
Thanks.
MCP
nag_2
Occasional Contributor

Re: Forgotten root password !

restore old password file,reboot the HPUX system to ISL prompt and type the following
at ISL prompt

hpux -lm

when it came to # prompt you just say

passwd root

and it will prompt for new password,give new one and enjoy with ur system

-Nagaraj
have nice sys admin time
Antoanetta Naghiu
Esteemed Contributor

Re: Forgotten root password !

1.The old machine (at least server, hope your ws as well) used to have a button or a key position for "service status". In this situation, try to boot and press ESC to get to the single user mode. If you are lucky, you can get there without password and go and change the root password. See the following link, it may help:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0x603249c5ae73d4118fef0090279cd0f9,00.html
2.I understood you have no media, but still I can not get if you have or not the tape drive or cdrom drive. If yes, you can try to contact Response Center to get a cdrom or a bootable tape and everything is cool... If they can not help, tell me what you have tape or cdrom and I'll try to get a solution. If no tape device or cdrom drive on the machine...
3. Do you have any other machine running 9.x? What about 10.x? I think you may try to get the physical disk drive attached to another machine and try to import it there as... let's say vg10. If that work, can try transition link... It may be a crazy idea but it is only one that pass my head at this time...
4. Try you luck like: Get the box physical connect into the network. Let's suppose the old config is still in place. Do you have another Unix box that exists at that time with the same name when this one was functioning? Why I ask that? If somehow, it your 9.x box you have a .rhost for root, you may be able to rlogin as root without password, or maby a old user account can do that...
Here you have a chance! Try it!
5. Lottery: Try to login as root using as password: password, Password, the nmae of the box, that_time_sys_admin_name
6. Hire hackers! (just joking)...
As I said, someone else from Forum can have a better idea...
Anyway, best of luck... If you get it, post the solution! If continue to look for help, ask... Someone here should finally get it! In Unix, everything is possible!
Curt Kissinger
Advisor

Re: Forgotten root password !

Lets see...A BIG thanks to all that are trying to help...but, I hit escape at bootup and all I get is 'Select System, type RETURN'(spacebar does the samething). And the system chioces are; 1H SYSHPUX, 1D SYSDEBUG, 1B SYSBCKUP, 1S SYSTEST, 1X SYSXDB. None of these get me ISL> prompt or into the system. I can't get to an ISL> prompt(at least the way everyone is saying I should be able to), so that leads me to believe it is in secure mode. I disconnect all boot devices and the LAN and wait for an error message telling me there is no boot device....I don't get the message. It just sits there at 'System Search Mode'. And doesn't do anything else. So I still havn't got into this thing. Keep in mind this is a 382 Controller, there is no media and no drive for media even if i had the media(no cdrom or tape- just one 3 1/2" floppy), Got anymore ideas? Can anyone make me an image of a floppy bootdisk for this thing? Would that even help?
Thanks Again.
MCP
Dave Wherry
Esteemed Contributor

Re: Forgotten root password !

It seems you are just looking for the data that is on the hard drive. Have you thought about pulling the drive out and putting it in another system as the 2nd drive?
I'm not sure what the steps would be. If the disk is under LVM control you might be able to vgimport it as a new volume group. You also have to be careful not to do anything destructive to it.
Maybe some one else knows how to do this.
Curt Kissinger
Advisor

Re: Forgotten root password !

I have 9, 382 controllers here and only one of them has a hard drive in it. :-(
I do have a HP 9000 827S but I'm not sure how to hook up the 50 pin scsi drive to it and get it working.
MCP
Curt Kissinger
Advisor

Re: Forgotten root password !

-- I finally got into the 382 controller! No magic smoke and mirrors, my company finally after 6 months located the guy who originally designed the system. His root password worked. All he would tell me was he had some kind of "lock" (???) program running on it and thats why nothing worked.
got me curious now.
THANKS EVERYONE!
MCP
Antoanetta Naghiu
Esteemed Contributor

Re: Forgotten root password !

That's a good news!!!
Sorry, I could not get to the Forum for a while, but, anyway, I had no more idea...
I'm happy you solve it! I never think could be a "lock program" not documented and just left there....
Anyway, everything's well that finished well....