1834796 Members
2512 Online
110070 Solutions
New Discussion

Re: ROOT PAssword

 
SOLVED
Go to solution
Peter Gillis
Super Advisor

ROOT PAssword

Hi,
I have to admit I have committed a mortal sin.... sorta . Have had to change many unix passwords, including root user password. Now I am unable to login as root because I have forgotten it. I am sure there is a way - via rebooting the machine - that I can reset the root passwd. Does anyone have a method?

thanks, Maria.
11 REPLIES 11
James A. Donovan
Honored Contributor
Solution

Re: ROOT PAssword

Yup.

Reboot the machine from the console. Interrupt the boot process when you get that message saying you have 10 seconds to do so. Then

GSP> bo pri
choose "Y" to interact with the ISL, and then boot to single user mode

ISL> hpux -s

You'll now be able to change the root password
Remember, wherever you go, there you are...
Patrick Wallek
Honored Contributor

Re: ROOT PAssword

If all else fails, reboot the machine and come up in single-user mode.

From there you can:

1) mount all filesystems, execute SAM and change the password from there.

2) edit the /etc/passwd file (if your system isn't trusted, and remove the encrypted passwd, then execute the passwd command from the prompt to change it again

3) edit /tcb/files/auth/r/root file (if you system is trusted) and remove the encrypted passwd from the :u_pwd line so that the line looks like

:u_pwd=:
and then execute the passwd command to change the passwd again.

Good luck.
pap
Respected Contributor

Re: ROOT PAssword

Hi Maria,
Its simple if you can rteboot the machine.
Simply reboot the machine and boot it in single user by interrupting at a message to enter in to ISL prompt.

Once you are on ISL prompt give following command to boot machine in single user mode.

ISL> hpux -is

Then you will be boote in single user and will get root prompt.
At the root prompt
# passwd

then change the passwd and do init3 u will be back to multiuser mode.
Thanks,
-pap
"Winners don't do different things , they do things differently"
Paul Sperry
Honored Contributor

Re: ROOT PAssword

Reboot the system, Interrupt the boot process, then at the
GSP> prompt type

bo pri

Say yes to interace whit ISL

Then at the ISL prompt type

hpux -s

You will the be in songle user mode.

Do a mount -a

then

passwd root

To change roots password
Peter Gillis
Super Advisor

Re: ROOT PAssword

Thank you for quick replies, and for not badgering about the fact it is a 'You Forgot!' situation. Will give it go soon.thanks again, and see ya.
Maria.
Michael Tully
Honored Contributor

Re: ROOT PAssword

Hi Maria,

One further suggestion.

Install 'sudo' so that even when you do change the password, you have one further backdoor method of fixing it. Instead of knowing the root password you do this, once it is setup.

$ id
maria
$ sudo su
password: (your password not root's)
#

You can get 'sudo' here already to install.

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

Cheers
Michael
Anyone for a Mutiny ?
SGUX
Valued Contributor

Re: ROOT PAssword

One more tip on installing sudo,

make sure you disable the use of 'sudo su' for other users because else anyone can become root
Don Spare
Regular Advisor

Re: ROOT PAssword

Maria,
One other step you might consider: After changing passwords, write them down on paper. Put the paper in a sealed envelope and put the envelope into a locked container. Then if you need it you can find it.

Another method would be to keep a file somewhere that contains all the user IDs and passwords you are responsible for. The file should be encrypted (with a password you're not likely to forget) and permissions set so only you or another admin can read it.
Peter Gillis
Super Advisor

Re: ROOT PAssword

Francois thanks for the tip.
Don, I do actually use one of the methods you mentioned, but I am human and am prone to the occassional slip up. Thanks for making the suggestions though. Maria
John J Read
Frequent Advisor

Re: ROOT PAssword

Juat checking because I forgot this once. You might have set up /.rhosts or /etc/hosts.equiv to all root rlogin from another server on your network. You can rlogin, then change the pwd.
Peter Gillis
Super Advisor

Re: ROOT PAssword

thanks for that John.
Maria.