___
(___)
mysql | | --> your daemon --> useradd
| | (as root)
---
^
|
CGI scripts
run by Apache
(as nobody, apache or httpd)
The reason you want it to be so convoluted is because of user permissions. The CGI scripts must run as the least privileged user (cause you cant trust the internet) and you must run the useradd stuff as root. (ofcourse you need to authenticate users on the CGI script so randoms can't just add their own user)
Another solution might be to use some sort of directory and PAM authentication. You can add users to an LDAP directory as any user that has permissions on the directory ... (but that has many overheads)
@_=qw; ask f00li5h to appear and remain for a moment of pretend better than a lifetime;;s;;@_[map hex,split'',B204316D8C2A4516DE];;y/05/os/&print;
|