Welcome to WebmasterWorld Guest from 22.214.171.124
Forum Moderators: bakedjake
From root I tried to use "crontab -l username" and "crontab -e username" but it says "crontab: usage error: no arguments permitted after this option" and gives the usages for it.
I tried as the user to pico cron.txt, insert the command and save it and "crontab cron.txt" but says crontab: command not found. Am I supposed to create cron.allow and add users who can use crontab?
Or am I doing it all wrong?
Here is how it works:
Two config files, /etc/cron.deny and /etc/cron.allow (on SuSE systems these files are /var/spool/cron/deny and .../allow), specify who can use crontab.
If the allow file exists, then it contains a list of all users that may submit crontabs, one per line. No unlisted user can invoke the crontab command.
If the allow file does not exist, then the deny file is checked.
If neither the allow file nor the deny file exists, only root can submit crontabs.
This seems to be your case, so you should create one of these files ... on my system I have a deny file just containing user "guest", so all others are allowed.
One caveat: this access control is implemented by crontab, not by cron. If a user manages to put a crontab file into the appropriate directory by other means, cron will blindly execute ...
[from the book "Linux Administration Handbook" by Nemeth/Snyder/Hein and validated locally here]
HTH and HAND,
Further inspection of the instructions from the script I'm using doesn't say I have to be logged in as a user, I'm just guessing that what I'm supposed to do. It says from ssh type in "crontab -l > cron.txt" then export the text file and edit it in a text editor, add the command line in it and then import it back in using "crontab cron.txt"
Maybe I'm supposed to be doing this from root anyway. If so that would be much easier.