Skip to content

Set password is not working with user ids 16..63 #6

Closed
sll552 opened this issue May 15, 2018 · 3 comments
Closed

Set password is not working with user ids 16..63 #6

sll552 opened this issue May 15, 2018 · 3 comments
Labels
bug Something isn't working

Comments

@sll552
Copy link

sll552 commented May 15, 2018

Hello,
I am using CentOS 7.4 recently ipmitool got upgraded to 1.8.18 from 1.8.15. This broke setting the password for a User with the id 16 with the following error:
IPMI command failed: Invalid data field in request

The corresponding code is https://github.com/ipmitool/ipmitool/blob/master/lib/ipmi_user.c#L208 .

memset(data, 0, data_len);
data[0] = (is_twenty_byte) ? 0x80 : 0x00;
data[0] |= (0x0F & user_id);
data[1] = 0x03 & operation;

0x0F & 16 will result in 0 and is therefore not working. As I don't know the ipmi protocol well enough to change it myself I hope this gives the right clues for fixing this (and maybe get it backported in rhel/centos).

Best regards.

@AlexanderAmelkin
Copy link
Contributor

AlexanderAmelkin commented May 16, 2018

This looks like a bug. According to IPMI 2.0 specification, the User ID field is 6-bit, so the mask should be 0x3F, not 0x0F. I'll fix it.

@AlexanderAmelkin
Copy link
Contributor

@sll552, please check if branch bugfix/6 works for you. I don't have hardware to check against.

@sll552
Copy link
Author

sll552 commented May 18, 2018

Thanks for the fast fix!
It is working on my test system (Dell R620):

./ipmitool user set password 16
Password for user 16:
Password for user 16:
Set User Password command successful (user 16)

BTW:
I had problems building the source in an environment without direct internet access. It seems that the generated pen file is not properly clean when using make clean and an invalid file is generated when no direct internet connection is available, so curl fails.
Also a little bit of "How to build" documentation would be nice.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants