File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
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!"
You can’t perform that action at this time.
0 commit comments