1. About
The following demonstrates how to enable users tom and bob to modify cron as user oracle.
OS: Oracle Linux 7
2. Example
Login as root:
[root@localhost ~]# groupadd oracron
[root@localhost ~]# adduser oracle
[root@localhost /]# visudo
Insert the following (press i):
## Allow members of the oracron group to execute crontab -e as user oracle
%oracron ALL=(oracle) NOPASSWD: crontab -e
Save and exit (type :wq)
Add user tom and bob to the oracron group.
[root@localhost ~]# usermod -a -G oracron tom
[root@localhost ~]# usermod -a -G oracron bob
Login as user tom or bob and execute the following respectively:
[tom@localhost ~]$ sudo -u oracle crontab -e
[bob@localhost ~]$ sudo -u oracle crontab -e
3. Disclaimer And Copyright
This document is the result of my own research and testing and was written in the hope to provide useful information for members of the Oracle community. It does not substitute any documentation provided by Oracle. Use at your own risk.
The information herein is provided under the terms and conditions of http://www.oracle.com/us/legal/terms/index.html. Please do not plagiarize.