LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Locked out of Raspberry Pi (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/locked-out-of-raspberry-pi-4175732074/)

KPryor 12-22-2023 05:36 PM

Locked out of Raspberry Pi
 
Hello all,

I recently tried to login to my Pi (running Rasp Pi OS) and was told my password was incorrect. I'm sure it was correct, but anyway... I finally wound up booting to single user mode and changed my login password. I booted back to normal mode and tried to login and it still says my password is wrong. I went back to single user mode and created a new user/password. Rebooted again and get told the new user's password is incorrect. I'm really baffled as to what went wrong here. The Pi is runnning as my Jellyfin server and I really hate to wipe it and start over, but if I can't figure out my login problem I guess that's what I'll have to do. Anyway, I was just wondering if anyone has seen a similar issue or has a solution.

Thanks!
Ken

killerhippy 12-23-2023 02:53 AM

It's a couple of decades ago, but I have once got a very special message when I tried to login:

"You don't exist, go away!"

Reason was a filled up devicesystem with no space left.

___ 12-23-2023 03:16 AM

Wild idea: strace (login or su maybe), to see where it errors out.

KPryor 12-23-2023 10:08 AM

Quote:

Originally Posted by killerhippy (Post 6472196)
It's a couple of decades ago, but I have once got a very special message when I tried to login:

"You don't exist, go away!"

Reason was a filled up devicesystem with no space left.

The file systems is not full on this one, so it's just a weird mystery. Jellyfin is still working great but I have no way to login via command line/ssh to update the system ever or do other maintenance work. Looks like I'm probably just going to tear it all down and rebuild my server. Not a huge deal but not what I really want to do.
Thanks!

KPryor 12-23-2023 10:11 AM

Quote:

Originally Posted by ___ (Post 6472198)
Wild idea: strace (login or su maybe), to see where it errors out.

I can't login at all, except when booted to single user mode as root, so I'm not sure how I could do that. I've never used strace before so maybe I just don't understand how it would work.

hazel 12-23-2023 10:30 AM

Quote:

Originally Posted by KPryor (Post 6472261)
I've never used strace before so maybe I just don't understand how it would work.

strace shows all the system function calls that a program makes as it runs so you can see where it is breaking.

business_kid 12-23-2023 11:13 AM

I would try adding another user, and seeing if they can log in and do stuff. If so you can
  1. use usermod as root to change your old user's uid & gid to something weird
  2. Use usermod to make your new user's uid & gid the same as the original user
  3. Keep checking your new user functions.
Change as much as you want of new user to old. I would not change the homedir, as the problem could well be there. But if you get your server running, you can sort the rest out yourself. I would caution against doing anything global.

Given your tale of woe, you may be suffering under the delusion that sdcards are reliable storage. They are not. If you succeed in extracting yourself out of this, back up to disik, buy a new sdcard and make a copy. That may well fix it. When did you fsck the disk last?

KPryor 12-23-2023 11:22 AM

Quote:

Originally Posted by business_kid (Post 6472270)
I would try adding another user, and seeing if they can log in and do stuff. If so you can
  1. use usermod as root to change your old user's uid & gid to something weird
  2. Use usermod to make your new user's uid & gid the same as the original user
  3. Keep checking your new user functions.
Change as much as you want of new user to old. I would not change the homedir, as the problem could well be there. But if you get your server running, you can sort the rest out yourself. I would caution against doing anything global.

Given your tale of woe, you may be suffering under the delusion that sdcards are reliable storage. They are not. If you succeed in extracting yourself out of this, back up to disik, buy a new sdcard and make a copy. That may well fix it. When did you fsck the disk last?

Been a while since I ran fsck, I'll admit. All my media files (videos, music, etc) are on a USB connected drive, so I won't lose any of that. This is just kind of a weird deal. I'm thinking instead of wasting any more time on it, I'm just going to build a new server as a Proxmox VM and run it from that from now on and ditch the Pi from regular use. At least with the VM I can set it to auto backup as often as I like to my backup server.

business_kid 12-23-2023 11:43 AM

If you have a usb dedicated to it, why, oh why run on sdcard at all?

Sure, you might have to fart around with your usb initially to get going but the usb boots a Pi for some years. I have a usb disk running mine with an empty sdcard slot. So if the usb boot goes pear shaped, I can get in with an sdcard. Even the other usb3 slot has boot priority, to maximise my chances of taking life easy.

KPryor 12-23-2023 11:59 AM

Quote:

Originally Posted by business_kid (Post 6472279)
If you have a usb dedicated to it, why, oh why run on sdcard at all?

Sure, you might have to fart around with your usb initially to get going but the usb boots a Pi for some years. I have a usb disk running mine with an empty sdcard slot. So if the usb boot goes pear shaped, I can get in with an sdcard. Even the other usb3 slot has boot priority, to maximise my chances of taking life easy.

This is an old Pi 3 that's I've had running in this capacity for quite a while. Never looked into changing the boot device for whatever reason. It's not a huge deal. Just more of a curiosity than anything as to what went wrong. Thanks!

business_kid 12-23-2023 02:44 PM

Well, I don't know if the Pi 3 does usb boot at all. The Pi 4 does.

onebuck 12-23-2023 05:42 PM

Moderator Response
 
Moved: This thread is more suitable in <Linux - Embedded & Single-board computer > and has been moved accordingly to help your thread/question get the exposure it deserves.

pan64 12-24-2023 04:20 AM

Usually I have a default boot on the sd card, and everything else is stored on a pendrive. So in such cases I just need to save some settings and reinstall the os. But we still don't know what is wrong. Probably you can find something in logs (dmesg?). Probably your SD card is over.
You can check that SD card on any other host, to see if it is healthy and works perfectly (you just need a reader).

___ 12-24-2023 09:36 PM

+1 #6. Well worth a web-research on: strace tutorial
Tho OP has probably moved on with a reinstall, I'd be curious to hear the cause!
(Or OP can mark thread as solved with 'Thread Tools' above #1)

KPryor 12-25-2023 07:56 AM

Quote:

Originally Posted by ___ (Post 6472499)
+1 #6. Well worth a web-research on: strace tutorial
Tho OP has probably moved on with a reinstall, I'd be curious to hear the cause!
(Or OP can mark thread as solved with 'Thread Tools' above #1)

I haven't done anything yet. Sorry I didn't check in on this thread yesterday. Been busy with holiday related stuff. Anyway, I will definitely research strace and see what I can find out. I appreciate all the suggestions given. Whenever I do my server rebuild, I will definitely do a better job of setting things up. I will go ahead an mark this as solved since I plan to rebuild the server, but if/when I figure out what the problem is I will report back.

Thank you!!!
Ken


All times are GMT -5. The time now is 03:45 AM.