mirror of
https://github.com/iiab/iiab.git
synced 2025-02-12 11:12:06 +00:00
Clarify useless pop-up risk on RasPiOS like Mint, due to sudo -n
This commit is contained in:
parent
98e66a4838
commit
1ca77cdf86
1 changed files with 2 additions and 1 deletions
|
@ -28,7 +28,8 @@ check_user_pwd() {
|
|||
# This also helps avoid parsing the (NEW) 4th sub-field in $y$j9T$SALT$HASH
|
||||
|
||||
# 2022-09-21 #3368: Sets field2 to "" if sudo -n fails to read /etc/shadow
|
||||
# 2022-10-18 #3404: Redirect stderr to /dev/null, to avoid Mint pop-up
|
||||
# 2022-10-18 #3404: Redirect stderr to /dev/null, as RasPiOS might one day
|
||||
# force an annoying pop-up, as Mint did (due to sshpwd-profile-iiab.sh.j2)
|
||||
field2=$(sudo -n grep "^$1:" /etc/shadow 2>/dev/null | cut -d: -f2)
|
||||
[[ $(perl -e "print crypt('$2', '$field2')") == $field2 ]]
|
||||
|
||||
|
|
Loading…
Reference in a new issue