2 Better title
| link

Help! I modified /etc/passwd and Can I cannot log inlaunch a process as root without launching root's login shell?

    Tweeted twitter.com/#!/StackUnix/status/333599891446177792
1
source | link

Help! I modified /etc/passwd and I cannot log in as root

I tried to change the login shell.

Here's what the first line of /etc/passwd looks like (on a Debian Wheezy install):

rootx:0:0:root:/root:/:zsh

When I try to login as root:

Cannot execute zsh: No such file or directory

I know zsh is available:

$ which zsh
/usr/bin/zsh

Okay, it seems logical to replace zsh by its full path. But how can I do it?

I have one other user on the system (user), however it doesn't have root privileges and sudo is not installed on the system.

Assume that for whatever reason (encryption, physical access, ...) I cannot boot on a live CD to modify the file.

I do know, however, the credentials for the root account.

My question is: Is there any way, even programatically, to launch a process with the root account without launching its login shell first?