Results 1 to 3 of 3

Thread: How to view or edit another user's crontab entries?

  1. #1
    Administrator Kavoir's Avatar
    Join Date
    Dec 2009
    Posts
    183

    How to view or edit another user's crontab entries?

    This occurred to me when I was trying to execute some php script responsible for something that it doesn't have enough privilege with, because I'm the one executing it via the crontab. To get the job done, the script has to be executed by another user. So I'll delete my crontab entry first and then create an identical entry in the crontab of another user:

    Code:
    sudo crontab -e -u anotheruser
    Wherein anotheruser is the username of another user. Just copy and paste the entry. Done. Now the scheduled execution would have the privileges it needs to get the job done because it's now executed under the name of anotheruser.

  2. #2
    Administrator Kavoir's Avatar
    Join Date
    Dec 2009
    Posts
    183
    Okay, to list the crontab jobs of another user:

    Code:
    sudo crontab -l -u anotheruser
    And enter your password.

  3. #3
    Administrator Kavoir's Avatar
    Join Date
    Dec 2009
    Posts
    183
    To create or edit one's own crontab entries, read this thread.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •