Linux – How to edit the crontab of another user on the linux server

cronlinux

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?

Best Answer

Try

crontab -e -u jake

You will need to be root for this to work.