Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

One of my colleague removed by error etc/passwd and etc/shadow files.

The problem is that now the system doesn't have any account.Impossible to connect by ssh or to work on it.

How can I create a root account?

share|improve this question

migrated from Jun 6 '13 at 20:59

This question came from our site for professional and enthusiast programmers.

If you have physical access then you could reboot with the kernel line as rw init=/bin/bash. This should give you root access to recreate the user accounts.

share|improve this answer

You might try to copy another computer's passwd and shadow, assuming you know what you're doing. And I hope you've kicked your colleague's butt ;-)

See this and this

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.