1

How can i restore my /etc/passwd file? I have access to it, but it's currently empty and I added this to the file, but I can't even SSH to the machine, I'm getting a "connection refused".

root:x:0:0:root:/root:/bin/bash
mk:x:1000:1000:mk:/root:/bin/bash

Is it possible to recreate the passwd file? How should it be formatted, so that I can log in again?

Thanks!

Best regards

1
  • Can you give the OS or, in the case of Linux, the distro and version that you are running?
    – Swoogan
    Dec 13, 2009 at 2:39

1 Answer 1

1

Lol on the stupidity tag. "Connection refused" usually means that sshd isn't running. Make sure the service is running. It may require the ssh user:

sshd:x:111:65534::/var/run/sshd:/usr/sbin/nologin
1
  • Yeah. Well. What can I say. Stupidity big time! But... IT WORKED! Thanks a million! But I'm still not completely up and running. Fx. I'm getting "timeout in locking authority file /root/.Xauthority". What other lines do I need for the system to function properly? Thanks in advance!
    – Kordonme
    Dec 12, 2009 at 3:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .