I need to remove all existing user accounts and configuration from iLO2 on many old HP blade servers. As far as can do config/log clearance with hponcfg <bay number> << EOF and pasting my script, I cannot remove all user accounts. I tried with

<USER_INFO MODE="write">

but I get syntax error because of *, seems like it only accepts a single username. I found a GET_ALL_USERS command that returns all usernames, but I don't know how to parse it in a loop. How can I do it?

Edit: Even though there already is an accepted answer, if someone bumps on this thread and knows how to just remove users without factory reset, I'd appreciate the hint. Sometimes removing all users except for admin one might be useful.

  • 1
    Just loop externally with multiple calls to that command in a script. Also be careful and check what happens if you delete all user names - can you still login in some way?
    – Sven
    Aug 19 '17 at 9:22
  • These devices are about to get scrapped so it's not an issue, but thanks for the point. What do you mean by 'loop externally'? The only thing that comes to my mind is to loop ssh connections with first returning list of users, then parse the list to get them, and then run ssh for each user with hponcfg and appropriate SUBSTITUTE parameter. It seems quite complicated as for what I think is a simple task.
    – adamczi
    Aug 19 '17 at 9:31

Why don't you run the command to factory reset the ILO units?

See here.

Something like:

hponcfg “Insert Blade Bay Number” << @

  <LOGIN USER_LOGIN="Dontcare" PASSWORD="UsingAutologin">
    <RIB_INFO MODE="write">

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.