It won't help you with your perl, but there are many other controll panels which do all of that and more.
If you're just wanting to do it as an exercise, I'd say admin on a unix-like is not a good starting project.
To do it, you'd need a daemon running as root (so you have the permissions) that is given commands through some sort of queue mechanism (like a table in a database or some funky inter process communication to get the messages across. Running CGI scripts as root is likely to end badly even if you do all the things listed in perlsec (like using -T)
Proc::Daemon will give you your daemon, you can just connect to the database, and then check (say every minute) for rows in the stuff_to_do table...
'tis a big task...
Also there was an example of your useradd in either Perl for System Administration or Automating UNIX and Linux Administration. I'm not sure which.
In reply to Re^3: cgi script error
by f00li5h
in thread cgi script error
by adam_blackice
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |