Operating System - HP-UX
1830467 Members
2936 Online
110005 Solutions
New Discussion

/etc/passwd and shadow files deleted

 
SOLVED
Go to solution
carlos_83
Occasional Advisor

/etc/passwd and shadow files deleted

By mystake I deleted /etc/passwd and shadow, I don't have any backup, I'm still logged, but how can I do to restore them??? Is there any possible way??
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: /etc/passwd and shadow files deleted

You can copy them from another system and then vipw /etc/profile to make changes.

On HP-UX, once its gone, its GONE.

There must be a backup somewhere. Are you running make_tape_recovery or make_net_recovery ? You can restore to a junk system and then copy the files.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Cheryl Griffin
Honored Contributor

Re: /etc/passwd and shadow files deleted

A Data Recovery Specialist may be able to recover the file.
"Downtime is a Crime."
Helen French
Honored Contributor
Solution

Re: /etc/passwd and shadow files deleted

Do you have a latest Ignite recovery tape? If yes, you can restore these files from it. If you don't have this and if you donot have a backup(??????) then you may have to start from scratch.

You can find a passwd template from /usr/newconfig/etc/passwd file. If you want to use that, you need to add each user one by one (do you have a printed passwd file atleast?). Remember to set the root password!
Life is a promise, fulfill it!
Shannon Petry
Honored Contributor

Re: /etc/passwd and shadow files deleted

Well, unless you hacked your system, there is no shadow file in HP-UX.

There is a default password file in /usr/newconfig/etc, which you should put in /etc.

Make sure to issue /sbin/passwd root to change root's password.

You will have to re-add users outside of the defaults manually.

There is no such thing as undelete in Unix. Unless you deleted with CDE's file manager anyway. If not, it's gone.

Regards,
Shannon
Microsoft. When do you want a virus today?