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:
- Change login timeout when logging in into Ubuntu on stackoverflow
- How can I lower the delay after incorrectly entered login and sudo passwords on askubuntu
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.
After a lot of digging into the gnome-shell and gdm source code, the problem seems to have been fixed by these two commits:
f4d90bc127ececb653ee399493839f17932b7622 - "polkitAgent: Reset the session request timeout when removing it"
8d139bbd95a5d62e0ba20b711a10a8b669cb9e9d - "authPrompt: Grab key focus when making entry sensitive"
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.
Workaround based on the update in the Question
Shacking animation can be disabled if you wish to stop the global animation by running the below command for the desktop session..
The above command helps for the lock screen..
If you wish to disable the shacking animation for the login screen too.. run the below command..
for reverting above changes..
and
Tested in Ubuntu 20.04 for both lock and login screens..