I was following the tutorial here http://www.wikihow.com/Make-a-Raspberry-Pi-Web-Server and everything was going fine until I got to "The finishing touches" part of the tutorial. I was able to login as root after setting a password for root then I edited the password configuration file as it stated. I then got to the step that says "add the user pi as a mod" it would not let me because it said the user pi did not exist but it does. I then did the last step but did not logout as root before doing it like it says to do I got ahead of my self and misread it but I was not given an error so I logged out and cannot log back in as either root or pi from SSH or from the console itself. Can someone tell me how to fix this? What did I do wrong to screw it up?

  • Thank you so much, I spend 50 min to troubleshoot this issue and finally your site helped.
    – user14466
    Commented Apr 27, 2014 at 5:54

2 Answers 2


I don't really understand what went wrong from your description.

Best option: If you cannot log in your only option would be to restart and pay more attention to the install process.

Not a great option: You could try mounting the SD card with the raspbian file system on it and navigate and edit the password config file yourself. I'm not sure if it would work, or if its encrypted but it would be worth a try.


You actually modified the 'passwd' file and commented the line, by adding a '#', that identified you as the user of the system. So after saving the file, the user 'pi' did not exist for the system. I too didn't understand the last part of the article since it says to modify the user after actually commenting it out. I find no reason for why you couldn't login again as the 'root' user. One possibility might be that you forgot the password after modifying it.

To get your user account back, you'll have to login as 'root' and run the following command

nano /etc/passwd

and un-comment the line that identifies you as a user.

  • I don't think this is a viable option - as the user states he can't login as root. Commented Oct 9, 2013 at 23:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.