Re: Unix users
| From: | Andreas Pour | Date: | Tue, 25 Jul 2000 19:59:17 +0000 |
| Subject: | Re: Unix users | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-8124@lists.php.net to get a copy of this message | ||
"Robert J. Cissell" wrote:
>
> Is there a way using PHP that I can create unix user accounts on my system??? If so, where do
> I look for info on it? Thanks
Of course: use sudo to give your apache process rights to run useradd
(or a setuid useradd executable only by your apache process). But this
is not very secure.
A better way might be to have your php script create a file of requested
accounts and have a cron script batch process them, so your script
(which cannot be accessed by the web server) can do some careful
scrutinizing of the account requests before granting one.
Ciao,
Andreas