After removing the user, does the crontab added by that user gets removed as well? I am asking this because I can see a user file called "abcuser" in the
/var/spool/cron/
When I cat the file, I can see the crons added by that user. The user no longer exist and the cron's won't work. But why does the crontab file is still there?
By default,
userdel
doesn't remove the user's cron,at
, and print jobs. To do it, uncomment the following line in/etc/login.defs
:Here is an example of
userdel_local
script:So, whenever you execute
userdel
, any cron jobs owned by the user will be remove.