|
|||
1. Managing Terminals and Modems (Overview) 2. Setting Up Terminals and Modems (Tasks) 3. Managing Serial Ports With the Service Access Facility (Tasks) 4. Managing System Resources (Overview) 5. Displaying and Changing System Information (Tasks) 8. Scheduling System Tasks (Tasks) Creating and Editing crontab Files (Task Map) Ways to Automatically Execute System Tasks Scheduling a Repetitive System Task (cron) Creating and Editing crontab Files How to Create or Edit a crontab File How to Verify That a crontab File Exists Using the at Command (Task Map) Scheduling a Single System Task (at) How to Deny Access to the at Command How to Verify That at Command Access Is Denied 9. Managing System Accounting (Tasks) 10. System Accounting (Reference) 11. Managing System Performance (Overview) 12. Managing System Processes (Tasks) 13. Monitoring System Performance (Tasks) 14. Troubleshooting Software Problems (Overview) 16. Managing Core Files (Tasks) 17. Managing System Crash Information (Tasks) 18. Troubleshooting Miscellaneous Software Problems (Tasks) 19. Troubleshooting File Access Problems (Tasks) 20. Resolving UFS File System Inconsistencies (Tasks) |
Controlling Access to the crontab CommandYou can control access to the crontab command by using two files in the /etc/cron.d directory: cron.deny and cron.allow. These files permit only specified users to perform crontab command tasks such as creating, editing, displaying, or removing their own crontab files. The cron.deny and cron.allow files consist of a list of user names, one user name per line. These access control files work together as follows:
Superuser privileges are required to edit or create the cron.deny and cron.allow files. The cron.deny file, which is created during SunOS software installation, contains the following user names: $ cat /etc/cron.d/cron.deny daemon bin smtp nuucp listen nobody noaccess None of the user names in the default cron.deny file can access the crontab command. You can edit this file to add other user names that will be denied access to the crontab command. No default cron.allow file is supplied. So, after Solaris software installation, all users (except users who are listed in the default cron.deny file) can access the crontab command. If you create a cron.allow file, only these users can access the crontab command. How to Deny crontab Command Access
How to Limit crontab Command Access to Specified Users
The following example shows a cron.deny file that prevents user names jones, temp, and visitor from accessing the crontab command. $ cat /etc/cron.d/cron.deny daemon bin smtp nuucp listen nobody noaccess jones temp visitor The following example shows a cron.allow file. The users root, jones, lp, and smith are the only users who can access the crontab command. $ cat /etc/cron.d/cron.allow root jones lp smith How to Verify Limited crontab Command AccessTo verify if a specific user can access the crontab command, use the crontab -l command while you are logged into the user account. $ crontab -l If the user can access the crontab command, and already has created a crontab file, the file is displayed. Otherwise, if the user can access the crontab command but no crontab file exists, a message similar to the following message is displayed: crontab: can't open your crontab file Either this user either is listed in the cron.allow file (if the file exists), or the user is not listed in the cron.deny file. If the user cannot access the crontab command, the following message is displayed whether or not a previous crontab file exists: crontab: you are not authorized to use cron. Sorry. This message means that either the user is not listed in the cron.allow file (if the file exists), or the user is listed in the cron.deny file. |
||
|