# crontab -l
//it will listed out all the cron task running under root account, at the same if we want to know by users Cron task
#crontab -l -u username
here my issue is on redhat 8 server when i login using user account I'm trying to list or create cron task but it refused to allow to make that work
$crontab -l
You (username) are not allowed to use this program (crontab)
exactly the error getting, to get resolve this issue there have two option one should need to allow this user to permit execute cron task for that follow below or remove those allow option from this server
option :1
#vi /etc/cron.allow
root
boobalan
//save and exit the file
now we could able to view or edit the Cron task by using user account
$crontab -l
no crontab for user
option :2
//delete the /etc/cron.allow file from the server then it will permit all users from the server, centos doesn't have this file. Redhat 8 having this file so we can specify which user can access crontab and which user can not.
[root@centos ~]# rm /etc/cron.allow
rm: remove regular file '/etc/cron.allow'? y
[root@centos ~]# exit
logout
[boobalan@centos ~]$ crontab -l
no crontab for boobalan
[boobalan@centos ~]$
0 Comments