adduser & php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am using php 5 on OpenBSD 4.7

I have a script which takes a username and password from $_POST, and is
supposed to add the user to the system database. The problem is, adduser
creates a username with the same name as the group. The code is:

                $username=$_POST['username'];
                $password=$_POST['password'];
                $output=exec('/usr/bin/sudo adduser -unencrypted -batch
$username hosting "$firstname $lastname" $password');
                echo "result: " . $result . " output: " .  $output;


The output is:
                 Added user ``hosting''

I have validated that $username and $password contain the correct values
from the form, by outputting them as well above the line which calls the
adduser command.

Any help is appreciated.

Matt

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux