Skip to content

Commit 1d7d6cd

Browse files
author
Duke B
committed
fix password changer
1 parent 80d2968 commit 1d7d6cd

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

index.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,12 @@
10191019
echo 'passwords do not match!'
10201020
else
10211021
for user in $passwordUsers; do
1022-
echo "$user:$password" | chpasswd
1022+
if id "$user" >/dev/null 2>&1; then
1023+
echo "$user:$password" | chpasswd
1024+
echo "changed password for [$user]"
1025+
else
1026+
echo "user [$user] not found on the system!"
1027+
fi
10231028
done
10241029
fi
10251030
get_key

0 commit comments

Comments
 (0)