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?

link|improve this question
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
feedback

2 Answers

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

link|improve this answer
3  
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
feedback

you need sudo/root to edit any of crontab

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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