A long enough sudo loop locks the user account
I ran an update today, and started multitasking while waiting for the AUR packages to compile. At the end, paru asked for sudo password, which timed out about 5 times. When I finally entered the correct password, it was not accepted.
I found out later, that my user account was locked due to 3 failed logins. There were no other login attempts, so I can only imagine that each timed out sudo attempt was counted as a failed login attempt.
Maybe there should be a prompt before retrying timed out sudo, or just disable looping by default, and let the user run the upgrade command again. It will install the compiled packages from the cache anyway. Alternatively, #818 would also avoid this issue.
Affected Version
paru -V
paru v1.11.1 - libalpm v13.0.2 (latest paru package in AUR)
Description
Have you checked previous issues? #995 looks similar, but it's closed without any activity.
Output
No relevant output
Paru shouldn't try and retry sudo if it fails. Though sudo itself does loop the input a few times.
I didn't check the code to check what happens exactly, but your response reminded me of this, and I decided to test it again, this time taking screenshots. The loop and lock still happens, but I don't know if it's due to sudo or paru. Based on your reply, it's probably sudo.
This is what attaching screenshots to an issue looks like on GitHub. Let me know if there is a more appropriate way of including this information, and I can edit the comment.
The command was:
paru -Syu
to fix this issue i would recommend adding a run on sudo -v within 5 minutes of the last sudo run. sudo -v updates the cached credentials to have them last another 5 mins.