1833772 Members
2284 Online
110063 Solutions
New Discussion

File permission

 
Indrajit Bhagat
Regular Advisor

File permission

In the Unix server cdchle9, cdchle8 and pdchle5 the user rights for the SAP administration users need to be increased. The following user need the right to use the Unix cron command to plan some jobs that should run periodically:

user cdeadm on server cdchle9,
user cdqadm on server cdchle8 and
user cdpadm on server pdchle5

Currently the mentioned users are not allowed to change the users crontab. The following message appears when trying to run the command 'crontab':

'crontab: you are not authorized to use cron. Sorry.'

Can you help me to resolve this problem.
6 REPLIES 6
Pete Randall
Outstanding Contributor

Re: File permission

Check the cron.allow and cron.deny files in /usr/lib/cron and have a look at the man page for crontab:

"You can execute crontab if your name appears in the file usr/lib/cron/cron.allow. If that file does not exist, you can use crontab if your name does not appear in the file /usr/lib/cron/cron.deny. If only cron.deny exists and is empty, all users can use crontab. If neither file exists, only the root user can use crontab. The allow/deny files consist of one user name per line."


Pete

Pete
Dennis Handly
Acclaimed Contributor

Re: File permission

This is explained in crontab(1).

If you only want those users, then add them on the appropriate machines, to:
/usr/lib/cron/cron.allow
AwadheshPandey
Honored Contributor

Re: File permission

http://www.ussg.iu.edu/usail/automation/cron.html
It's kind of fun to do the impossible
prasanth.vattoly
New Member

Re: File permission


login as root and put entry of users in /var/adm/cron.allow file ...
prasanth vattoly
Tor-Arne Nostdal
Trusted Contributor

Re: File permission

Hi Indrajit
You have got the explanation for how the unix administrator(root) have to open for other users to create cron jobs (ref. cron.allow).

In our organisation we prefere to let the root user schedule all cron jobs.
If they are to be runned with another userid they are scheculed by root like this.
Example:
00 01 * * * su - cdeadm -c /home/cdeadm/SAPjob
00 07 * * * su - oracde -c /oracle/CDE/scripts/NightJobs
---------
You could also schedule the jobs you need within SAP, as a background job (SM36) instead of using crontab.
As such you can see the job and joblog in transaction SM37.

Put the script you want to run as a step of type "External program".
Then you specify "Target host" cdchle9
aso.

This require RFC authorisations for the user who owns the job, and you might also want to take a look at the documentation for the file rfcexec.sec (search OSS)

/Tor-Arne
I'm trying to become President of the state I'm in...
Sp4admin
Trusted Contributor

Re: File permission

You can created user oracle in /var/spool/cron/crontabs and make a entry in the /var/adm/cron.allow.
This would allow the orcale user to run cron jobs.

sp,