Debian Won't Accept pi user


4 posts
by playzooki » Mon Dec 31, 2012 12:11 pm
I have changed the password for pi user, but when I type in pi at the console when I am asked for the username, it says 'login incorrect'
Also, I the default root password does not work.
Can anyone help?
Posts: 2
Joined: Mon Dec 31, 2012 12:04 pm
by elatllat » Thu Jan 03, 2013 10:43 am
you can reset your passwords by plugging the SD into any linux and editing the shadow file;
http://ubuntuforums.org/showthread.php?p=5318038
Posts: 889
Joined: Sat Dec 17, 2011 5:05 pm
by playzooki » Sun Jan 06, 2013 2:01 pm
elatllat wrote:you can reset your passwords by plugging the SD into any linux and editing the shadow file;
http://ubuntuforums.org/showthread.php?p=5318038

Please could you explain that in more detail?
Posts: 2
Joined: Mon Dec 31, 2012 12:04 pm
by bgirardot » Sun Jan 06, 2013 3:00 pm
playzooki wrote:
elatllat wrote:you can reset your passwords by plugging the SD into any linux and editing the shadow file;
http://ubuntuforums.org/showthread.php?p=5318038

Please could you explain that in more detail?


Probably an easier way:

Remove the sd card and put it in another machine.

Edit /boot/cmdline.txt file

Add this to the end of the line and keep the whole thing as one line, cmdline.txt can only be one long line:

Code: Select all
 init=/bin/bash


Put the sd card back in your raspberry pi and boot up.

After some text scrolls by you will probably have to hit return to get a # prompt.

They type:

Code: Select all
passwd pi


And it will prompt you to change the password.

Then type:

Code: Select all
sync


Then you have a choice of how to restart depending on what you are most comfortable with.

The easiest thing to do is just unplug the Raspberry Pi, put the SD card back in your other machine and remove the init=/bin/bash you added to the end of the line in cmdline.txt, then put the SD card back into your Raspberry Pi and you should be good to go.

Or you can edit the cmdline.txt file on the raspberry pi itself with these commands:

Code: Select all
mount /boot
nano /boot/cmdline.txt
reboot


Maybe that is easier than remove the sd card, I am not sure, I have never done it that way.
Posts: 517
Joined: Wed Oct 10, 2012 6:20 am
Location: Switzerland