1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-14 12:12:12 +00:00

sshpwd-lxde-iiab.sh.j2: 'sudo -n' avoids pwd prompts

This commit is contained in:
A Holt 2022-09-20 21:37:57 -04:00 committed by GitHub
parent 8ed159b5c2
commit bdbdefa129
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,7 +26,7 @@ check_user_pwd() {
# 2021-08-28: New OS's use 'yescrypt' so use Perl instead of Python (#2949)
# This also helps avoid parsing the (NEW) 4th sub-field in $y$j9T$SALT$HASH
field2=$(sudo grep "^$1:" /etc/shadow | cut -d: -f2)
field2=$(sudo -n grep "^$1:" /etc/shadow | cut -d: -f2)
[[ $(perl -e "print crypt('$2', '$field2')") == $field2 ]]
# # $meth (hashing method) is typically '6' which implies 5000 rounds