11

I am very impatient, when I unfortunately mistype my login-password on my laptop (Ubuntu 20.04), I don't want to wait three seconds to retry. (A delay of 0.3 seconds would be enough to prevent potential brute force and there is a longer time after 3 failed attempts anyway.)

I found a lot of answers explaining how to change this delay for the console login and for sudo. I managed to set that delay to 0.3 seconds by editing the value in /etc/pam.d/login (for the tty console) to:

auth       optional     pam_faildelay.so  delay=300000

and adding the same line to /etc/pam.d/common-auth (for sudo and the graphical login screen) as first line before (!) this line:

auth    [success=1 default=ignore]      pam_unix.so nullok_secure nodelay

See:

This kind of changes the delay that occurs on the graphical gdm3 login-screen in Ubuntu 20.04 but only until the login input field reappears (and shakes). If you set a long delay in /etc/pam.d/common-auth, it counts only for the time before the input field reappears. It has no effect on the delay after the shaking.

I already activated logging in gdm and this is the output of grep gdm3 /var/log/syslog when I pressed SUPER+L to Lock screen and tried about 6 times a false password; you see the 3s delay in the attempt. At the end of each false password attempt, there is a log:

reauthentication service 'gdm-password' stopped

after this there starts the 3s delay until I get a new cursor. Maybe this is the main problem?


Update:
For info: I use GNOME Shell 3.36.1. An Idea of mine was maybe disable the shaking animation will help? Because I found out, that you can use the mouse to click into the field and you can type immmediately while the box is shaking.

rubo77
  • 34,024
  • 52
  • 172
  • 299

2 Answers2

3

After a lot of digging into the gnome-shell and gdm source code, the problem seems to have been fixed by these two commits:

These fix the issue where the input box doesn't get focused for 3 seconds after the shaking stops.

These changes are there in Gnome 3.36.2, and updating to that version fixes the issue. Now you can type even while the box is shaking.

To disable the shaking see @PRATAP's answer.

1

Workaround based on the update in the Question

An Idea of mine was maybe disable the shaking animation will help? Because I found out, that you can use the mouse to click into the field and you can type immediately while the box is shaking.

Shacking animation can be disabled if you wish to stop the global animation by running the below command for the desktop session..

gsettings set org.gnome.desktop.interface enable-animations false

The above command helps for the lock screen..

enter image description here

If you wish to disable the shacking animation for the login screen too.. run the below command..

sudo -Hu gdm dbus-launch gsettings set org.gnome.desktop.interface enable-animations false

for reverting above changes..

gsettings set org.gnome.desktop.interface enable-animations true

and

sudo -Hu gdm dbus-launch gsettings set org.gnome.desktop.interface enable-animations true

Tested in Ubuntu 20.04 for both lock and login screens..