问题就在于应该在什么地方,赋给什么用户,什么权限。我的开发环境是windows 2000 server 和 VS.Net 2003

解决方案 »

  1.   

    Set ou = GetObject("LDAP://OU=Marketing,OU=DSys,DC=adsidev,DC=nttest,DC=microsoft,DC=com")
    Set usr = ou.Create("user", "CN=James Smith")'---- Mandatory attributes----
    usr.Put "samAccountName", "jsmith"'---- Optional attributes, you may skip this----
    usr.Put "sn", "Smith"
    usr.Put "givenName", "James"
    usr.Put "userPrincipalName", "[email protected]"
    usr.Put "telephoneNumber", "(555) 555 0111"
    usr.Put "title", "Marketing Administrator Dept"
    usr.SetInfo'--Now that the user is created, reset the user's password and
    '--enable its account.usr.SetPassword "secret***!"
    usr.AccountDisabled = False
    usr.SetInfo