הוספת user חדש

shadi7

New member
הוספת user חדש

הי, אני מנסה להוסיף user חדש ל-Active Directory, הבעיה היא שלמרות ש-user חדש נוצר הוא מופיע כחשבון disabled. אני מנסה להפוך את החשבון ל-enabled אך ללא הצלחה... תודה רבה
string LDAPDomain ="LDAP://../CN=Users,DC=..,DC=..,DC=.." ; DirectoryEntry oDE= new DirectoryEntry(LDAPDomain,User,Password,Authentica tionTypes.ServerBind); DirectoryEntry oDEC=oDE.Children.Add("CN=John","User"); oDEC.Properties["sAMAccountName"].Add("John"); oDEC.Properties["sn"].Add("Student"); oDEC.Properties["displayName"].Add("John"); oDEC.CommitChanges(); oDEC.Properties["userAccountControl"].Value=0x0200; oDEC.CommitChanges();​
 
למעלה