Operating System - Linux
1826073 Members
3636 Online
109690 Solutions
New Discussion

allow sudo for www user to run root shell script

 
SOLVED
Go to solution
Steven E. Protter
Exalted Contributor

Re: allow sudo for www user to run root shell script

As a side note, I've found it much easier to use the web to initiate jobs in a safe way.

I have a data file that can have lines in it indicating scripts to run, even parameters. Certain priviledged users get to log in and click some buttons, perhaps even fill in some fields.

They press submit and the job file is updated. These very special users can also look at what they have ready to run.

A cron job that runs once a minute checks this very same data file. If it finds relavent data, it fires up the cron job and changes the status on the job to running.

When ps -ef indicates the job is no longer running the job file is once again modified by another subroutine of the cron job.

My metholodolgy is duplicated in some commercial products with a better interface and fancier figures. It does however accomplish the task that you have apparently already completed in a way that is a bit more secure and manageble.

Just a bit of post job done kibbutzing prior to leaving the country.

Regards,

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Stuart Browne
Honored Contributor

Re: allow sudo for www user to run root shell script

I used to do this for access from a billing system to root-required processes.

There's a certain nicety however for being able to press a button and have it done *now*..

But as there are security holes both ways *shrug* it makes very little difference which is implemented.
One long-haired git at your service...