Error while restart cron service

Hello,

I don’t know how it happend and it seems to not affect anything seriously, but after restarting cron.service i’ve got an error:

Feb 07 09:44:50 cp.liby.hu cron[15236]: Error: bad username; while reading /etc/cron.d/hestiaweb

As I checked the file, it’s missing a username:

25 7 * * * sudo /usr/local/hestia/bin/v-update-letsencrypt-ssl

So I added hestiaweb and the error is gone. As I checked, this entry was added by v-add-letsencrypt-domain at line 583 and it does not contain a username. However I’m not sure if this is neccesery cause the install script add the same job to hestiaweb users crontab.

cat /etc/passwd | grep hestiaweb

The user exists and the problem solved on my side. I just want to point out, that there is an error in v-add-letsencrypt-domain command, that the line added to /etc/cron.d/hestiaweb is missing a username.

# Adding LE autorenew cronjob
if [ -z "$(grep v-update-letsen "/etc/cron.d/hestiaweb")" ]; then
        min=$(generate_password '012345' '2')
        hour=$(generate_password '1234567' '1')
        echo "$min $hour * * * sudo /usr/local/hestia/bin/v-update-letsencrypt-ssl" > /etc/cron.d/hestiaweb
fi

the line shoud be:

        echo "$min $hour * * * hestiaweb sudo /usr/local/hestia/bin/v-update-letsencrypt-ssl" > /etc/cron.d/hestiaweb
4 Likes