Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Root passwd help

Status
Not open for further replies.

pranesh11

Technical User
Dec 4, 2003
50
IN

Hi Experts,

i have HP-UX 11.11 and 11 box and after a long time iam using these and i don't know root passwd and any other passwd of these 2 machines... is there any way to get root passwd by going to single user mode.. all i can do is i can hardboot the machine when its booting/coming up can i go to single user mode by pressing any key... as we do in solaris like by pressing stop + A kep and then typing boot - s.. is there antway plz advice..

thanks
 
check out this FAQ: faq51-227
 

Thanks bi, it was helpful and with the steps given in faq i was able to go single user mode and give passwd root and it did ask for new passwd and i entered it.. but after booting its not taking that passwd.. also its not allowing any users to login... from remote machine if i give telnet <ip add> i get login prompt as soon as i enter username like root or anything it gives incorrect login.. even before entering passwd.. from single user mode i could not edit /etc/passwd as it was giving vi not found or something... fi doesn't work in single user mode.. what could be reason for not allwoing any users plz advice..
Thanks
 
It sounds like there might be corruption in the /etc/passwd file. (for example, the first line might be a blank, the line for root's entry might start with a space or another character, etc.)

See if you can get into single user mode again. When you are in single user mode, you need to use the commands that are in /bin (and /sbin) because /usr most likely will be unmounted. So if you would type /bin/vi /etc/passwd, you should be able to take a look at the /etc/passwd file and see if there is any corruption in there. You also could mount /usr (/sbin/mount /usr) and use the vipw command, which should prevent any more corruption of /etc/passwd. (It won't be able to fix any corruption that is in there already, but perhaps you will be able to see where any corruption is and fix it.)

Make a copy of the /etc/passwd file and then you could try deleting the encrypted password (the second field in /etc/passwd entries -- between the first and second colon) for root, boot all the way up and log on as root. You won't be prompted for a password, but you can set it with the passwd root command.

 


Great advice , thanks bi, i will chk this out and get back to you by tomm...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top