Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I've lost my root password!!

Tips and Tricks

I've lost my root password!!

by  MikeLacey  Posted    (Edited  )

This is a thread from Aug 2000 but there have been a number like it over the past couple of years.

I chose *this* one to turn into a FAQ because it shows a couple of approaches.

If you're reading this FAQ because you've lost your root password --

Read it carefully,

Read all of it.

Don't worry about asking for advice in the forum just because there's a FAQ on the subject.

Mike

P.S. Never done this before, just turned a thread into a FAQ instead of writing a tutorial. Let me know what you think.


<font color=blue>
crystaln (MIS) Aug 29, 2000

Hello. The old SA left taking the root password with him and now noone knows it. I have tried the crack program to try to crack the password, but it did not work. Any suggestions would be greatly appreciated.

Thanks in Advance

adiosadios (Visitor) Aug 29, 2000
I assume you can't log in??? The system comes up but there is no access?
Don't know if you are on a server, workstation, web console, console, ???
You must boot to single user mode:

/sbin/shutdown -y 0 should do it for a 10.x

or you can completely power down and upon re-boot press any key, press

bluehkg (TechnicalUser) Aug 30, 2000

Go to the console, reboot your HP-UX box to single user mode, then change root password. That's it.

1. shutdown -r -y 0 ;shutdown and reboot
2. Intercept AUTOBOOT by pressing space bar
3. bo pri isl ; I assume you are booting primary boot path
4. hpux -is ; simple user mode
5. passwd root ; change root password

And you have your root password changed. So never let any stranger approach your console. ;)

bluehkg (TechnicalUser) Aug 30, 2000

Sorry. Typo. "Single User Mode"!!!!


AndyBo (MIS) Aug 30, 2000

This might be a stupid question, but don't you have to log in as root in the first place to run shutdown or reboot?
Andy Bold

0 1 - Just my two bits

bluehkg (TechnicalUser) Aug 30, 2000

Andy,
<grin> Yes, you're right. Thanks for correcting me. So step 1 should be hardboot your machine instead of "shutdown -r -y 0".

Was this post helpful?

crystaln (MIS) Aug 31, 2000

Thanks for the input. It is a server, running an oracle database. Don't really want to just hard boot it. I started snooping around under a user name and noticed a .rhosts file. called the SA for that box and got in. I should have looked for that first.



ndyBo (MIS) Aug 31, 2000

Yay! Security hole to the rescue! Now that you've got the root password changed, you are going to remove that .rhosts file, aren't you? And make sure /etc/hosts.equiv doesn't have any entries?

Glad you're back in, and sorry for getting all paranoid...
Andy Bold
"I've probably made most of the mistakes already, so hopefully you won't have to..." Me, most days.

crystaln (MIS) Sep 14, 2000

Yeah, removed those as soon as I got in. Thanks for the input!!
[/tt]
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top