Help - Search - Members - Calendar
Full Version: recovering /etc/passwd
Linuxhelp > Support > Technical Support
Hello everyone. First post here.

Let me start by saying that I am dumb. No need to point that out. Let me tell you what I did that was dumb.

I edited /etc/passwd on my mail server to include the following entry:


And now I cannot su to root. I get the following error:

[redacted@mail bin]$ su -
su: /bin/bash/nologin: Not a directory

Which makes sense.

Can anyone help me find a way to edit that file to correct that entry?

I've tried a couple things, but

su root --shell=/bin/sh


su -p -c vim /etc/passwd

don't work. I get the same error.

Am I totally boned here?

TIA for any pointers.
Boot using a rescue CD or live CD, mount your / partition and edit the file.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.