You are not logged in.

#1 2022-08-05 05:06:30

Batou
Member
Registered: 2017-01-03
Posts: 259

What to do when sudo doesn't work and won't accept my password?

Hi all,

I currently have a locked X11 screen (I run LightDM as a desktop manager) and I can't log in. Every time I enter my password, I get "Incorrect password".
Yes, I'm 100% sure that i'm typing my password in correctly. Still, I cannot log in.

Luckily, I had an ssh session open from a Raspberry Pi and I do have a shell on the computer but I can't sudo to see my dmesg:

$ sudo su
[sudo] password for batou:
Sorry, try again.
[sudo] password for batou:
Sorry, try again.
[sudo] password for batou:
sudo: 3 incorrect password attempts
 $ dmesg
dmesg: read kernel buffer failed: Operation not permitted

Journal has this entry:

Aug 05 00:55:17 arch sudo[1427492]:      batou : 3 incorrect password attempts ; TTY=pts/1 ; PWD=/tmp/torrents ; USER=root ; COMMAND=/usr/bin/su

This has happened to me once before about 2 months ago. The way I "fixed" it was by hitting the reset switch. I do have a bunch of programs open and don't want to screw up my data so I'm hoping that someone here can help me figure out what's happening and to find a way to log in into my desktop.

Thanks for any hints!

Last edited by Batou (2022-08-05 05:17:37)


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

#2 2022-08-05 05:34:59

seth
Member
Registered: 2012-09-03
Posts: 49,979

Re: What to do when sudo doesn't work and won't accept my password?

1. don't run "sudo su", you're looking for "sudo -i" or "sudo -s"
2. you've triggered "faillock" (run the command to see the status), it'll cool down in 10 minutes - https://wiki.archlinux.org/title/Securi … n_attempts
3. if you user is in the adm or wheel group, you should be able to access the system journal, which includes the ringbuffer and the pam audits, "journalctl --system -b" - w/o that it's gonna be hard to tell why your password input was rejected. Wrong keyboard layout is a popular cause…
4. if the root account isn't deactivated, you should be able to login as root (w/ your root password) no matter what.

Offline

#3 2022-08-05 05:51:45

Batou
Member
Registered: 2017-01-03
Posts: 259

Re: What to do when sudo doesn't work and won't accept my password?

THANK YOU so much seth!

Well, after 10 min faillock, I can log in again. However, I'm 100% sure that I never entered a wrong password. I will comb through my logs tomorrow morning and try to figure out what happened.
Thanks again.


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

#4 2022-08-05 06:23:24

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: What to do when sudo doesn't work and won't accept my password?

Batou wrote:

THANK YOU so much seth!

Well, after 10 min faillock, I can log in again. However, I'm 100% sure that I never entered a wrong password. I will comb through my logs tomorrow morning and try to figure out what happened.
Thanks again.

Is your system exposed to the public internet, and do you have a user name that someone might guess?  Perhaps someone else tried to get in and the safeties worked as designed.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Online

#5 2022-08-05 17:13:16

Batou
Member
Registered: 2017-01-03
Posts: 259

Re: What to do when sudo doesn't work and won't accept my password?

ewaller wrote:
Batou wrote:

THANK YOU so much seth!

Well, after 10 min faillock, I can log in again. However, I'm 100% sure that I never entered a wrong password. I will comb through my logs tomorrow morning and try to figure out what happened.
Thanks again.

Is your system exposed to the public internet, and do you have a user name that someone might guess?  Perhaps someone else tried to get in and the safeties worked as designed.

I do have a HW firewall and I do have a software firewall (UFW) turned on.

Well, it has happened again this morning. Every time I unsuspend my machine, I am not able to log in. After the password (which is 100% correct) fails 3 times, I have to wait 10 min and then I can log in. Logs show me nothing.


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

#6 2022-08-05 18:16:33

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 237

Re: What to do when sudo doesn't work and won't accept my password?

Batou wrote:

Well, it has happened again this morning. Every time I unsuspend my machine, I am not able to log in. After the password (which is 100% correct) fails 3 times, I have to wait 10 min and then I can log in. Logs show me nothing.

I remember some screen locker program which tries to authenticate after every single key pressed, not waiting for Enter at the end of input. Maybe you are using it. Try another screen locker program.

Offline

#7 2022-08-05 18:30:14

Batou
Member
Registered: 2017-01-03
Posts: 259

Re: What to do when sudo doesn't work and won't accept my password?

dimich wrote:
Batou wrote:

Well, it has happened again this morning. Every time I unsuspend my machine, I am not able to log in. After the password (which is 100% correct) fails 3 times, I have to wait 10 min and then I can log in. Logs show me nothing.

I remember some screen locker program which tries to authenticate after every single key pressed, not waiting for Enter at the end of input. Maybe you are using it. Try another screen locker program.

All I have installed is LightDM. I'm pretty sure it's the the program that handles screen locking. I do have it set to lock the screen after unsuspend, of course.

Linux arch 5.18.15-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 29 Jul 2022 22:52:39 +0000 x86_64 GNU/Linux

LightDM packages are:

lightdm 1:1.30.0-4
lightdm-gtk-greeter 1:2.0.8-2
lightdm-gtk-greeter-settings 1.2.2-7

LightDM package seems to be from Aug of 2020. It's fairly old.

And I just found this ticket on LightDM Github that's suspiciously similar to my issue: https://github.com/canonical/lightdm/issues/232  "Can't login after suspend"

I think I've narrowed it down to LightDM but what's baffling is that it doesn't happen all the time. Like I mentioned, I've had it happen few times in the past but I suspend my machine about twice a day. Some other package could be causing this behavior and LightDM is the thing that's exposing this bug. If I upgrade my Arch, it might go away.

I'm not sure what I could do to narrow this down.


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

#8 2022-08-05 19:25:41

seth
Member
Registered: 2012-09-03
Posts: 49,979

Re: What to do when sudo doesn't work and won't accept my password?

I'd start by looking at the journal and for pam failures.
Since the suspend / resume is very prone to re-add any keyboard, is your keyboard layout configured via an xorg configlet and can you test/trigger this w/ a qwerty-safe password (12345)?

https://wiki.archlinux.org/title/Xorg/K … tion_files

Offline

Board footer

Powered by FluxBB