Set User Password 命令详情
更新时间:2025/06/26
在Gitcode上查看源码

修订记录

openUBMC版本号修订日期修订人修订内容
25.062025/06/26pengqiang-gs初稿,新增命令详情

基本信息

功能说明

标准命令,设置和修改用户密码。 This command is used to set and change user passwords and to enable and disable User IDs.

权限

ConfigureSelf

命令信息

请求信息

字节顺序域取值说明
1User ID.
For IPMI v2.0, the BMC shall support 20-byte passwords (keys) for all supported user IDs that have configurable passwords. The BMC shall maintain an internal tag that indicates whether the password was set as a 16-byte or as a 20-byte password.

A 16-byte password can be used in algorithms that call for a 20-byte password. In this case, the 16-byte password is padded with 0’s to 20-bytes.

The ‘test password’ operation shall return the ‘test failed’ error completion code if an attempt is made to test a password that was stored as a 20-byte password as a 16-byte password (per ‘password size’ bit 7), and vice versa.

A password that has been stored as a 20-byte password cannot be used for establishing an IPMI v1.5 session. If it is necessary to configure the same password for both IPMI v2.0 and IPMI v1.5 access, it must be set as a 16-byte password5. The password will be padded with 0’s as necessary for IPMI v2.0 / RMCP+ use.

The ‘test password’ operation can be used to determine whether a password has been stored as 16-bytes or 20-bytes.
[7] - password size
 1b = set 20-byte user password/key.
 0b = set 16-byte user password/key (IPMI v1.5 backward compatible)
[6] - reserved.
[5:0] - User ID. 000000b = reserved. (User ID 1 is permanently associated with User 1, the null user name).
2[7:2] - reserved
[1:0] - operation
 00b = disable user
 01b = enable user
 10b = set password
 11b = test password Compares the password data given in the request with the presently stored password and returns an OK completion code if there is a match. Otherwise, an error completion code is returned. (See the Completion Code description in the response data.)
3:(18/22)Password data

For password size = 16 bytes, this is a required, fixed length field when used for the set and test password operations. If the password is entered as an ASCII string, it must be null (00h) terminated and 00h padded if the string is shorter than 16 bytes. This field need not be present if the operation is ‘disable user’ or ‘enable user’. If this field is present for those operations, the BMC will ignore the data.

For password size = 20 bytes, this is a required, fixed length field when used for the set- and test password operations. If the password is entered as an ASCII string, it must be null (00h) terminated and 00h padded if the string is shorter than 20 bytes. This field need not be present if the operation is ‘disable user’ or ‘enable user’. If this field is present for those operations, the BMC will ignore the data.

响应信息

字节顺序域取值说明
1Completion Code. Generic, plus following command-specific completion codes:
80h = (mandatory) password test failed. Password size correct, but password data does not match stored value.
81h = (mandatory) password test failed. Wrong password size was used.

命令样例

样例1:设置用户2的密码

  • 请求:
  • 响应:

返回到索引