Hi, I'm new to the forums.
I'm setting up a Terminal Service server using Windows Server 2008.
I would like to use the Windows command "net user [username] [password]" to create user accounts on that machine.
This way I won't have to mess with Active Directory or an LDAP system.
The idea is to create a web form that will allow users to create their own user accounts on this machine.
I'm trying to use the PHP system() function to pass those commands into windows, but I am not able to get it to run these commands as an administrator.
My means of troubleshooting have involved passing "dir > c:\itworked.txt" through PHP, where the root of c:\ is only writable to by administrators. I've gone as far as installing the Privilege Elevation Powertoys and using the "elevate" command to bypass UAC.
<?php
echo "Hello World"; //make sure PHP is installed.
system('dir > c:\itworked.txt',$output);
echo $output;
?>
I've installed php as a cgi module in windows server 2008 using 'php-cgi.exe' and set that program to run as administrator.
I've also configured the php module to run with script and execution privileges.
Does anyone have any ideas?
Any help would be greatly appreciated.
Thanks,
David.