Operating System - HP-UX
1748148 Members
3511 Online
108758 Solutions
New Discussion юеВ

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

 
SOLVED
Go to solution
hung_9
Advisor

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


10 REPLIES 10
Steven E. Protter
Exalted Contributor
Solution

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
lawrenzo
Trusted Contributor

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
hung_9
Advisor

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
lawrenzo
Trusted Contributor

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
hung_9
Advisor

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
Mohanasundaram_1
Honored Contributor

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
Nguyen Anh Tien
Honored Contributor

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
RATEFIARIVONY
Occasional Advisor

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

try some exploits!
... just kidding :)
hung_9
Advisor

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