mirror of
https://github.com/Kicksecure/security-misc.git
synced 2024-10-01 08:25:45 -04:00
pam_tally2-info: fix, do nothing when started as user "user"
xscreensaver runs as user "user", therefore pam_tally2 cannot function. xscreensaver has its own failed login counter. as user "user" /sbin/pam_tally2 -u user pam_tally2: Error opening /var/log/tallylog for update: Permission denied /sbin/pam_tally2: Authentication error https://askubuntu.com/questions/983183/how-lock-the-unlock-screen-after-wrong-password-attempts https://forums.whonix.org/t/how-strong-do-linux-user-account-passwords-have-to-be-when-using-full-disk-encryption-fde-too/7698
This commit is contained in:
parent
c2e444479c
commit
bec680d4f3
@ -1,5 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ ! "$(id -u)" = "0" ]; then
|
||||||
|
## as user "user"
|
||||||
|
## /sbin/pam_tally2 -u user
|
||||||
|
## pam_tally2: Error opening /var/log/tallylog for update: Permission denied
|
||||||
|
## /sbin/pam_tally2: Authentication error
|
||||||
|
##
|
||||||
|
## xscreensaver runs as user "user", therefore pam_tally2 cannot function.
|
||||||
|
## xscreensaver has its own failed login counter.
|
||||||
|
##
|
||||||
|
## https://askubuntu.com/questions/983183/how-lock-the-unlock-screen-after-wrong-password-attempts
|
||||||
|
true "$0: not started as root, exiting."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
pam_tally2_output="$(pam_tally2 --user "$PAM_USER")"
|
pam_tally2_output="$(pam_tally2 --user "$PAM_USER")"
|
||||||
|
|
||||||
if [ "$pam_tally2_output" = "" ]; then
|
if [ "$pam_tally2_output" = "" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user