Small AIX system error -- crontab fault

Source: Internet
Author: User

Small AIX system error -- crontab fault

System Environment:

Operating System: AIx 5.3.8

ORACLE: Oracle 10gr2


Fault symptom:

Oracle users cannot enable the crontab tool (other common users are also allowed by the root user)

[[Email protected]:/var/adm/cron] $ crontab-l

Crontab: You are not authorized to use cron. Sorry.


Fault Cause:

1. Most files in the/var/spool directory of the host are deleted.

2. the cron directory under/var/adm is also deleted.


Solution:

Copy/var/spool files and/var/adm/Cron files from other hosts to the local directory


After the copy is complete, modify the corresponding file owner:

[[Email protected]:/var/adm/cron] # cd/var/spool/cron/

[[Email protected]:/var/spool/cron] # ls-l

Total 16

Drwxrwx --- 2 bin cron 512 Feb 20 15:38 atjobs

Drwxrwx --- 2 bin cron 512 Jul 17 crontabs

[[Email protected]:/var/spool/cron] # cd crontabs/

[[Email protected]:/var/spool/cron/crontabs] # ls-l

Total 32

-RW-r -- 1 ADM cron 2020 Feb 20 15:38 Adm

-RW-r -- 1 bin cron 0 Jul 17 0:05 Oracle

-RW ------- 1 root cron 2362 Jul 15 04: 37 Root

-RW-r -- 1 root cron 853 Feb 20 15:38 sys

-RW-r -- 1 root cron 1122 Feb 20 :41 uucp


[[Email protected]:/var/spool/cron/crontabs] # ls-L/var/adm

Total 4976

Drwxr-XR-x 2 root system 512 Jul 16 Cron

Drwxr-Sr-x 2 sys 512 Jul 16 0:09 CSD

-RW ------- 1 root system 550 Jul 17 sulog

-RW-r -- 1 root system 2531736 Jul 17 wtmp

[[Email protected]:/var/spool/cron/crontabs] # cd/var

[[Email protected]:/var] # ls-LD Adm

Drwxrwxr-x 4 root system 512 Jul 16 Adm

[[Email protected]:/var] # chown bin: cron/var/adm/cron

 

Create the cron. deny file:

[[Email protected]:/var] # cd Adm

[[Email protected]:/var/adm] # ls

Cron CSD sulog wtmp

[[Email protected]:/var/adm] # cd Cron

[[Email protected]:/var/adm/cron] # ls-l

Total 72

Prw ------- 1 root cron 0 Jul 16 23:33 FIFO

-RW-r -- 1 root cron 33700 Jul 17 0:03 log


[[Email protected]:/var/spool/cron/crontabs] # Cat/var/adm/cron. deny

Cat: cannot open/var/adm/cron. deny

[[Email protected]:/var/adm/cron] # Touch cron. deny

[[Email protected]:/var/adm/cron] # chown bin: cron. deny

-- The content of cron. deny is empty!

[[Email protected]:/var/adm/cron] # Cat/etc/cron. allow

Oracle

Root

Note:

1. Configure cron. deny to deny access to crontab.

2. the cron. allow configuration allows users to access crontab.


Verification:

[[Email protected]:/var/adm/cron] $ crontab-l

[[Email protected]:/var/adm/cron] $ crontab-e

@ Now, solve the problem






















This article is from the blog of "Tian Ke's blog", please be sure to keep this source http://tiany.blog.51cto.com/513694/1439418

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.