1834196 Members
2880 Online
110065 Solutions
New Discussion

Root Password

 
william_39
Occasional Advisor

Root Password

Dear all,
I have one qui. ?

How to get password of root if someone forget it.

I know its silly qui., but sometime in future this situation can arrise.

Thanks & Regards
william
10 REPLIES 10
U.SivaKumar_2
Honored Contributor

Re: Root Password

hi,
there is no way to know the root password again.
If your system is not a secured system , you
can boot your system in single user mode by
ISL>hpux -is
you will get root access without any passwords
now. edit /etc/passwd file and remove the root's encrypted password.
note : take a copy of password file first.
#passwd
give your new password now. you will be able to use the new password from that time.
regards,
U.SivaKumar
Innovations are made when conventions are broken
Michael Tully
Honored Contributor

Re: Root Password

Booting into single user mode will start
your session as root anyway. So you will be able to change the password.

If you system is trusted and you have the
security policy box checked as below

"Require Login Upon Boot to Single-User State"
then you have a big problem.

One of the best ways to get around this is to install 'sudo'. One of the advantages of 'sudo' is that you don't need to rememeber the 'root' password.

You get all the information here as well as downloading a copy suitable to your OS version:

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/sudo-1.6.2b1/

Cheers
~Michael~
Anyone for a Mutiny ?
Steven Sim Kok Leong
Honored Contributor

Re: Root Password

Hi,

Apart from booting-up to single-user mode as already mentioned, if your single-user mode is secured, your only way out would be to attempt a security compromise of your system:
1) password crack
2) buffer overflow
3) other root compromise attacks

For password crack, if
1) You did not convert your system to trusted and you did not shadow your /etc/passwd file, and
2) The password you use for your root account is weak,
THEN you can attempt a crack on the password hash to retrieve the plaintext password:

http://www.users.dircon.co.uk/~crypto/download/c50-faq.html

For buffer overflow and root compromise attacks, IF your system is not updated with security patches, THEN you can download the attack programs to attempt a root compromise or buffer overflow of your system to gain root access.

Hope this helps. Regards.

Steven Sim Kok Leong
Trond Haugen
Honored Contributor

Re: Root Password

In addition to what's already mentioned. If your root disk is external you can mount it on another system and exit the password file.

Regards,
Trond
Regards,
Trond Haugen
LinkedIn
Bill McNAMARA_1
Honored Contributor

Re: Root Password

Passwords are encrypted with a one way encryption.

The password crackers will generate passwords, encrypt them and see if they match the encrypted version, but all for the sake of figuring out that root password is "iforget" is a bit of a long wait.

hpux -is can boot you into init S, where you get asked for no password, allowing you to change it to something new (although you never find out what the password was)

The -is can be protected securely at the BCH, hopefully you don't forget that password... cos that means opening the box.

Later,
Bill

It works for me (tm)
Steven Sim Kok Leong
Honored Contributor

Re: Root Password

Hi,

I forgot to mention that you can also boot from the Support CD and run a Recovery Shell to modify the passwd file. With this, even if you enabled login for single user mode, you will still be able to tamper with your /etc/passwd file simply by booting from the Support CD, running the Recovery Shell, fsck the root VGs, mounting them and subsequently update /etc/passwd.

You can find the details at http://www.docs.hp.com

Hope this helps. Regards.

Steven Sim Kok Leong
Deepak Extross
Honored Contributor

Re: Root Password

Speaking as a developer, try looking under the sysadmin's keyboard for a scrap of paper with the password scribbled on it! :-D
Ian Dennison_1
Honored Contributor

Re: Root Password

Quick question: Does any other system have root access or superuser privledges to this box?

2 possible quick and dirty solutions,...

1. Rlogin from another server with root permissions and do a 'passwd'.

2. ftp into the system as someone with appropriate rights, get the /etc/passwd file, modify the root password to be empty, ftp back the /etc/passwd file, log on with no password and then change it. If no overwrite is allowed, try renaming /etc/passwd and then ftping the file.

Share and Enjoy! Ian
Building a dumber user
pap
Respected Contributor

Re: Root Password

Hi,
You can not view the root password. However you can definately change it to your preffered password.

You need to boot the machine in single user mode by entering following command at your ISL Prompt.

ISL> hpux -is

Once you get the root prompt you can use passwd command to change the password. It will not ask you for old password.

-pap
"Winners don't do different things , they do things differently"
Choi Eun Kyoung
Occasional Advisor

Re: Root Password

1. Power off/on
2. Escape button press
3. Then the PDC step display
BOOT_admin> boot pri isl
4. ISL> hpus -is #boot to single-user mode
5. After single-user mode booting,
You have to remove passwd of root in
etc/passwd file
6. Then you have to booting by multi-user mode
# init 2

7. When the console login prompt display,
You can login by root. so this job don't
check password. then you can change root
password
# passwd root