Kopiright
Posts: 8
Joined: Sat Jun 08, 2019 7:05 am

Raspbian stuck at login

Sat Jun 08, 2019 7:17 am

Hello,

I recently moved out and tried to set up my raspberry to my new network.
One day I rebooted my internet, and since that day Raspbian asks me for a login / password combinaison.
I tried all kind of possibilites :
  • Login : pi
  • Password : raspberry / rqspberry
I also tried all my personal password but nothing works.

I've also tried to add something like : "boot init bin/sh" on the cmd.txt file as seen on various forums, but with this command I don't even manage to get to the prompt login.

Here is a screenshot of the problem (as you can see, my PHP and all my stuff seems to be well launched)
Image

pcmanbob
Posts: 6256
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Raspbian stuck at login

Sat Jun 08, 2019 8:08 am

Hi.

When you say nothing works what exactly happens when you enter pi and you password ?
you might also try typing pi and your password at the first prompt just to make sure you are actually typing the correct password.

I can also see you have a low volt warning , low volts can lead to SD card corruption ,

so do you have a back up of your SD card that you could try ?
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

Kopiright
Posts: 8
Joined: Sat Jun 08, 2019 7:05 am

Re: Raspbian stuck at login

Sat Jun 08, 2019 8:28 am

Thanks for your answer.

When I say it "doesn't work" I mean that I always get the error "login incorrect", whatever the login/password combinaison I try.

Unfortunately I never made a back-up of my SD card...
Yep, as a French guy I do have an azerty keyboard so I tried to type my password to see if my keyboard was set for qwerty but It isn't.

The strange thing is that all my software seems to work (OpenVPN starts well, PHP too...) but maybe it is Raspbian which is corrupted or something similar.

Is there a way to know if my SD card is corrupted ? Or even to access my files ?

pcmanbob
Posts: 6256
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Raspbian stuck at login

Sat Jun 08, 2019 8:53 am

Kopiright wrote:
Sat Jun 08, 2019 8:28 am
Is there a way to know if my SD card is corrupted ? Or even to access my files ?
To be 100% sure your SD card is corrupt probably not, until your pi does not boot any more.

If you want to get data off the SD card that you could boot the pi using another SD card loaded with raspbian and then put your existing SD card in a USB card reader connected to the pi which would allow you to mount the SD card and copy files from it.

Before you try this I would replace your power supply with an official one to remove the low voltage warning and power your pi correctly or you could just end up making this worse or corrupting any new SD cards.

https://www.raspberrypi.org/products/ra ... er-supply/
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

Kopiright
Posts: 8
Joined: Sat Jun 08, 2019 7:05 am

Re: Raspbian stuck at login

Sat Jun 08, 2019 11:10 am

Thanks !

I'll try all of this. I'll keep you in touch

gkaiseril
Posts: 615
Joined: Mon Aug 08, 2016 9:27 pm
Location: Chicago, IL

Re: Raspbian stuck at login

Sat Jun 08, 2019 4:29 pm

If you have not changed the default password supplied with raspbian and connected to the internet or allowed others to use you Pi, it is possible someone changed the pi user's password.

Reset lost admin password for Raspberry Pi
f u cn rd ths, u cn gt a gd jb n cmptr prgrmmng.

Kopiright
Posts: 8
Joined: Sat Jun 08, 2019 7:05 am

Re: Raspbian stuck at login

Wed Jun 12, 2019 5:13 pm

gkaiseril wrote:
Sat Jun 08, 2019 4:29 pm
If you have not changed the default password supplied with raspbian and connected to the internet or allowed others to use you Pi, it is possible someone changed the pi user's password.

Reset lost admin password for Raspberry Pi
Thanks I've tried your solution but my raspberry doesn't even manage to reach the prompt login.

Image

Kopiright
Posts: 8
Joined: Sat Jun 08, 2019 7:05 am

Re: Raspbian stuck at login

Wed Jun 12, 2019 5:16 pm

I have bought a new sd card and a new power supply and tried to mount my "old" sd card to my new raspbian.
It mount well but the data that I can read is unreadable, I have files with strange extensions so I don't know really know how to use them.
I've also noticed that my SD card shows "40Mb" as disk available, so I guess it means that it is really corrupted ?

Image

W. H. Heydt
Posts: 10364
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Raspbian stuck at login

Wed Jun 12, 2019 5:30 pm

An SD card with Raspbian on it has 2 partitions. The first partition is small, as you are seeing. That is the "boot" partition. It contains the files needed to do the initial phases of booting the system. The second partition is the "root" partition and contains everything else and is the working system. The root partition is formatted as EXT4. Windows, for instance, is unable to "see" the root partition, in part because, it doesn't have drivers for EXT4 disks.

