Results 1 to 11 of 11
  1. #1
    I'm using the below script to create a new NT user account, only it gives this error with line 13 (the line where i login) I'm logging on as administrator, why does this script work? Can somebody shed some light on this?

    UserManager.Server (0x80040522)
    A required privilege is not held by the client.
    /eat4.asp, line 13

    <CENTER><H1>Add a New user account.</H1></CENTER>
    UserName : <INPUT NAME=UserName> UserPassword : <INPUT Name=UserPassword><INPUT TYPE=SUBMIT>
    UN = Request("UserName")
    If UN <> "" Then
    'Create Server object For Logon
    Set xServer = Server.CreateObject("UserManager.Server")

    'www service is usually running under account without Account operator rights.
    'Server object is used to logon to the account with the right.
    xServer.LogonUser "Administrator", "*******"

    'The Next statements are executed under Administrator account.
    'Add a new user
    Set User = xServer.Users.Add( UN, Request("UserPassword"))

    'Some comment For the user
    User.Comment = "User from ASP page, " & Now()

    Response.Write "User <B>" & UN & "</B> Added.<BR>"

    Response.Write "List of users :<BR>"

    'List all of server users.
    For Each User In xServer.Users
    Response.Write "<B>" & User.Name & "</B>, " & User.Comment & "<BR>"

    'LogOff the Administrator
    End If
    my voice is my passport, verify me.

  2. #2

    What kind of object are you trying to create?? the 'usermanager' a separate/third party component.

    why not just use ADSI to create your NT account??

  3. #3


    Can you show me a ASP code snippet that will use ADI to create it?

    Could you please give me an ASP code snippet that creates a new web?

    my voice is my passport, verify me.

  4. #4

    Create NT account code snippet..

    at its most basic form..

    replace machine name with local server name and make sure you have the necessary rights to run the script

    good luck!

    - -- -

    Set oDomain = GetObject("WinNT://WinntMachine")
    Set oUser = oDomain.Create ("user", "NewUSerName")
    oUser.SetPassword "password"


  5. #5

    mattan, help

    Since you know how to do this, can u post an asp code snippet that would create a new www with iis? I tried using the aspexec and calling the mkw3site.vbs but it doesn't work right.

    my voice is my passport, verify me.

  6. #6

    at its most simplest form...

    the basic code..u still need to work on this (i.e error checking, etc). Try looking up the ADSI section at for more help and code snippets.

    Also the originial *.vbs files can be easily modifed to work with ASP.

    *ps: if you're interested in taking this further i.e. developing a custom NT panel professionally kindly contact me offline

    - - - -

    NextInst = server next instance number (you can also script a procedure to automatically get the next server instance number)
    Ipadd = ip address
    portnum = 80
    hostheader = if any host header it goes in here
    sTruepath = foldpaer path .. ie. c:\inetpub\xxx

    Response.Write "Creating the New Site.."
    Set IIsNewObj = WebServerObj.Create ("IIsWebServer", NextInst)
    IIsNewObj.ServerComment = "ServerComment"

    IIsNewObj.ServerBindings = IpAdd&":"&PortNum&":"&HostHeader

    Response.Write "Creating Site Root..."
    set IIsNewRootObj = IIsNewObj.Create("IIsWebVirtualDir", "Root")
    IIsNewRootObj.Path = sTruePath

  7. #7


    Since you seem to know so much about NT, it would be great to develop a control panel and market it. I'm a GUI designer, and ASP program and damn good at GUI so not only would it work well but we could package it in a very marketable solution.

    Anyway maybe you know the anwser to this. Is there a file that stores all the ip address bound to the NIC card? I hate the little networking window where you add the ips, i have a text file and would like to bind all the ips in the text file to the card, without going back and manually typing them all.

    my voice is my passport, verify me.

  8. #8

    ..only learning as I go along..

    ..I havent tried binding the IP to the NIc yet..ASDI probably wouldnt be a good candidate for stuff like that.

    you could off course use a *.vbs sript which called the wscript command to do something similiar.

    also..try looking up WMI

  9. #9
    Join Date
    Jun 2000
    I have also started building a Control panel but I am having many problems...
    NO people are coming up to help me and I can't affort programmers...
    I can also market.. I know dedicated hosting companies looking to buy it...
    Any people looking up to team up with me and build one - I will surely like to work with you all...

    Rajiv mehta

  10. #10


    Count me in.

    Fire of an email to:
    [email protected]
    my voice is my passport, verify me.

  11. #11

    There is definitely market for such products.. this point of time.

    I also know of local dedicated companies who are very interested in such products... and will be demoing it to them soon.

    The only reason I can't put mine up for public demo yet is because mine is built on a 90% ASP based solution (with 1-2 odd dlls), therefore protecting the source will be an issue. I know of one method which is to use the VBscript Encoder which works to some extent, but the better alternative would be to encapsulate the those into COM objects (dlls)

    ..... like someone mentioned will be awhile till we see any GPL products :-)

    but feel free to post any odds questions which you might have regarding the coding... If I know the answer I'll help out

    happy coding !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts