Not allowed to use crontab

root@gps:/home/gpslibrary# crontab -e

type above command and the below coomad show how it solve please suggest

Edit this file to introduce tasks to be run by cron.

Each task to run has to be defined through a single line

indicating with different fields when the task will be run

and what command to run for the task

To define the time you can provide concrete values for

minute (m), hour (h), day of month (dom), month (mon),

and day of week (dow) or use ‘*’ in these fields (for ‘any’).#

Notice that tasks will be started based on the cron’s system

daemon’s notion of time and timezones.

Output of the crontab jobs (including errors) is sent through

email to the user the crontab file belongs to (unless redirected).

For example, you can run a backup of all your user accounts

at 5 a.m every week with:

0 5 * * 1 tar -zcf /var/backups/home.tgz /home/

For more information see the manual pages of crontab(5) and cron(8)

m h dom mon dow command

“/tmp/crontab.wL4vXN/crontab” 22L, 888C

what i will do solve

which version of ubuntu are you using and is it on your personal computer?

Maybe add your username to /etc/cron.allow ?

I’ve never actually seen this happen before - other than specific deny entries in /etc/cron.deny… But this is UNIX behaviour, not sure if it applies to Linux…

“man crontab” says the following :

   If the /etc/cron.allow file exists, then you must be listed  (one  user
   per  line)  therein in order to be allowed to use this command.  If the
   /etc/cron.allow file does not exist but the  /etc/cron.deny  file  does
   exist,  then you must not be listed in the /etc/cron.deny file in order
   to use this command.

Maybe “sudo echo gpslibrary >> /etc/cron.allow”?

Extending the hints given by @daniel.m.tripp , I would start with issuing these commands:

ls -al /etc/cron.allow >/dev/null 2>&1 && echo "cron.allow exists." || echo "cron.allow does not exist."
ls -al /etc/cron.deny  >/dev/null 2>&1 && echo "cron.deny exists."  || echo "cron.deny does not exist."

Depending on the results you will see if there are these files in the first place. If both are not there, you might have a different problem that you need to find the cause of.

(Issue them as the root user, because I’m not sure of the file permissions for these.)