The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > HP-UX
Google UNIX.COM


HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
may a corrupted .gz file be repaired? JohnTinker UNIX for Dummies Questions & Answers 3 03-19-2008 12:03 PM
Could be a corrupted file? kaugrs HP-UX 1 01-16-2008 09:22 AM
Help! passwd file corrupted Tony Montana UNIX for Dummies Questions & Answers 2 05-21-2005 05:45 AM
detecting corrupted file starless Shell Programming and Scripting 6 09-24-2003 07:03 PM
corrupted tar file klintsovi UNIX for Dummies Questions & Answers 1 07-21-2001 06:50 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 02-27-2005
Registered User
 

Join Date: Feb 2005
Posts: 4
Exclamation passwd file corrupted

Good Day

Our HP box was hacked and the passwd file has been altered,there are only 2 user accounts active,and these dont have any administrative rights.I need to edit the passwd file to correct the su and root entries.
Does any body have any suggestions as to how i can do this with out the root account (maybe a "live cd" to edit the files??)

Thank you
Reply With Quote
Forum Sponsor
  #2  
Old 02-28-2005
Registered User
 

Join Date: Feb 2005
Posts: 1
Recovery Tape

If you have a recovery tape, this would now be usefull. Boot from the tape and restore the passwd file, then boot again.
Reply With Quote
  #3  
Old 02-28-2005
Registered User
 

Join Date: Feb 2005
Posts: 4
Passwd edit

Thx for the reply, but this is where my problems start.

Firstly i try a tape recovery,once it gets to a point where i can select the files to recover it fails ie
ERROR : Tar: blocksize =0;broken pipe
ERROR: File: /usr/ccs not found
ERROR: file: /usr/obam not found and it carries on with further errors

Secondly i try a DVD recovery and boot from the DVD,but when i try to load files and dependencies, it tells me the file system is full.
That is I try to edit the passwd file , vi isnt loaded, so I add the file to the list and it trys to add the files to the system so i can edit the passwd file.But returns an error that the file system is full, so basically i am $##@@ right now.

So i was thinking of another tool that i could use to edit the passwd file ?
Reply With Quote
  #4  
Old 02-28-2005
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,613
Use the shell itself to edit the passwd file:
echo "fixup::0:0::/:/usr/bin/ksh" >> /etc/passwd
then reboot and login as fixup to finish the job.

Also this link may be helpful: Expert Recovery Using the Core Media
Reply With Quote
  #5  
Old 02-28-2005
Registered User
 

Join Date: Feb 2005
Posts: 4
passwd recovery

Thx, I logged in a as the SU and edited the /etc/passwd

cheers

Last edited by cantona7; 03-01-2005 at 03:55 AM.
Reply With Quote
  #6  
Old 03-01-2005
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,613
Quote:
Originally Posted by cantona7
Thx but this really wont help as it writes to the /etc/passwd file in the ramdisk,
So use:
echo "fixup::0:0::/:/usr/bin/ksh" >> /mnt/etc/passwd

or whatever. Your post implied that lack of vi was your problem. This sidesteps that.
Reply With Quote
  #7  
Old 03-17-2005
Registered User
 

Join Date: Mar 2005
Posts: 3
more lost password problems

Hi,

I am having the same problems with my root password. I reset it. I tested it in another shell and had no problems. It worked great.

Now it doesn't. I've tried rebooting in the off chance that would reset something, but no luck. The weird thing is that I changed the passwords for other users as well and have acheived the same results.

I have tried logging in via single user mode, but after i get to the ISL prompt and type "hpux -is", I am prompted for a username and password.

Any suggestions are greatly appeciated. Thanks In Advance.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 08:16 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0