ksetup changepasswordksetup changepassword

使用密钥发行中心 (KDC) 密码 (kpasswd) 值更改登录用户的密码。Uses the Key Distribution Center (KDC) password (kpasswd) value to change the password of the logged-on user. 命令的输出会通知你成功或失败状态。The output of the command informs you of the success or failure status.

可以通过运行kpasswd ksetup /dumpstate 命令并查看输出来检查是否已设置 kpasswd。You can check whether the kpasswd is set, by running the ksetup /dumpstate command and viewing the output.

语法Syntax

ksetup /changepassword <oldpassword> <newpassword>

参数Parameters

参数Parameter 说明Description
<oldpassword> 指定已登录用户的现有密码。Specifies the logged-on user's existing password.
<newpassword> 指定已登录用户的新密码。Specifies the logged on user's new password. 此密码必须满足在此计算机上设置的所有密码要求。This password must meet all the password requirements set on this computer.

备注Remarks

  • 如果在当前域中找不到用户帐户,系统将要求你提供用户帐户所在的域名。If the user account isn't found in the current domain, the system will ask you to supply the domain name where the user account resides.

  • 如果要在下次登录时强制更改密码,则此命令允许使用星号 ( * ) ,因此系统会提示用户输入新密码。If you want to force a password change at next logon, this command allows the use of the asterisk (*) so the user will be prompted for a new password.

示例Examples

若要更改当前登录到此计算机的用户的密码,请键入:To change the password of a user who is currently logged on to this computer in this domain, type:

ksetup /changepassword Pas$w0rd Pa$$w0rd

若要更改当前登录到 Contoso 域的用户的密码,请键入:To change the password of a user who is currently logged on in the Contoso domain, type:

ksetup /domain CONTOSO /changepassword Pas$w0rd Pa$$w0rd

若要强制当前登录的用户在下次登录时更改密码,请键入:To force the currently logged on user to change the password at the next logon, type:

ksetup /changepassword Pas$w0rd *

其他参考Additional References