Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

execute NT net user /add from an asp page (code in the message)

Status
Not open for further replies.

JMax

Programmer
Nov 2, 2000
4
US
I need to execute a :
net user __myuser mysecretpass /add /DOMAIN
from an asp page
I tried with a dll I found on the web: executing exe and batch file seemed to work fine. IE: net view is running!
Executing a whoami in the scipt gives: NT AUTHORITY\SYSTEM

net view is running and net user not...How to explain...user rights??? but which user?

How to solve???
 
a solution (not very clean) is to put a exe file as a NT service (with the user admin rights) that launches a dynamically created batch file containing the net user command (and the other dynamic parameters)
A net start has just to be launched from the ASP.

I know it's a little bit tricky, but it works...
 
That is covered by ADSI you use it to add users to the system and stuff like that. While I am not sure about coding with it I do know that is what to use and check out. [sig]<p>Steve Hagerman<br><a href=mailto:Admin@Advancedisp.com>Admin@Advancedisp.com</a><br><a href= ISP high speed internet access</a><br>I did it my way![/sig]
 
When you are running this ASP page, are you running it as an Administrator?

Make sure that you have Anonymous access disabled in IIS for the directory that the script is in so that when you call the page it asks you for a username and password, and enter the administrator (or a user with permission to add users) username and password.

Regards,
Gerald

[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top