The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

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
passwd file corrupted cantona7 HP-UX 10 03-21-2005 12:06 PM
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 05-21-2005
Registered User
 

Join Date: May 2005
Posts: 2
Exclamation Help! passwd file corrupted

Hi,

I am new to UNIX, and have recently installed Suse 9.3. I have been experimenting with all of the commands and have somehow managed to modify the default shell of the root user to an invalid file. Consequently I cannot su to the root user as I receive the 'no such file or directory' error message.

I have attempted to use the rescue facility by booting from the installation CD, however it seems that the files that load appear to be from ramdisk. I have tried to mount various other devices without being able to locate the file in question to modify it.

If anyone has any solutions/experience/ideas I would be very grateful.

Thanks in advance.
Reply With Quote
Forum Sponsor
  #2  
Old 05-21-2005
zazzybob's Avatar
Registered Geek
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
Linux has a -s switch to su to run the specified shell (if it's in /etc/shells)

Try

su -s /bin/bash root

and see where that gets you. You should then be able to vi /etc/passwd and fix it up.

Cheers
ZB
Reply With Quote
  #3  
Old 05-21-2005
Registered User
 

Join Date: May 2005
Posts: 2
ZB,

Cheers, got it working. Funny though, I actually tried that ealier and I got a different error message.

Many thanks.

PS Loving your picture by the way, absolutely hilarious. Suggested caption: "stop it, it's dirty!"

Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:37 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