1832864 Members
2840 Online
110048 Solutions
New Discussion

root password

 
SOLVED
Go to solution
Bona_1
Frequent Advisor

root password

Hi all, I have forgotten my root password, and whenever I connect via MP, and boot to single user mode, I can change the password, but the password doesn't work when i blow up into full mode. Please assist
18 REPLIES 18
Kent Ostby
Honored Contributor

Re: root password

Are you using Trusted System software ?

How are you changing the password when you login in single user mode ?
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Brian Bergstrand
Honored Contributor

Re: root password

While in single user mode, mount /usr if needed and then run the following utils.

# pwck

And if your system is trusted:

# authck -p

Correct any errors the utilities point out.

Then try to change your password again.

If your system is trusted, this command will reset the password for you.

# /usr/lbin/modprpw -x root

HTH.
Pete Randall
Outstanding Contributor

Re: root password

I'm not sure what MP is, but if you can get to single user mode and change the password, that password should be retained when you go to multi-user mode. Is NIS used? Maybe the change works in single user mode but multi-user mode is using NIS. If so, you need to fix it so the root password is kept locally in the /etc/passwd file rather than using NIS for it.

Other thoughts would be to change it, copy the /etc/passwd file somewhere, then, after moving to multi-user mode, check the two root entries in /etc/passwd against the copied version.



Pete


Pete
twang
Honored Contributor

Re: root password

Do you get to single user mode(reboot and interrupt the boot sequence to use the 'hpux -is' command)? you should not use init s to go from a higher level to single user mode, verify you are in single user mode with the 'mount' command.

Run vipw and remove the encrpted password. But only do this if there is no /tcb(trusted system). Run pwck after editing /etc/passwd.

And now try to logon root again.

twang
Honored Contributor

Re: root password

Add to above reply, to edit /etc/passwd, you need /usr, /tmp and /vasr mounted, on single user mode you must:
# mount /usr
# mount /var
# mount /tmp
Steven E. Protter
Exalted Contributor

Re: root password

If the system is trusted try this:

cd /tcb/files/auth/r

vi root

null out the password entry, save the file.

You may have to do this in single user mode.

I'm still thinking NIS is involved somehow.

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
Bona_1
Frequent Advisor

Re: root password

Hi all,
tried all the suggestions. DIdn't work. Let me point put that i am fullt able to change the password in single user mode, it just doesn't work when I return to full mode
thanks
Pete Randall
Outstanding Contributor

Re: root password

Are you using NIS? If so, post your password file (you can blot out any passwords or users you don't want to publicize).


Pete


Pete
Bona_1
Frequent Advisor

Re: root password

root:WeALD6aUgxVsk:0:3::/:/sbin/sh
daemon:*:1:5::/:/sbin/sh
bin:*:2:2::/usr/bin:/sbin/sh
sys:*:3:3::/:
adm:*:4:4::/var/adm:/sbin/sh
uucp:*:5:3::/var/spool/uucppublic:/usr/lbin/uucp/uucico
lp:*:9:7::/var/spool/lp:/sbin/sh
nuucp:*:11:11::/var/spool/uucppublic:/usr/lbin/uucp/uucico
hpdb:*:27:1:ALLBASE:/:/sbin/sh
nobody:*:-2:-2::/:
www:*:30:1::/:
smbnull:*:101:101:DO NOT USE OR DELETE - needed by Samba:/home/smbnull:/sbin/sh
webadmin:*:40:1::/usr/obam/server/nologindir:/usr/bin/false
shaibu:HSWyVk6qACw9Y:0:3:Shaibu Ali,Lagos,,:/home/shaibu:/usr/bin/sh
test:pRJWfrOpsD6UQ:102:20::/home/test:/usr/bin/sh

It's a new server, I have no problems letting you have the password file. Cheers
Massimo Bianchi
Honored Contributor

Re: root password

Just a thought.

What character are you using ?
only letters and numbers or also some '#@|!" char?
No caps-lock in use? No numeric pad ?


I read some thread ago, for example, that if toy type in the login name in capital letter, then all the input is interpreted in capital, irregarding of original size, due to the fact that the terminal thinks that you are on an old tty.....

Massimo
Pete Randall
Outstanding Contributor

Re: root password

OK, I see no entries to indicate you're using NIS. When you change the password in single user mode, does the encrypted password in the /etc/passwd file change? When you boot into multi-user mode, does the encrypted password change back?


Pete


Pete
Kent Ostby
Honored Contributor

Re: root password

Massimo raises a great point.

Just for a test, try a nice insecure password that has only letters. like "pepsi" (my personal favorite drink but not password).

See if this works on the way up.

Some special characters (especially @ ) can be SET as password but not entered as password.
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Bona_1
Frequent Advisor

Re: root password

I have finally been able to get it, I use another user, then I su into root. I however cannot get in directly with the root user. Any ideas? Thanks
Kent Ostby
Honored Contributor

Re: root password

Bona -- Have you tried using a simple password for root with no special characters.

The special character in the password issue listed above could be bypassed by the su - command.

Kent
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Umapathy S
Honored Contributor
Solution

Re: root password

Bona,
Is /etc/securetty file there? If, then you can only su to root. login security is in effect.
Check man login for details.

HTH,
Umapathy



Arise Awake and Stop NOT till the goal is Reached!
Bona_1
Frequent Advisor

Re: root password

I have actually, I tried pepsi as was suggested, no luck. I did notice though that everytime I re-typed the password (I used the same "pepsi" as the password) the encrypted details in the password file changed, I don't know if this is usual.
Thanks
Bona_1
Frequent Advisor

Re: root password

Umpathy! That was it. How cd I forget?
Umapathy S
Honored Contributor

Re: root password

Bona,
I was able to nail down the problem after all the questions and answers. I started closely watching this thread halfway only.
Some of the questions and thoughts were great and they deserve more than me. The problem was obvious at the end to solve which is nothing compared to the previous responses.
Please give credit to all.

thanks,
Umapathy

Arise Awake and Stop NOT till the goal is Reached!