Re: How to recover root password in Trusted system HP-UX 11i (9309 Views)
Reply
Advisor
hung_9
Posts: 28
Registered: ‎04-12-2004
Message 1 of 11 (9,309 Views)
Accepted Solution

How to recover root password in Trusted system HP-UX 11i

Hi all,
I changed my HP9000 system to trusted system.
I chose the option: "Require Login Upon Boot to Single-User State".

After a long time, I forget the root password.

I reboot the system to single-user mode. It asks me to login: ask for username: root. And then password for root.
I forget the root password. How can I login user root and change it ??????

Thanks a lot!
Hung


Exalted Contributor
Steven E. Protter
Posts: 33,806
Registered: ‎08-15-2002
Message 2 of 11 (9,309 Views)

Re: How to recover root password in Trusted system HP-UX 11i

Actually the way to go is to null it out

restart your machine.

If you have a console ctrl-b, login and then use the rs command.

Power switch only if no user can soft boot the machine.

Interupt at the console at the 10 second prompt

bo

Y Interact

hpux -is

You will now boot single user mode.

mount /var
mount /tmp

You may need to use the fill path of the mount command.

vi /tcb/files/auth/r/root

change:
:u_pwd=YfdfdTmswL7o/.:\

to

:u_pwd=:\

null it out and save it.

passwd

Set the root password and remember it this time.

Done.

SEP

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Trusted Contributor
lawrenzo
Posts: 383
Registered: ‎06-06-2003
Message 3 of 11 (9,309 Views)

Re: How to recover root password in Trusted system HP-UX 11i

hello hung,

these are notes that I have used;

boot into single user mode

# mount -a
# /usr/lbin/tsconvert -r
this untrusts the system

do # passwd root

this will allow you to change the password without the old one

# /usr/lbin/tsconvert -rto put the system trusted.

you can also remove the passowrd entry when in single user mode

# tcb/files/auth with a trusted system but any editing of the passwd files is not recommended.

when done # init 3

HTH

hello
Advisor
hung_9
Posts: 28
Registered: ‎04-12-2004
Message 4 of 11 (9,309 Views)

Re: How to recover root password in Trusted system HP-UX 11i

Thank for all of your reply.

But in fact when I changed my system to trusted system, I also chose the option: "Require Login Upon Boot to Single-User State"

So When I boot to single-user mode as following:
ISL>hpux -is
........

INIT: Overriding default level with level 's'

Boot Authentication:

Please enter your login name: root
password:


Because I do not have root password. I can not enter Single-Usermode.

I have no chance to execute any command here.


Any suggestion?
Thanks and Regards
Hung
Trusted Contributor
lawrenzo
Posts: 383
Registered: ‎06-06-2003
Message 5 of 11 (9,309 Views)

Re: How to recover root password in Trusted system HP-UX 11i

not sure if this will work;

can you boot into multiuser mode?

if so when fully up issue

init 1

this should take you into single user mode,

then change the system from trusted to untrusted as detailed before.

if this doesn't work then try removing the password entry as steven has explaine

cp /tcb/files/auth/r/root root.bck

vi /tcb/files/auth/r/root

remove characters in u_pwd=xxxxxxxx:\

remove the x's

not sure if this will help as noty had the issue myself.
hello
Advisor
hung_9
Posts: 28
Registered: ‎04-12-2004
Message 6 of 11 (9,309 Views)

Re: How to recover root password in Trusted system HP-UX 11i

Hello Lawrenzo
I can not boot into multiuser mode. I do not have root password!

What can I do now??
Thanks a lot
Hung
Honored Contributor
Mohanasundaram_1
Posts: 558
Registered: ‎08-18-2003
Message 7 of 11 (9,309 Views)

Re: How to recover root password in Trusted system HP-UX 11i

Hi Hung,

there are 2 ways of doing it. I have used one of them successfully.

1) Load fresh OS on a new disk, import the vg00 here, mount the root filesystem and remove the root password as indicated by SEP.

I used this method and recovered the system.

2) Another way is try through recovery CD, boot from recovery CD and mount the root filesystem and remove the root passwd.

I first attempted this method and had some problem in my CD. So I took the route of fresh OS on a different disk.

I don't know if there are other ways to recover this. Maybe, somebody else here might provide you a easier, better solution.

With regards,
Mohan.
Attitude, Not aptitude, determines your altitude
Honored Contributor
Nguyen Anh Tien
Posts: 923
Registered: ‎05-20-2004
Message 8 of 11 (9,309 Views)

Re: How to recover root password in Trusted system HP-UX 11i

Hi Hung.
Why don't you take OS backup tape before making trusting system (you tried make_tape_recovery many times before).
I also recommend you use recovery method to recover this system
re
HP is simple
Occasional Advisor
RATEFIARIVONY
Posts: 15
Registered: ‎03-11-2004
Message 9 of 11 (9,309 Views)

Re: How to recover root password in Trusted system HP-UX 11i

try some exploits!
... just kidding :)
Advisor
hung_9
Posts: 28
Registered: ‎04-12-2004
Message 10 of 11 (9,309 Views)

Re: How to recover root password in Trusted system HP-UX 11i

Hi Tien
It is a good idea.

Hi Mohanasundaram
I will try both of your methods.

Thanks all of you.
Regards
Hung
Visitor
kodeswarank
Posts: 3
Registered: ‎03-06-2014
Message 11 of 11 (3,254 Views)

Re: How to recover root password in Trusted system HP-UX 11i

first reboot the machine using init 6 / reboot command.     <---  reboot.

wait for "press any key ro interrupt autoboot" screen & press any key     <---  single user mode.

passwd root        <---  change password command

type new password.

 

 

 

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.