What you are seeing (partition mmcblk0p1) is the boot partition of the SD card you've used to boot the system. It looks normal. Mmcblk0p2 is the root partition.

The other SD card (not the one currently running the Pi) is /dev/sda1 (boot) and /dev/sda2 (root).

Kopiright
Posts: 8
Joined: Sat Jun 08, 2019 7:05 am

Re: Raspbian stuck at login

Wed Jun 12, 2019 6:51 pm

Oh thanks ! I didn't know all of this. I mounted the root part of the good SD card this time and all my files are still there ! Thats's really cool.

I still don't understand what happened to mySD card. My files are still there but I just can't login to the system.

Is there a way to change to access, for example, raspi-config on through the mounted device ?

That way I could maybe change the password or disable the login at the beginning

W. H. Heydt
Posts: 10364
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Raspbian stuck at login

Wed Jun 12, 2019 9:15 pm

Kopiright wrote:
Wed Jun 12, 2019 6:51 pm
Oh thanks ! I didn't know all of this. I mounted the root part of the good SD card this time and all my files are still there ! Thats's really cool.

I still don't understand what happened to mySD card. My files are still there but I just can't login to the system.

Is there a way to change to access, for example, raspi-config on through the mounted device ?

That way I could maybe change the password or disable the login at the beginning
Well... Yes... There are several ways. The one I usually use (because (a) I'm kind of old fashioned, and (b) I can remember how) is to edit /etc/passwd to remove the password on the given user account and then re-establish it once I'm back into the system. This is probably best done when the Pi is *not* connected to any network, as it's wide open to any attack. It is probably work noting that, if you change a passwd for a non-root account from root, the system will not prompt for the existing password (this was so that--in the old days--admins could assign new passwords for people who forgot theirs).

Kopiright
Posts: 8
Joined: Sat Jun 08, 2019 7:05 am

Re: Raspbian stuck at login

Fri Jun 14, 2019 8:39 am

W. H. Heydt wrote:
Wed Jun 12, 2019 9:15 pm
Kopiright wrote:
Wed Jun 12, 2019 6:51 pm
Oh thanks ! I didn't know all of this. I mounted the root part of the good SD card this time and all my files are still there ! Thats's really cool.

I still don't understand what happened to mySD card. My files are still there but I just can't login to the system.

Is there a way to change to access, for example, raspi-config on through the mounted device ?

That way I could maybe change the password or disable the login at the beginning
Well... Yes... There are several ways. The one I usually use (because (a) I'm kind of old fashioned, and (b) I can remember how) is to edit /etc/passwd to remove the password on the given user account and then re-establish it once I'm back into the system. This is probably best done when the Pi is *not* connected to any network, as it's wide open to any attack. It is probably work noting that, if you change a passwd for a non-root account from root, the system will not prompt for the existing password (this was so that--in the old days--admins could assign new passwords for people who forgot theirs).
Thanks for your answer but I don't really get it.
How I am supposed to change a user password ? Isn't it supposed to be crypted/secured ? It seems way too easy
I looked inside the /etc/passwd file but I can't see what should I change.
I've got something a lot of lines which somethinng like :
user:x:1001:1001:Lastname;/home/user:/bin/bash

Plus, the password I'm being asked is about the user "pi" which doesn't even appear inside this file.

Can you enlighten me ?

User avatar
rpdom
Posts: 14483
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Raspbian stuck at login

Fri Jun 14, 2019 8:57 am

The user "pi" does appear in that file if you are using raspbian

Code: Select all

pi:x:1000:1000:,,,:/home/pi:/bin/bash
I wouldn't recommend editing that file manually though.

In the old days, the "x" used to be the encrypted password. Now that is held in /etc/shadow

Kopiright
Posts: 8
Joined: Sat Jun 08, 2019 7:05 am

Re: Raspbian stuck at login

Fri Jun 14, 2019 9:12 am

rpdom wrote:
Fri Jun 14, 2019 8:57 am
The user "pi" does appear in that file if you are using raspbian

Code: Select all

pi:x:1000:1000:,,,:/home/pi:/bin/bash
I wouldn't recommend editing that file manually though.

In the old days, the "x" used to be the encrypted password. Now that is held in /etc/shadow
Thanks.

I can confirm you that the "pi" user isn't present into my list, which is really strange... This might explain why I can't login using this user.

I've looked inside /etc/passwd inside my fresh install of raspbian and this time; the user pi is present.

Return to “Troubleshooting”