mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-05-12 23:42:13 -04:00
fix
This commit is contained in:
parent
73963a9e68
commit
39b35ef9ac
2 changed files with 16 additions and 22 deletions
|
@ -30,26 +30,8 @@ else
|
|||
user_to_check="$SUDO_USER"
|
||||
fi
|
||||
|
||||
if [ "$(id -u)" = "0" ]; then
|
||||
faillock_program="/usr/sbin/faillock"
|
||||
else
|
||||
## as user "user"
|
||||
## /usr/sbin/faillock -u user
|
||||
## faillock: Error opening /var/log/tallylog for update: Permission denied
|
||||
## /usr/sbin/faillock: Authentication error
|
||||
##
|
||||
## xscreensaver runs as user "user", therefore pam_faillock cannot function.
|
||||
## xscreensaver has its own failed login counter.
|
||||
##
|
||||
## https://askubuntu.com/questions/983183/how-lock-the-unlock-screen-after-wrong-password-attempts
|
||||
##
|
||||
## https://www.whonix.org/pipermail/whonix-devel/2019-September/001439.html
|
||||
#true "$0: not started as root, exiting."
|
||||
#exit 0
|
||||
|
||||
faillock_program="sudo --non-interactive /usr/sbin/faillock"
|
||||
fi
|
||||
|
||||
$faillock_program --user "$user_to_check"
|
||||
faillock --user "$user_to_check"
|
||||
|
||||
## Debugging.
|
||||
## Explicit "exit $?" to have it recorded in the xtrace if enabled.
|
||||
exit $?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue