Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a user on my linux server who has sudo. I want to edit the crontab of another user. I'm new to this though and don't understand what the man pages are telling me yet.

Man crontab tells me I can use this format for the crontab command:

crontab [ -u user ] { -l | -r [ -i ] | -e }

But what does that mean? I want to edit the crontab of a user named jake

so I tried

crontab jake -e
crontab [jake] -e
crontab [-u jake] -e

And I get the same error every time: "usage error: no arguments permitted after this option"

So what do I type in to edit jake's crontab?

share|improve this question
1  
The [ -u user ] means that you can optionally say -u user. I would've expected to see user either in italics (when typeset) or as <user> to indicate that it's not the literal string "user" you need to give, –  Vatine Sep 29 '10 at 9:35

2 Answers 2

Try "crontab -e -u jake" ; you will need to be root for this to work.

share|improve this answer
5  
sudo crontab -e -u jake would work without being root, and gets logged. Could also su jake and then do crontab -e but sudo much better. –  dunxd Sep 29 '10 at 10:23

you need sudo/root to edit any of crontab

share|improve this answer

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.