cancel
Showing results for 
Search instead for 
Did you mean: 

/etc/passwd get rest

Primesh Abeysinghe
Frequent Advisor

/etc/passwd get rest

Dear all

we have server wich running HP-UX 11.23i when I add a user by using useradd command then it will get update /etc/passwd file & user wold be able to login but when the server restart that user disappeared and seems /etc/passwd file get reset

can you please help in this matter
7 REPLIES
Bill Hassell
Honored Contributor

Re: /etc/passwd get rest

This isn't normal at all. I assume when you said that the server 'restarted' you mean that it was shutdown and rebooted. Do you have several HP-UX servers? Do you know exactly which server you were changing? This is one of the reasons that the hostname should be part of the PS1 shell prompt.


Bill Hassell, sysadmin
Primesh Abeysinghe
Frequent Advisor

Re: /etc/passwd get rest

hi bill,

yes we have 3 servers which ruining HP-UX 11.23i & as you said the server switch off & rebooted the /etc/passwd file get reset so there I can't find the newly created user but the directory which I created for that new user is still there I mean home /home/xxx


please help
Thanks
Primesh Abeysinghe
Frequent Advisor

Re: /etc/passwd get rest

in addition to that this server clustered with another server we have installed serviceguard there
Patrick Wallek
Honored Contributor

Re: /etc/passwd get rest

Did you add the user to both servers in the cluster? If not, you should.

Check your startup scripts and see if there is something that copies /etc/passwd from your other server.

If there is nothing the the startup scripts, check the package scripts for the SG packages.

Someone may have set something up to keep the /etc/passwd file synced between the 2 servers and used the other server in the cluster as a "master".
Primesh Abeysinghe
Frequent Advisor

Re: /etc/passwd get rest

Hi,

I created the same user @ both server even it has same password so if it get synced will not get any issue like this

is there any other possibility to happen that kind a problem

Thanks,
primesh
Bill Hassell
Honored Contributor

Re: /etc/passwd get rest

Something has changed the passwd file since the home directory is still there. Delete the home directory, then add the user. Now login as that user to verify that all is well. Now reboot and then use: ll /etc/passwd to see the timestamp. It should be the same as when you added the user. If it has been modified, then it is being by something (bad) that was added to your boot scripts. List the boot scripts in time order so you can see the most recently added or changed scripts:

ls -lart /sbin/rc?.d
ls -lart /sbin/init.d
ls -lart /etc/rc.config.d


Bill Hassell, sysadmin
nightwich
Valued Contributor

Re: /etc/passwd get rest

Hi Primesh.


I think you should be using something like NIS or LDAP.

It makes no sense to add a user and the O.S deleted that user after reboot.


Please post the folloing command:

ypcat /etc/passwd


Regards...