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. :slight_smile:

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

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!"

:smiley: