How To Set Job With Different User In Crontab?


I have some crontab jobs. I have setup them with root user. But there are some problems. The job do not work because of security issues that prevents job to run with root user. How can I set different user to run crontab job to run different user than current user?

Crontab is used install, deinstall or list tables of cron daemon. As we know each user have their own tables because of the security restriction. To use crontab the user shouldn’t be defined in /etc/cron.eny 

Install New Job With Different User

We will install new job with different user by providing username with -u parameter. As we know to use different user we should have root privileges.

Every night the backup command will run

List Jobs Of Different User

We have added new job for user ismail. We can list jobs of different user too like below.

LEARN MORE  Linux Rpm Command With Examples

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)