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

47h-设置BMC用户密码(Set-User-Password)

修订记录

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

基本信息

功能说明

设置BMC用户密码。

权限

ConfigureSelf

命令信息

请求信息

字节顺序域取值说明
NetFnApp 06h
CMD47h
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 'passwordsize' 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.)
For password size=16 bytes:
3:18Password data. This is a required, fixed length field when used for the setand 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:
3:2220-byte Password data. 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

命令样例

设置BMC用户密码为Bmc+-*/123

请求:

ipmitool raw 0x06 0x47 0x03 0x02 0x42 0x6d 0x63 0x2b 0x2d 0x2a 0x2f 0x31 0x32 0x33 0x00 0x00 0x00 0x00 0x00 0x00

响应:

返回到索引