I was about to recommend a blacklist script and look up exactly how it works, and was about to hammer fcrontab -e into the console and got an immediate
2024-12-03 04:01:42 INFO removing root’s fcrontab
Modifications will be taken into account right now.
[root@maschine # fcrontab -e
2024-12-03 04:02:24 INFO fcrontab : editing root’s fcrontab
no fcrontab for root - using an empty one
Fcrontab is unchanged : no need to install it.
Damn, how do I get all that back?
Is there a way? There has to be a way, right?
Actually it looks like there is a way to recover.
In the directory /var/spool/cron/ there should be both a root and root.orig file.
From my understanding of what I have read the root.orig file is the source code that was used to create the binary fcrontab called root.
If you run the command
fcrontab -z
when logged in as root, it should re-install the user that you are logged in as.
From the man page it should also be possible to use
fcrontab -z root
to explicitly tell it to re-install the root user.
EDIT2:
Unfortunately the fcrontab -z doesn’t work because the root and root.orig files are both removed by the fcrontab -r
So the fcrontab -z does not work correctly. I thought it might be for if you have edited some changes and want to revert those changes but I just tested that and that also didn’t work. So not totally sure what fcrontab -z is for.
However what I can confirm is that if you run fcrontab -e and have an empty crontab, if you then past the contents of that url I provided earlier then you end up with a correct fcrontab for root again.