server, it was easy to create a script that could pick up that file, extract out the useful lines, and generate the web page from it.
I have since used this technique in many situations in which I didn't want to have to write a user interface and the user already had MS Excel.
Letting Others Do Privileged Operations
Often we are asked to create a way for normal users to do things typically permitted only by an administrative account such as
In Unix/Linux, there is a program called
For example, you can configure it to permit a particular person to run a command as
Warning
Any kind of system that lets 'normal' people do 'privileged' operations is a risky system to build. Computer security history is fraught with well-meaning programmers accidentally creating security holes that let people run any command as
If you aren't sure what you are doing, research security books and FAQs for advice.
For example, if it requires
I like to build three layers when I automate something for other people:
Layer 1. A program that does the basic task.
Layer 2. A program that the user will run, with
Layer 3. A more user-friendly way to access these previous layers, such as a web interface or menu program.
For example, at one company, we had a process for pushing a new version of the company web site to the world. It involved three different web servers (actually they were virtual servers on two different machines, but those details aren't important).
www-draft.example.com
The next release of our web site was developed here.www-qa.example.com
The draft site would be copied here for QA to check over. Once the copy was made, the files were immediately made read-only. If QA approved this site, we needed to be able to verify that these exact bits were copied to the live site.www.example.com
This was the live site that external people would see.
The web designers would ask the system administrators to copy their draft to www-qa.example.com. When the QA group approved the site, they would tell the system administrators to make the site go live.
Each of these two functions was automated:
Copied the draft site to the QA site.