asp.Netでは、c#でAD操作を行い、ユーザーを追加します.


主な問題:
   AD ,    ,    
 asp.net ,  c#  AD  ,    ,                 ,  Users,          ,   ,  

回答者:yxrj()()信用:105
2002-07-23 09:38:35Z
スコア:50
?
DirectoryEntry objDE;
//    
objDE=new DirectoryEntry("LDAP://yourserver/cn=users,dc=xxx,dc=com","Administrator","pwd",System.DirectoryServices.AuthenticationTypes.ServerBind);
foreach(DirectoryEntry ch in objDE.Children)
   Response.Write(ch.Path+"
"+ch.SchemaClassName+"

"); // DirectoryEntry objDE1=objDE.Children.Add("cn=newtest","user"); objDE1.Invoke("Put",new Object[2] {"givenName","newtest"}); objDE1.Invoke("Put",new Object[2] {"samAccountName","newtest"}); objDE1.Invoke("Put",new Object[2] {"userPrincipalName","newtest"}); objDE1.Invoke("Put",new Object[2] {"UserAccountControl","512"}); objDE1.CommitChanges(); objDE1.Invoke("ChangePassword",new Object[2] {"","pwd"}); objDE1.CommitChanges();

Top
回答者:yxrj()()信用:105
2002-07-23 10:15:29Z
スコア:50
?
           user, DirectorySearcher 

DirectoryEntry objDE=new DirectoryEntry("LDAP://yourserver","Administrator","pwd",System.DirectoryServices.AuthenticationTypes.ServerBind);
System.DirectoryServices.DirectorySearcher mySearcher = new System.DirectoryServices.DirectorySearcher(objDE);
mySearcher.Filter = ("(objectClass=user)");
foreach(System.DirectoryServices.SearchResult resEnt in mySearcher.FindAll())
    {
        Response.Write( resEnt.Path+"");
    }

Top
回答者:yxrj()()信用:105
2002-07-23 10:22:49Z
スコア:0
?
           user, DirectorySearcher 

DirectoryEntry objDE=new DirectoryEntry("LDAP://yourserver","Administrator","pwd",System.DirectoryServices.AuthenticationTypes.ServerBind);
System.DirectoryServices.DirectorySearcher mySearcher = new System.DirectoryServices.DirectorySearcher(objDE);
mySearcher.Filter = ("(objectClass=user)");
foreach(System.DirectoryServices.SearchResult resEnt in mySearcher.FindAll())
{
        Response.Write( resEnt.Path+"");
}

Top
回答者:Richard 2001(Richard)()信用:98
2002-07-23 10:30:27Z
スコア:0
?

Top
返信者:cuiaimin(Shadow)()信用:99
2002-07-23 10:54:37Z
スコア:0
?
  yxrj

Top
返信者:ameng_2002(flyfox)()信用:105
2002-07-23 11:09:33Z
スコア:0
?
gz

Top
回答者:ketao_78(木は静かにしたいが風は止まらない)()信用:101
2002-07-23 14:20:45Z
スコア:0
?