mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-01-17 20:27:11 -05:00
41b2819ec8
to avoid needlessly bumping pam_tally2 counter https://forums.whonix.org/t/restrict-root-access/7658/1
20 lines
493 B
Bash
Executable File
20 lines
493 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ "$(passwd -S "$PAM_USER" | cut -d ' ' -f 2)" = "P" ]; then
|
|
true "INFO: Password not locked."
|
|
else
|
|
echo "$0: ERROR: Password for user \"$PAM_USER\" is locked." >&2
|
|
|
|
if [ -f /usr/share/whonix/marker ] || [ -f /usr/share/kicksecure/marker ]; then
|
|
if [ "$PAM_USER" = "root" ]; then
|
|
echo "$0: ERROR: root account is locked by default. See:" >&2
|
|
echo "https://www.whonix.org/wiki/root" >&2
|
|
echo "" >&2
|
|
fi
|
|
fi
|
|
|
|
exit 1
|
|
fi
|
|
|
|
exit 0
|