openSuSE 11.4 cronjobs not working...

Hi everybody,

I just reinstalled a Webserver that previously ran under openSuSE11.2.

Everything´s fine, so far, except for my backup jobs in cron, which won´t work at all.

The scripts run fine in console but no matter what I try, I can´t get them to work with cron.

So I tried different commands like


*/30 * * * * /usr/sbin/sntp -s no -r  de.pool.ntp.org

which work on other systems. They don´t work on openSuSE11.4, either.

crontab -l shows


# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.LowYq2 installed on Mon May  9 14:19:46 2011)
# (Cronie version 4.2)
*/30 * * * * /usr/sbin/sntp -s no -r  de.pool.ntp.org
0 1 * * * /usr/local/bin/backup/backup.sh
0 1 * * * /usr/local/bin/backup/mysqlbackup.sh
0 0 * * * /usr/local/bin/backup/backupcleaner.sh

ls -lah /usr/local/bin/backup shows


-rwx------ 1 bin root 1.5K Apr 19 19:19 backup.sh
-rwx------ 1 bin root  343 Apr 19 19:19 backupcleaner.sh
-rwx------ 1 bin root  703 Apr 19 19:19 mysqlbackup.sh
-rwxr-xr-x 1 bin root  142 May  9 13:23 test.sh

I just looked up another system which runs on openSuSE 11.3. Same set of scripts, same crontab, working fine. The only difference between 11.3 and 11.4 is the additional package cronie.

Any hints/ideas where to look?

Thanks,

Tom

Is cron running?


/etc/init.d/cron status

Are there any errors in /var/log/messages?

Good luck,
Hiatt

The deal with cronie is that openSUSE and Fedora have replaced Vixie cron, which is not maintained upsteam, with cronie, so cron is now just a mostly empty package for compatibility. However cronie should be a workalike as it’s a fork from Vixie cron.

Sorry I have no insight into your problem, haven’t run any cron jobs on 11.4 machines. Just explaining what cronie is.

Ok, solved it.

I tried some cron tasks yesterday on my Server at home on 11.4 and they worked perfectly

This morning I created a new user with shell access and trying to write a small script. I couldn’t execute it, although it had the right permissions.
ls -l /usr/bin brought me back to path. For most of the executables there the owner was changed to bin

The error was the result of importing the passwd file from one of our Developers heavily messed up Dev Server. :
Somehow he managed to change bin´s UID to 0, so I always tried to edit bin´s crontab which clearly cannot work.

Thanks for your answers, guys,

Tom