Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Deleted root's crontab
-
- Posts: 6
- Joined: 2014-04-12 08:33
Deleted root's crontab
I accidentally replaced root's crontab with the system wide crontab on a new system, before I took full backup. Could anyone copy and paste Wheezy's default crontab for root here to save my time, please?
Re: Deleted root's crontab
Or... you could solve this problem all by yourself in a matter of minutes, simply by copying the file over from a fresh install (even from inside a VM).
And you might want to make that backup as soon as you're done copying.
And you might want to make that backup as soon as you're done copying.
-
- Posts: 6
- Joined: 2014-04-12 08:33
Re: Deleted root's crontab
On my Debian 7.x (64 Bit) install there is no root crontab as this shows:
and I don't have any as user.
Larry
Code: Select all
root@debian:~# crontab -l
no crontab for root
root@debian:~#
Larry
-
- Posts: 6
- Joined: 2014-04-12 08:33
Re: Deleted root's crontab
Thanks for answering, but I swear I had one with content in it, when I first run crontab -e.lkraemer wrote:On my Debian 7.x (64 Bit) install there is no root crontab as this shows:and I don't have any as user.Code: Select all
root@debian:~# crontab -l no crontab for root root@debian:~#
This is a cosmetic issue anyway, and that's why I would not want to spend much time to fix it. Just to wipe out a stupid error on my part.
Re: Deleted root's crontab
in /etc there is a file named crontab with the following permissions:
larry@debian:/etc$ cat crontab
Is that what you are looking for?
Larry
-rw-r--r-- 1 root root 722 Jul 3 2012 crontab
larry@debian:/etc$ cat crontab
Code: Select all
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#
Larry
-
- Posts: 6
- Joined: 2014-04-12 08:33
Re: Deleted root's crontab
No, this is system wide crontab that somehow replaced my root account's crontab. I have that one still intact.lkraemer wrote: larry@debian:/etc$ cat crontabIs that what you are looking for?Code: Select all
# /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to run the `crontab' # command to install the new version when you edit this file # and files in /etc/cron.d. These files also have username fields, # that none of the other crontabs do. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # m h dom mon dow user command 17 * * * * root cd / && run-parts --report /etc/cron.hourly 25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) #
Re: Deleted root's crontab
OK tell me exactly what you want me to run to display the crontab you are looking for? As root or loginuser do this:
I've got a basically clean install as far as cron goes.
Larry
I've got a basically clean install as far as cron goes.
Larry
Re: Deleted root's crontab
As root if I do a:
Larry
Code: Select all
crontab -e
I get a file with the contents of:root@debian:~# crontab -e
no crontab for root - using an empty one
No modification made
root@debian:~#
Code: Select all
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
-
- Posts: 6
- Joined: 2014-04-12 08:33
Re: Deleted root's crontab
Thank you, that it is.lkraemer wrote: I get a file with the contents of:Code: Select all
# Edit this file to introduce tasks to be run by cron. # # Each task to run has to be defined through a single line # indicating with different fields when the task will be run # and what command to run for the task # # To define the time you can provide concrete values for # minute (m), hour (h), day of month (dom), month (mon), # and day of week (dow) or use '*' in these fields (for 'any').# # Notice that tasks will be started based on the cron's system # daemon's notion of time and timezones. # # Output of the crontab jobs (including errors) is sent through # email to the user the crontab file belongs to (unless redirected). # # For example, you can run a backup of all your user accounts # at 5 a.m every week with: # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ # # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command