Operating System - HP-UX
1834811 Members
2273 Online
110070 Solutions
New Discussion

Re: root passwd on trusted system

 
system administrator_15
Frequent Advisor

root passwd on trusted system

Hi guys
i have a problem in that the root passwd was changed last week while i was at home enjoying the weather and know i cant access it as the person who changed it must be dislexic as the spelling he used obviosly isn't in any dictionary.
my question is, i can't change the root passwd without knowing the old one and it is a production server so shutdown not possible.
if i delete the entry below in /tcb/files/auth/r/root to make it look like this
:u_pwd=:will that remove passwd on root and thus allow me to reset.

17 REPLIES 17
Uday_S_Ankolekar
Honored Contributor

Re: root passwd on trusted system


Your try changing root file should do the trick but be careful while modifying this file. make a copy of that file before editing

make :u_pwd=bNY5dfu7LKRDW:\ look like :u_pwd=:
Then change the root password.

Or you can try this
2. un-trust the system.

# /usr/lbin/tsconvert -r
Change the passwd and re-trust the system
# passwd root
# /usr/lbin/tsconvert

Take backup of password file and tcb dirctory before doing this.

Goodluck,
-USA..
Good Luck..
Michael Steele_2
Honored Contributor

Re: root passwd on trusted system

To null root's password:

/usr/sam/lbin/usermod.sam -F -p "" root

-to unconvert-

/usr/lbin/tsconvert -r
Support Fatherhood - Stop Family Law
Kevin Wright
Honored Contributor

Re: root passwd on trusted system

Isn't that file owned by root??

Safest bet is if you need to reset a root password, you need to boot to single user.
Darren Prior
Honored Contributor

Re: root passwd on trusted system

Hi Andy,

Firstly choosing a password that doesn't exist in a dictionary is a good idea for a trusted system :-)) Maybe your colleague was being extra secure?

If you've still got a terminal logged in as root then editing the root tcb file will work. Be careful - if you damage the file then you will be looking at a reboot into single user to replace the file.

regards,

Darren.
Calm down. It's only ones and zeros...
blal
Frequent Advisor

Re: root passwd on trusted system

Hi

This problem I have faced once.But after doing unconvert using tsconvert problem is that you may have to change the passwords for other users also.

so take care in issuing tsconvert command.

best is boot in sigle user mode.

baiju.

Live and let live.
Martin Johnson
Honored Contributor

Re: root passwd on trusted system

I've had this problem several times. Editing /tcb/files/auth/r/root has always worked for me.

BTW, Since then, I have a pseudo root account (UID = 0) set up on my systems so I can just login and do "passwd root" to change the root passwd. It is easier and safer than editing files.

HTH
Marty
system administrator_15
Frequent Advisor

Re: root passwd on trusted system

Thanks for the reply's, but won't i still need to know the existing password to change it even in single user mode.
i thought the first thing it asked for when changing is the old password.
hence the file change.
regards
Michael Steele_2
Honored Contributor

Re: root passwd on trusted system

No, you don't need to know the root password. Just use this:

/usr/sam/lbin/usermod.sam -F -p "" root

This command will reset your password to null.

Try this from run level 3 first.
Support Fatherhood - Stop Family Law
Caesar_3
Esteemed Contributor

Re: root passwd on trusted system

Hello!

edit the /tcb/files/auth/r/root
so you could enter.

Caesar
F Verschuren
Esteemed Contributor

Re: root passwd on trusted system

If you neet a passwd in single usermode (standart not truned on And you do not have a
other "root" user than you need to boot from CD before you can edit the
/tcb/files/auth/r/root file.
just removing the encripted passwd and use the passwd comand and than you wil not be asked for a old passwd.

ofcause if you are only a normal user the rootpasswd can't be changed by the normal user... whitout hacking you own system....
Rajeev  Shukla
Honored Contributor

Re: root passwd on trusted system

There are 2 options you can try after going to single user mode.
1. Edit the /tcb/files/auth/r/root file and null the password field and then change the password, it wont ask for old password.
2. use /sbin/passwd root to change the password dont use /usr/bin/passwd
this wont ask for old password.

Cheers
Rajeev
Darren Prior
Honored Contributor

Re: root passwd on trusted system

fyi Rajeev - /sbin/passwd still requires the old password for root on a trusted system at 11.x

regards,

Darren.
Calm down. It's only ones and zeros...
Gavin Clarke
Trusted Contributor

Re: root passwd on trusted system

Michael, I tried your

/usr/sam/lbin/usermod.sam -F -p "" root

solution as a bog standard user on our test box.

It just said

Permission Denied

Which I'm kinda glad about, have I missed something?
Jayan_2
Advisor

Re: root passwd on trusted system

rlogin from another unix machine as root to this server and change the root password .This will only happen if the .rhost or /etc/hosts.equiv had configured.

jayan
Work whole souled so as to god
Brian DelPizzo
Frequent Advisor

Re: root passwd on trusted system

You must still have a login somewhere or an rlogin back door to have considered the above options.

You really should copy the /tcb directory and run /usr/lbin/tsconvert -r

You can the issue a "passwd" as root and you wont need to supply a password.

Convert back. I have done this before and haven't had problems with user password expiring or anything funky like that.
Chris Vail
Honored Contributor

Re: root passwd on trusted system

Thats one advantage of secure shell. If you have it already set up, then you can use it to open a session on the host, unconvert the system, fix it, then convert it back. If you can otherwise get to a # prompt, you can fix it by unconverting from trusted, then creating a second user with a UID of 0. Then login as that user, then type "passwd root". Since its unconverted from trusted, it won't ask you for the old password.

Chris
Uttam_2
New Member

Re: root passwd on trusted system

Hello

It's pretty simple. I have edit many times on a production box.
Just got to /tcb/files/auth/r/root

Edit the line below
:u_pwd=:\ It should like something like this.

I am sure it won't prompt for OLD password
Good luck,
Uttam