cartman
cartman

Reputation: 190

Does a script run on crontab have admin privileges?

If I run my Python script on a crontab task, does it get admin access? If not, how can I get it run with a specific user privileges? In that case, what is the most secure way to give user and pwd information?

Upvotes: 0

Views: 2664

Answers (1)

jwillis0720
jwillis0720

Reputation: 4477

It is specific to whoever called crontab -e. Whichever user at the time.

So

sudo crontab -e

runs everything since it is owned by the sudoers group.

But if you don't use sudo, then crontab will be installed for whatever user called it and thus only have the permissions that user has.

Upvotes: 1

Related Questions