Operating System - HP-UX
1834090 Members
1916 Online
110063 Solutions
New Discussion

Password recovery in single user mode

 
2xyo
Frequent Advisor

Password recovery in single user mode

Dear,

I want to recover my root password on an hp2470. I follow documentation and i try this :
-Connect to serial port
-CTRL+B to going in GSP mode
-ENTER+ENTER for the login/password GSP
-in GSP, power off then power on
-return to console mode
-ESC to stop boot process
-'boot pri'
-Y to the interact question.
-'hpux -is'
-And i always need a login/password !

Is the only possibility to use Core OS cd[0] ? OR, i have any chance with the serial console ?

Thanks

0 : http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1038505
22 REPLIES 22
UnixT
Frequent Advisor

Re: Password recovery in single user mode

Hi,

You want to recover or reset you passwd ?

The way you said will only gives you to reset your passwd but not will give your passwd what it was..Anyway, lets wait for the Great guys comment
2xyo
Frequent Advisor

Re: Password recovery in single user mode

I'll be happy if I can already reset it. It's not a problem if i can't recover it.
Horia Chirculescu
Honored Contributor

Re: Password recovery in single user mode

You mean that when you issue passwd root you are prompted with the old root password, right?

If this is the case you missed the "null out the password" for root

Best regards,
Horia.

Best regards from Romania,
Horia.
Mark S Meadows
Valued Contributor

Re: Password recovery in single user mode

Hi,

If you have booted the system into single user mode (hpux -is), then it should just be a case of running the following command from the command line :

passwd

or

passwd root

to reset the root password and then bring the system backup into multi user mode.

Regards,

Mark
Administrating HP-UX systems for more years than I care to admit, but still enjoying it (most of the time!).
2xyo
Frequent Advisor

Re: Password recovery in single user mode

After the 'hpux -is', system boot and i have this :

INIT : Overriding default level with 'S' -----
Please enter your login name :
Password :
Authentication incorrect

Please enter your login name :
etc...

I can't type passwd because i have not a prompt in single user mode !

System always asks me for a login/password.
AVV
Super Advisor

Re: Password recovery in single user mode

Hi,


Has this system been into a trusted system ?

2xyo
Frequent Advisor

Re: Password recovery in single user mode

I don't know if the systen is in trust mode.

Anyway, i cannot execute "/usr/lbin/tsconvert â r." because I have no access to prompt in Single User mode.

Mark S Meadows
Valued Contributor

Re: Password recovery in single user mode

Hi,

It is possible that you have authentication enabled when booting into single user mode ?

To verify, let the system boot into mullti-user mode and check /etc/default/security.

Regards,

Mark
Administrating HP-UX systems for more years than I care to admit, but still enjoying it (most of the time!).
2xyo
Frequent Advisor

Re: Password recovery in single user mode

It's possible.

But how can i check this file if i can't log in ?!!
Mark S Meadows
Valued Contributor

Re: Password recovery in single user mode

Hi,

Can you not log onto the system as a standard user as opposed to root ?

You do not have to be root to view the file.

Regards,

Mark
Administrating HP-UX systems for more years than I care to admit, but still enjoying it (most of the time!).
Matti_Kurkela
Honored Contributor

Re: Password recovery in single user mode

Looks like your system is configured to require authentication when booting to single-user mode. This is an optional security feature.

If you have no way to get root privileges (like sudo already configured) when the system is running in normal multi-user mode and the root password is lost, you need to use the recovery shell on the Core OS CD.

MK
MK
2xyo
Frequent Advisor

Re: Password recovery in single user mode

I haven't an user login or something else.

Thanks for your help. I will use the OS core cd...
Vishu
Trusted Contributor

Re: Password recovery in single user mode

Hi,

Try booting your system in maintenance mode using

'hpux -lm'

if you got the prompt, you simply has to edit this file /tcb/files/auth/r/root by deleting the value in the field, u_pwd:\

your password will be null for root.

AVV
Super Advisor

Re: Password recovery in single user mode

Hello,


I agree with Vishu incase you get a prompt there.


cd /tcb/auth/file/r <=== I believe this is the path.

vi root
u_pwd:\ <====make it as this
2xyo
Frequent Advisor

Re: Password recovery in single user mode

When i boot whith 'hpux -lm', my system reboot after i ack logs message because the value of "os code" is false.

On the other hand, i finnaly find a login/password username. And when i boot with 'hpux -is', i get this message : "No authorization to boot the system". I think that i can login normally with this user but, if i can, i will not reset the password with a simple user !
Kanagaraj
Regular Advisor

Re: Password recovery in single user mode

Hi,

Ya you are right,Single User mode,root can login...If that server is trusted one.then use OS recovery console and reset root password.

No other option.If you have normal user/password with sudo privilege then you can try...

Hope OS recovery cd will solve your problem.
Vishu
Trusted Contributor

Re: Password recovery in single user mode

hey,

do you have any other server from which you can rlogin to this box. This way :-

1. you can change the root password.
OR
2. edit the root password file previous specified to make the root password null.
OR
3. you can provide sudo to some user and then change the root password.

This will work..try it.
2xyo
Frequent Advisor

Re: Password recovery in single user mode

> do you have any other server from which you can rlogin to this box.
No.
Viktor Balogh
Honored Contributor

Re: Password recovery in single user mode

As Matti wrote it you have the product 'Boot Authenticator for Standard Mode of HP-UX' installed on your system. Take a look here:

https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=BOOTAUTH11i

If you have sudo installed you could try to login with a normal user a test if sudo asks for the user password instead of the root password. This way you can elevate your privileges without knowing the root password - and hopefully can reset it.
****
Unix operates with beer.
Vishu
Trusted Contributor

Re: Password recovery in single user mode

If you have tried everything what has been written so far, then using Core OS cd is the only way left to reset your root password.
2xyo
Frequent Advisor

Re: Password recovery in single user mode

Server has been converted to Trusted Mode. Now, i can just log in as normal user...

No, I'm just waiting to see if other co-worker can found/remind the password in a DB.

Or, i will use cd OS core.

Thank for your time
2xyo
Frequent Advisor

Re: Password recovery in single user mode

A co-worker finally find for me....

The solution wat to use "hpux -iS" and NOT "hpyx -is"

Thanks for yours times