{"id":13717,"date":"2026-01-01T11:50:36","date_gmt":"2026-01-01T11:50:36","guid":{"rendered":"https:\/\/davelevy.info\/wiki\/?p=13717"},"modified":"2026-01-01T12:08:12","modified_gmt":"2026-01-01T12:08:12","slug":"sudo-on-raspbian","status":"publish","type":"post","link":"https:\/\/davelevy.info\/wiki\/sudo-on-raspbian\/","title":{"rendered":"sudo on raspbian"},"content":{"rendered":"\n<p>I have\/had a problem; I suspect that my cron jobs were asking for permission to run which since they were batch programs is not the desired behaviour. I have done some googling, and think it maybe related to the sudoers file, i.e. additional command are needed. At the moment I have turned cron off and am using systemd to manage the remaining services I need. <\/p>\n\n\n\n<!--more-->\n\n\n\n<h3 class=\"wp-block-heading\">Links and hints<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a href=\"https:\/\/askubuntu.com\/questions\/419548\/how-to-set-up-a-root-cron-job-properly\">https:\/\/askubuntu.com\/questions\/419548\/how-to-set-up-a-root-cron-job-properly<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/raspberrypi.stackexchange.com\/questions\/57835\/why-my-script-is-not-executed-with-root-privileges-using-crontab\">https:\/\/raspberrypi.stackexchange.com\/questions\/57835\/why-my-script-is-not-executed-with-root-privileges-using-crontab<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/raspberrypi.stackexchange.com\/questions\/32955\/cron-job-doesnt-work-but-runs-successfully-manually\">https:\/\/raspberrypi.stackexchange.com\/questions\/32955\/cron-job-doesnt-work-but-runs-successfully-manually<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/forums.raspberrypi.com\/viewtopic.php?t=296993\">https:\/\/forums.raspberrypi.com\/viewtopic.php?t=296993<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/stackoverflow.com\/questions\/60754639\/sudo-asks-for-password-in-cronjob-script-but-the-same-script-works-without-passw\">sudo asks for-password-in-cronjob-script-but-the-same-script-works-without-password in terminal<\/a> from stack overflow, recommends explicit call to sudo in the crontab. Don&#8217;t think it worked for me. <\/li>\n\n\n\n<li>Google <a href=\"https:\/\/gemini.google.com\/app\/13c6b111e7361e5d\">gemini on the sudoers log<\/a>, on Debian they use system logs to capture these events.<\/li>\n\n\n\n<li><a href=\"https:\/\/www.maketecheasier.com\/check-sudo-history-linux\/\">https:\/\/www.maketecheasier.com\/check-sudo-history-linux\/<\/a>, very readable, or so it seems<\/li>\n\n\n\n<li>Here is a <a href=\"https:\/\/www.sudo.ws\/docs\/man\/1.8.16\/sudoers.man\/\">man page explainer<\/a>, from sudo.ws<\/li>\n\n\n\n<li>The <a href=\"https:\/\/linux.die.net\/man\/8\/sudo\">man sudo<\/a> @ linux.die.net<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>I have\/had a problem; I suspect that my cron jobs were asking for permission to run which since they were batch programs is not the desired behaviour. I have done some googling, and think it maybe related to the sudoers file, i.e. additional command are needed. At the moment I have turned cron off and&#8230;<\/p>\n","protected":false},"author":1,"featured_media":13718,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","_share_on_mastodon":"0"},"categories":[8,3],"tags":[657,916,1286,553,911],"class_list":["post-13717","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-technology","tag-cron","tag-linux","tag-raspbian","tag-sudo","tag-technology"],"share_on_mastodon":{"url":"https:\/\/mastodon.social\/@davelevy_eu\/115819691281988283","error":""},"jetpack_featured_media_url":"https:\/\/davelevy.info\/wiki\/wp-content\/uploads\/2026\/01\/private-keepout-nickwindsor-unsplash.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/13717","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/comments?post=13717"}],"version-history":[{"count":2,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/13717\/revisions"}],"predecessor-version":[{"id":13721,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/13717\/revisions\/13721"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/media\/13718"}],"wp:attachment":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/media?parent=13717"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/categories?post=13717"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/tags?post=13717"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}