Hello,
As Pan64 mentions,
Quote:
see man crontab. as root you can edit other users' cronjobs too.
crontab -u user -e
|
You could also "fake" or if you prefer the term mask the sender's name by adding
-f PseudoUsername to your sendmail statement. i.e.
Code:
a=$(df -h /mnt/smb | tail -n +3 | tr -s ' ' | tr '%' ' ' | cut -d ' ' -f 5)
echo $a
if [[ $a -ge 30 ]]; then
cat /etc/diskspace/text.txt | /usr/bin/sendmail -f PsuedoUsername Test@gmail.com
fi
where
will cause the email to "appear" as if it's from the "fake" user so simply substitute
PseudoUsername with the username you wish to emulate - in your case
Diskspace (inspection of the email header via the mail client will reveal the true sender's identity - typically root@localhost) - I use this method myself for a number of different types of system emails.
Regards,
Rawcous