Operating System - HP-UX
1756000 Members
2447 Online
108839 Solutions
New Discussion юеВ

Re: password reset on hp5470 won't stick or root login is failing

 
Andrew Cunningham
Frequent Advisor

password reset on hp5470 won't stick or root login is failing

We have a rp5470 server. Recently I tried to log-in as root using the known password and it failed. Assuming someone had changed it , I connected to the GSP port, rebooted, got into single-user mode, executed the "passwd" command to reset to a known password.
Rebooted again, still the root passwd does not work. I did this several times , still no luck. Perhaps I am changing the root password, but root login is failing for some other, unknown reason. Viewing /etc/passwd shows that each time I change it, the password is changing.
8 REPLIES 8
IT_2007
Honored Contributor

Re: password reset on hp5470 won't stick or root login is failing

is it trusted mode? if so then you need to edit the file /tcb/files/auth/r/root and remove passwd entry. Becareful while editing. Also root account must be locked or deactivated?? check it out.
Yang Qin_1
Honored Contributor

Re: password reset on hp5470 won't stick or root login is failing

The password in /etc/passwd is encrypted with "salt" (first two char). If the salt is not the same, then the same password will be encrypted differently. So, don't worry about encrypted password changed all the time. If you have a chance to boot your server to single user mode, check the content in /etc/securetty. If it contain "console", it means you can only logon as root directly from console but not normal terminal.

I believe "I tried to log-in as root" meant you logon to the server with your personal account and then su to root. If you cannot su to root. You really have a problem. Can you post exactly the error message you received when you su to root?
Andrew Cunningham
Frequent Advisor

Re: password reset on hp5470 won't stick or root login is failing

None of the above ( machine is not trusted and root is not deactivated).
I did find that the machine name was "unknown" ( this is strange in itself). I reset it to the correct name, unfortunately I still cannot login as root.
IT_2007
Honored Contributor

Re: password reset on hp5470 won't stick or root login is failing

ok. It looks like your machine level is at 1 and not at 3. run who -r command to see.

Do the following:

who -r
vgchange -a y vg00
init 3
V.Manoharan
Valued Contributor

Re: password reset on hp5470 won't stick or root login is failing

Hi Andrew ,
1. Check for any error message in rc.log, rc.log.old.
2. check HOSTNAME entry in /etc/rc.config.d/netconf

3. check for any non configuration file available in /etc/rc.config.d

4. rename the existing password file and copy passwd file from /usr/newconfig/etc and try login to the server.

5. change the root password. create new user with root permission asswell before rebooting.

Thanks and regards
V.Manoharan

Andrew Cunningham
Frequent Advisor

Re: password reset on hp5470 won't stick or root login is failing

Answering some questions
- I am trying to login as root on the console ( I am not trying to "su"). The 'console' is a laptop connected by telnet to the GSP port. The rp5740 is a server class machine with no direct console, only rs232 or ethernet to GSP.

- I am at run level 3 (who -r) when changing the passwd in single user mode.

- I checked rc.log and HOSTNAME, nothing caught my eye.

- I did not replace the passwd file, that bothered me to do that.

- It is not just root that cannot login , I tried a user name

This machine is a NISv1 client. Is it possible NIS is getting in the way and preventing log-ins? I must profess some ignorance , but I would think that trying as root from the console would bypass NIS?

Thanks for all the help. I'm done for the week :)


A. Clay Stephenson
Acclaimed Contributor

Re: password reset on hp5470 won't stick or root login is failing

I had a sneaking suspicion that this was an NIS problem. Check your /etc/nsswitch.conf files to make certain that files are searched before nis. Next, make certain that the "root" password entry is completely specified AND that the '+' passwd entries occur last in /etc/passwd.
If it ain't broke, I can fix that.
Yang Qin_1
Honored Contributor

Re: password reset on hp5470 won't stick or root login is failing

If nobody can logon to the server, it sounds like your /etc/passwd file is corrupted. If you can use vi in single user mode (you need to mount /usr manually). Read /etc/passwd file carefully and remove all things you feel strange. Otherwise, find a recent good backup of /etc/passwd replace the corrupted one.