The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > 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 03:03 PM
Could be a corrupted file? kaugrs HP-UX 1 01-16-2008 12:22 PM
Help! passwd file corrupted Tony Montana UNIX for Dummies Questions & Answers 2 05-21-2005 08:45 AM
detecting corrupted file starless Shell Programming and Scripting 6 09-24-2003 10:03 PM
corrupted tar file klintsovi UNIX for Dummies Questions & Answers 1 07-21-2001 09:50 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-28-2005
cantona7 cantona7 is offline
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
  #2 (permalink)  
Old 02-28-2005
hdohdo hdohdo is offline
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.
  #3 (permalink)  
Old 02-28-2005
cantona7 cantona7 is offline
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 ?
  #4 (permalink)  
Old 02-28-2005
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
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
  #5 (permalink)  
Old 03-01-2005
cantona7 cantona7 is offline
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 06:55 AM..
  #6 (permalink)  
Old 03-01-2005
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
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.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:15 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0