|
-
Apr 30th, 2005, 09:34 AM
#1
Thread Starter
Hyperactive Member
create a windows user account
hi, i am making an online registration scheme for my website for some webspace. i have got every thing sorted out exsept for one thing. to acces the ftp service and upload files to there user space i need to create a user account on the server for that user. is there a way to create a user account on a windows operating system with php 5 installed.
thanks, dandono
If there is only one perfect person in the universe, does that make them imperfect?
-
May 1st, 2005, 11:38 AM
#2
<?="Moderator"?>
Re: create a windows user account
In windows you can create a user account using
Code:
NET USER [username] [password] /ADD
you have to be logged into an account that has the access to create other users first, ie admin, as far as i know.
just use the exec function to call the function
http://uk.php.net/manual/en/function.exec.php
-
May 1st, 2005, 03:51 PM
#3
Thread Starter
Hyperactive Member
Re: create a windows user account
it returned this:
Warning: exec() [function.exec]: Unable to fork [NET USER [test123] [test123] /ADD] in D:\Inetpub\XPROOT\reg\reg1.php on line 54
i dont use the NET USER command at all but does it need the [] brackets to contain the user or do i remove them?
My code is below:
PHP Code:
exec ('NET USER ' . $uid . $pw . ' /ADD /fullname:"' . $fn . '" /DOMAIN');
Last edited by dandono; May 1st, 2005 at 04:22 PM.
If there is only one perfect person in the universe, does that make them imperfect?
-
May 3rd, 2005, 01:06 AM
#4
Re: create a windows user account
no brackets required. you could try it out from a command prompt to get it working, then to delete it, you could use
VB Code:
NET USER username /DELETE
-
May 3rd, 2005, 04:29 AM
#5
Thread Starter
Hyperactive Member
Re: create a windows user account
ok i changed my code to this:
PHP Code:
exec 'NET USER ' . $uid . $pw . ' /ADD /fullname:"' . $fn . '" /DOMAIN';
and it returns:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in D:\Inetpub\XPROOT\reg\reg1.php on line 62
If there is only one perfect person in the universe, does that make them imperfect?
-
May 14th, 2005, 07:11 AM
#6
Thread Starter
Hyperactive Member
Re: create a windows user account
can somebody please write me a peice of code because i realy do not get what is wrong with my code but it still returns an error.
thanks, dandono
If there is only one perfect person in the universe, does that make them imperfect?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|