woensdag 27 maart 2013

Linux : Let user's see each others cron jobs

The possibility to look in an other users crontab is only priveleged to the root user. As the root user this can be done with the command crontab -l -u <username>. When multiple users working on the same system it could be desirable to see what cron jobs other users added to the system....

To realize this you need to allow users ,or a group, 'root' access to the crontab command. This can be done with the visudo command. (or manually by editting /etc/sudoers)

I created a group called crontab_all and added users to this group. This group will be delegated root access to the crontab command.

visudo will opens the file where the permissions can be delegated.
A text file will open, add the following line somewhere in this file:

%crontab_all lxtest01=NOPASSWD:/usr/bin/crontab

The % sign indicates it is a group, usage without is for users, lxtest01 is the hostname and the rest is self explaining.

Geen opmerkingen:

Een reactie posten