Authentification problem for cron certbot-auto

I have noticed my /var/log/auth.log getting same warnings (auth could not identify password for [pi]) each day at same time when my /home/pi/scripts/certbot-auto renew --no-self-upgrade is run from cron. When I run it manually, it just informs me of “Cert not yet due for renewal”, meaning it works. Why does it work when run manually but not when from cron?

Are you running it from the ‘pi’ user’s crontab rather than root’s? Maybe it’s trying to sudo non- interactively, and failing. If so, put it in root’s crontab instead - sudo crontab -e

Will try. Was pretty sure since it works manually without asking for sudo password, it should work from pi crontab as well.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.