[wplug] add users via scripts

Devin Lee Drew dld at pobox.com
Thu Sep 18 09:50:53 EDT 2003


On Thu, 2003-09-18 at 01:57, Bob Schmertz wrote:
> Chris incurred the wrath of Bob on Sep 17, by saying
> 
> >I know that is going to sound bad, but I can't think of any better
> >solutions.  I want to be able to add users to the system via a php page.
> >The problem that I am running into is how do I call/usr/sbin/useradd without
> >added the user "apache" to the root group.  Is it possible without leaving
> >the system wide open?
> 
> One possibility would be to run another instance of Apache (or another 
> Web browser?) on a different port, running that one as root.  I'm not 
> too knowledgeable about security, so I don't really know how that would 
> necessarily be more secure than running your main Apache as root, but at 
> least you could run it with a different conf file that only loads the 
> bare minimum modules, for example.

Another possibility is to have a cron script for root which reads from
an apache/php writable file the parameters you want for adding the user.
Risk: holes in your php apps could allow someone to create a user for
themselves. 

Maybe also consider something like webmin rather than reinventing the
wheel with php? 

Devin





More information about the wplug mailing list