ADAM でユーザー パスワードをリセットしようとしています。そのために、私は Accountmanagement 名前空間を使用しています
私が試したこと:
PrincipalContext rootPrincipalContext;
LdapConnection objLdapconnection;
rootPrincipalContext = new PrincipalContext(ContextType.ApplicationDirectory, host, baseDN, ContextOptions.Negotiate, username, password);
LdapDirectoryIdentifier identifier = new LdapDirectoryIdentifier(host, Convert.ToInt32(port));
NetworkCredential credential = new NetworkCredential(username, password);
LdapConnection ldapCon = new LdapConnection(identifier, credential);
ldapCon.AuthType = AuthType.Negotiate;
objLdapconnection = ldapCon;
パスワードのリセット:
UserPrincipal existingUsr = UserPrincipal.FindByIdentity(rootPrincipalContext, IdentityType.DistinguishedName, "cn=" + inputName + ",ou=gslab,dc=starfish");
existingUsr.SetPassword(userPassvalue); this lines throws exception "directory property can not be found"
どの文字列も空でないことを確認し、contextOption.secureSocketlayer も試しましたが、何も機能しません
暗号化されたパスワードを提供する必要がありますか? または、プロパティを設定する必要がありますか? 前もって感謝します。