Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I wish to be able to edit, or at least view, a crontab that is on a server.

Should I not be able to run this to do so:

sudo crontab -u root

When I do, I get this error:

Sorry, user crmpicco is not allowed to execute '/usr/bin/crontab -u root' as root on crmpiccoStaging.

I am running CentOS 5.6 (Final).

share|improve this question

1 Answer 1

up vote 2 down vote accepted

If you are using sudo, the user that executes crontab is automatically root, so in theory, adding "root" for crontab is not neccessary. Try either "sudo crontab -e" for editing or "sudo su", followed by "crontab -e" and see if it helps.

Edit: It's possible that you lack the rights to sudo on your server, are you sure it's set up correctly? (your user being in the sudoers file)

share|improve this answer
    
I can't actually view the sudoers file [crmpicco@crmpiccoStaging watp]$ cat /etc/sudoers that gives me cat: /etc/sudoers: Permission denied –  crmpicco May 15 '12 at 14:42
1  
Sudoers can only be viewed by Superusers. That means you have to log in as root and configure it, if that did not happen yet. So if sudo visudo tells you you don't have the permissions, you are not in the sudoers file yet. If it works, and you can theoretically edit the file you should have sufficient permissions. –  Andreas May 15 '12 at 14:45
    
OK, so I need "root" to add me to the list of sudoers before I can re-try this? –  crmpicco May 15 '12 at 14:49
    
Yep. That's exactly what you need to do. –  TheCompWiz May 15 '12 at 15:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.