Skip to content

Instantly share code, notes, and snippets.

Last active June 20, 2023 07:24
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save pierrelefevre/ab059cde38f063204f2cc6160b63eb82 to your computer and use it in GitHub Desktop.
Change User string on Dell servers iDRAC LCD display


While trying to set our Dell servers to have a helpful asset tag on the LCDs, we noticed that ipmitool's delloem set mode function was not working. Seeing as ipmitool is on hold due to sanctions, we tried to find an alternative solution.

From some old mailing list thread [0], and a blog post[1], we managed to change the LCD user string, however only when manually setting "Home" to be User String.

By staring at the code for a couple hours, we figured out why the existing set LCD mode command was not working - the 0x00 sent was not enough, as multiple parameters needed to be set each time. By adding the trailing zeroes, this command now works on our Precision 7920 Rack machines.

The code


from subprocess import call
from sys import argv

user_string = ' '.join(argv[1:])[:14]
hex_string = ' '.join([hex(ord(z)) for z in user_string])

call('/usr/bin/ipmitool raw 0x6 0x58 0xC2 0 0 0 0 0 0 0 0 0 0 0 0', shell=True)
call('/usr/bin/ipmitool raw 0x6 0x58 0xC1 0 0 {0} {1}'.format(str(len(user_string)), hex_string), shell=True)

Adapting this to your use case

To get it to work, you might have to change the path to ipmitool, and perhaps add interface, host, password, etc. arguments depending on your setup.


This was done by Emil Karlsson and I, while working on kthcloud.

See the original creators in the sources below.


This code is licensed under the MIT license. Feel free to use it :)




Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment