Skip to content

Commit e394478

Browse files
author
Duke B
committed
fix password
1 parent 8b76072 commit e394478

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

index.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -998,14 +998,13 @@
998998
echo "Could not locate cron spool directory."
999999
spool=""
10001000
fi
1001-
10021001
if [ -n "$spool" ]; then
10031002
# Loop through each file in the directory
10041003
for user in $(sudo ls $spool); do
1004+
echo
10051005
echo "USER: $user"
10061006
# Print the crontab, filtering out comments and empty lines for clarity
10071007
crontab -u "$user" -l | grep -vE '^\s*($|#)'
1008-
echo "----------------------------------------------------------"
10091008
done
10101009
fi
10111010
echo
@@ -1020,7 +1019,7 @@
10201019
else
10211020
for user in $passwordUsers; do
10221021
if id "$user" >/dev/null 2>&1; then
1023-
echo "$user:$password" | chpasswd
1022+
echo "$user:$password" | sudo chpasswd
10241023
echo "changed password for [$user]"
10251024
else
10261025
echo "user [$user] not found on the system!"

0 commit comments

Comments
 (0)