- 论坛徽章:
- 0
|
原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 :http://bbs.xmws.cn/thread-1185-1-1.html
RHCE_RHEL6_实战精品 8.配置cron任务权限控制
企业需求:
配置cron不允许tami用户使用。
实施步骤:
1.创建tami用户,并编辑/etc/cron.deny文件,把用户tami列入其中。
[root@dtop30 ~]# useradd tami
[root@dtop30 ~]# vim /etc/cron.deny
tami
2.保证crond服务开机启动。重启crond服务。
[root@dtop30 ~]# chkconfig crond on
[root@dtop30 ~]# service crond restart
3.验证:
[root@dtop30 ~]# crontab –e root用户正常可用
[root@dtop30 ~]# su - tami 切换到tami
[tami@dtop30 ~]$ crontab –e
[tami@dtop30 ~]$ exit
[root@dtop30 ~]# |
|