Oracle Linux 5.10
rootユーザーはcrontrabにアクセスできますが、他のユーザーはアクセスできません。いいえ/etc/cron.allow
、/etc/cron.deny
空のファイルです。
Oracleユーザー・アカウントの使用:
[oracle@dub-ImrORA2 ~]$ crontab -e
Authentication failure
You (oracle) are not allowed to access to (crontab) because of pam configuration.
/etc/pam.d/crond listing:
auth sufficient pam_env.so
auth required pam_rootok.so
auth include system-auth
account required pam_access.so
account include system-auth
session required pam_loginuid.so
session include system-auth
crond
走る
[root@dub-ImrORA2 pam.d]# ps -aef | grep cron
root 3559 1 0 Jan29 ? 00:00:05 crond
root 25518 25279 0 13:19 pts/2 00:00:00 grep cron
特権crontab
[root@dub-ImrORA2 ]# ls -al /usr/bin/crontab
-rwxr-xr-x 1 root root 315640 Dec 20 2011 /usr/bin/crontab
特権/var/spool/cron/oracle
[root@dub-ImrORA2 ]# ls -al /var/spool/cron/oracle
-rw------- 1 root root 125 Feb 24 11:43 /var/spool/cron/oracle
ベストアンサー1
トラブルシューティング:
/usr/bin/crontabの権限の変更
[root@dub-ImrORA2 log]# ls -al /usr/bin/crontab
-rwxr-xr-x 1 root root 315640 Dec 20 2011 /usr/bin/crontab
[root@dub-ImrORA2 log]# chmod 4775 /usr/bin/crontab
[root@dub-ImrORA2 log]# ls -al /usr/bin/crontab
-rwsrwxr-x 1 root root 315640 Dec 20 2011 /usr/bin/crontab
/var/spool/cron/oracleで所有者を変更する
[root@dub-ImrORA2 spool]# cd /var/spool/cron
[root@dub-ImrORA2 cron]# ls -al
total 24
drwx------ 2 root root 4096 Feb 24 11:43 .
drwxr-xr-x 13 root root 4096 Feb 13 2014 ..
-rw------- 1 root root 125 Feb 24 11:43 oracle
[root@dub-ImrORA2 cron]# chown oracle:root oracle
[root@dub-ImrORA2 cron]# ls -al
total 24
drwx------ 2 root root 4096 Feb 24 11:43 .
drwxr-xr-x 13 root root 4096 Feb 13 2014 ..
-rw------- 1 oracle root 125 Feb 24 11:43 oracle
証明する
[root@dub-ImrORA2 cron]# su - oracle
[oracle@dub-ImrORA2 ~]$ crontab -l
55 23 * * 0-4 /home/oracle/scripts/tblspc_usage_rpt.sh >> /home/oracle/scripts/tblspc_usage.log 2>&1