私は知っています、私たちはこのようなDirectoryEntryを得ることができます:
string conPath = "LDAP://10.0.0.6/DC=wds,DC=gaga,DC=com";
string conUser = "administrator";
string conPwd = "Iampassword";
DirectoryEntry de = new DirectoryEntry(conPath, conUser, conPwd, AuthenticationTypes.Secure);
次のようにユーザーのパスワードを変更できます。
DirectorySearcher deSearch = new DirectorySearcher();
deSearch.SearchRoot = de;
deSearch.Filter = String.Format("sAMAccountName={0}", "xumai");
SearchResultCollection results = deSearch.FindAll();
foreach (SearchResult objResult in results)
{
DirectoryEntry obj = objResult.GetDirectoryEntry();
obj.Invoke("setPassword", new object[] { "Welcome99" });
obj.CommitChanges();
}
使用する場合
string x = obj.Guid.ToString();;
ユーザーのobjectGUID「0b118130-2a6f-48d0-9b66-c12a0c71d892」を取得できます
このobjectGUIDをパスワードベースに変更するにはどうすればよいですか?
このobjectGUIDフォーム「LDAP://10.0.0.6/DC=wds,DC=gaga,DC=com」のユーザーベースを検索する方法は?
それをフィルタリングする方法はありますか?etc strFilter = "(&(objectGUID = 0b118130-2a6f-48d0-9b66-c12a0c71d892))";
あなたの助けを願っています
ありがとう。