i have a php script which enables crontab schedules as www-data. I want to do this from apache but with command -u userx. My question what i have to do in order to give the possibility for www-data user to create crontab jobs for other users?
1. I created userx and i put it to sudoers file.
2. Also made the sudo chown for www-data to crontab folder. The idea is that i host php file which makes the changes in crontab in apache so the user that changes crontab jobs must be www-data. any ideas?