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

Reply via email to