2

This is a non-standard installation of Ubuntu 18.04, the ELAR Arm based Ubuntu distribution with RockChip support for boards such as the Asus tinkerboard. The Problem, and solution, may not apply to your case, or other Mainline Ubunutu distributions.

For some wacky unknown reason, I have a cron job that is not running, so I started digging around, and found a not on NixCraft website, that says i might need to enable cron using systemctl. Ok fine, there is an example, so i try it. I authenticate, and it proceeds to fail.

# systemctl enable cron.service
Synchronizing state of cron.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable cron

looks like cron service is enabled right? well, on boot then, @reboot /usr/bin/motion -b should run, but it doesn't. I looked int /var/log/syslog and see a spot where it looks like cron fails, but Im not sure what to do next.

Jun 17 04:08:37 ELAR-Systems systemd[1]: Reloading.
Jun 17 04:08:37 ELAR-Systems systemd[1]: message repeated 2 times: [ Reloading.]
Jun 17 04:09:01 ELAR-Systems cron[347]: Authentication token is no longer valid; new one required
Jun 17 04:09:01 ELAR-Systems CRON[1629]: Authentication token is no longer valid; new one required

Wondering how to fix this....

  • 3
    If you have solved, please post the solution as an answer. – muru Jun 16 '18 at 18:30
  • 2
    Since root is disabled in a stock install of Ubuntu, your issue (and solution) may confuse some users into mistakenly assigning root a password. Consider a disclaimer or warning...or several... to dissuade those folks. – user535733 Jun 16 '18 at 19:46
0

on a redhat forum I saw a similar, though possibly unrelated post stating that I must change my user name to reauthenticate. ugh ok....

# chage -l root
Last password change                    : password must be changed
Password expires                    : password must be changed
Password inactive                   : password must be changed
Account expires                     : never
Minimum number of days between password change      : 0
Maximum number of days between password change      : 99999
Number of days of warning before password expires   : 7

root@ELAR-Systems:# passwd root 
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully

root@ELAR-Systems:# chage -l root
Last password change                    : Jun 16, 2018
Password expires                    : never
Password inactive                   : never
Account expires                     : never
Minimum number of days between password change      : 0
Maximum number of days between password change      : 99999
Number of days of warning before password expires   : 7

And... That solved it. to heck with it, posting this anyway. Again, This solution might not apply to mainline Ubuntu distributions.

I found that cron was not enabled, and that root user was needed to authenticate the cron service. After this, my cron jobs then performed properly.

0

Worked on this with a colleague and worked out that on his Ubuntu 16 was working but not on 18. When looked in greater detail, he was using sudo nano /etc/crontab rather than sudo crontab.

I put the command to run at the required time ...

30 13 * * *    root     shutdown -h now

All worked perfectly - even when Linux did not have a logged in user.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.