【问题标题】:Setting a password using a SecureString使用 SecureString 设置密码
【发布时间】:2014-10-31 18:23:41
【问题描述】:

为什么System.DirectoryServices.AccountManagement.UserPrincipal.SetPassword() 不使用System.Security.SecureString 作为新密码?是否有另一种更改密码的方法确实使用SecureString

【问题讨论】:

    标签: .net security active-directory directoryservices


    【解决方案1】:

    不幸的是,并非 .NET 中的所有密码处理 API 都使用 SecureString。不知道为什么,因为 SecureString 类比 DirectoryServices.AccountManagement.UserPrincipal 早了几个版本。

    您可以使用 PowerShell cmdlet Set-ADAccountPassword,它确实需要 SecureString

    【讨论】:

    • 感谢您的回答!
    猜你喜欢
    • 2018-12-02
    • 1970-01-01
    • 1970-01-01
    • 2013-01-27
    • 1970-01-01
    • 1970-01-01
    • 2023-04-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多