Cannot login root

With my SSH, my HP-UX cannot login to root. It will come out a message su: unknown id: root. But I can login by user oracle. I also cannot login to console either by using root or oracle anymore. What shall I do.

If you dont mind, I will just explain my "fuss":

>With my SSH, my HP-UX cannot login to root. # From where? a pc?
# your hpux box to what other box?...

>It will come out a message su: unknown id: root. # This is very confusing:
# su - is not ssh
> - unknown id: root # Well perhaps to be diferrent UID 0 has another name on this box (Should give a try seems to be fun...)
>But I can login by user oracle. # Did you try as oracle to do a su - after?

>I also cannot login to console either by using root or oracle anymore.# Let me think a little more...

What have you to say?

Sorry for my broken english. This is what actually happening. I connecting HP-UX using SSH on my WIndows PC. I login with user id oracle before I using su root to get to root. I create a shadow file in etc. Then I accidentally type a command passwd and enter. It prompt for enter new password for root. I enter with a blank password. It prompt for reenter new password.I enter with a blank password. It prompt me file has unchanged. I exit root and try su root to get to root. After i key in my password and enter, it prompt su: unknown id: root. This is what happening. I exit SSH and open it back. Connect to HP-UX by oracle user id and try to get to root by su root. It stil prompt me su: unknown id: root. Just like I enter a wrong password which is I don't. Since I cannot get to root by SSH. I try to connect to HP-UX by console. Neither oracle or root can get to HP-UX. It prompt me login incorrect. What I'm suppose to do to fix this problem. Thanks

You are in trouble!
(Sorry for the delayed answer..)
Are you still in the same situation?
If yes what can you tell about your HPUX box, what model (cmd: model), has it a console? what else? (tape drive....)
What do you know about HP-UX, what OS is it running (uname -r, uname -a).

It sounds like the password for root has been wiped out. You should reboot your HP-UX server into single-user mode. Once you are at the prompt, you can then set the password for root using the passwd command. Once the password is set, you can then reboot normally. Also, check to see if the file /etc/securetty exists; if it does, make sure that there is a line in the file that reads:

console

This will allow you to log in as root from the console. Finally, if you really need to allow SSH logins to login directly as root (bad idea!!), make sure that the "PermitRootLogin" parameter is set to "yes" (no quotes). For much better security, however, you should set this parameter to "no" and always log in as a non-privileged user. You can always su to root, if needed. Best of luck!!

If you have omniBACK/dataPROTECTOR in your environment, you could try the following:

Make a copy of your systems /etc/passwd file.
Edit the copy by associating your userIDs encrypted password for root's account.
Perform a backup of your copied/modified passwd file with omniBACK/dataPROTECTOR.
Lastly, restore the modified passwd file over the systems /etc/passwd file.

now log-in, using your userIDs passwd...no reboot required :slight_smile: