1836867 Members
3537 Online
110110 Solutions
New Discussion

Cannot login root

 
Surizan Othman
Frequent Advisor

Cannot login root

I SSH to HP-UX with oracle user and su to root. I create a shadow file in /etc. I deleted user webadmin, mysql, smb in /etc/passwd. I accidentally type passwd and it prompt for enter new password for root. I just enter with blank password and it prompt reenter new password and I just enter it with a blank password and lastly it prompt (file unchange). I exit SSH and it change me to oracle user. I try to su root and key in my password but it prompt me su: unknown id: root. What can I do to fix this. I also cannot login to console either root or oracle. Now, I just can get to HP-UX by using only oracle user only with SSH. Thanks
4 REPLIES 4
Steve Steel
Honored Contributor

Re: Cannot login root

Hi


There is a problem with /etc/shadow

Zero length or unreadable


Get rid of it even if you have to boot in single user mode to do it.

I hope you kept a copy of /etc/passwd before you edited it

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Surizan Othman
Frequent Advisor

Re: Cannot login root

Thanks for your response. But how can I get rid of /etc/shadow. I can't possibly get to root. Can u tell me step by step guide because I'm a newbie. I'm not familiar with HP-UX. BTW, I'm keep backup of /etc/passwd anyway. Thanks
Steve Steel
Honored Contributor

Re: Cannot login root

Hi


Also check in single user

/etc/nsswitch.conf that these lines are ok

passwd: files
group: files

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Steve Steel
Honored Contributor

Re: Cannot login root

Hi

You need to reboot in singe user mode

http://docs.hp.com/en/B2355-90950/ch05s01.html

Has an explanation


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)