Author Topic: OpenBMC password  (Read 7846 times)

atomicdog

  • Newbie
  • *
  • Posts: 26
  • Karma: +3/-0
    • View Profile
OpenBMC password
« on: March 13, 2022, 03:13:09 am »
I'm trying to log in to the BMC on my new Talos II with the password that came in the box, but it doesn't work.

Are there instructions somewhere on setting/resetting the password? I've connected to the serial console port but don't see any obvious way in u-boot to do that.

MPC7500

  • Hero Member
  • *****
  • Posts: 587
  • Karma: +41/-1
    • View Profile
    • Twitter
Re: OpenBMC password
« Reply #1 on: March 13, 2022, 08:19:16 am »
0 (zero) and O look identically on that slip.
Have you tried all the variations?

atomicdog

  • Newbie
  • *
  • Posts: 26
  • Karma: +3/-0
    • View Profile
Re: OpenBMC password
« Reply #2 on: March 13, 2022, 01:39:26 pm »
Yeah, I've tried different variation for the characters that look ambiguous, but still no luck logging in.

SiteAdmin

  • Administrator
  • *****
  • Posts: 41
  • Karma: +15/-0
  • RCS Staff
    • View Profile
Re: OpenBMC password
« Reply #3 on: March 14, 2022, 01:19:37 pm »
Please ensure you are logging in with the "root" user, either via SSH or the Web interface.  Also note that the "1" and "I" characters can look similar on the password paperwork.

atomicdog

  • Newbie
  • *
  • Posts: 26
  • Karma: +3/-0
    • View Profile
Re: OpenBMC password
« Reply #4 on: March 14, 2022, 09:50:35 pm »
It was a lowercase L.
For some reason I thought it was an uppercase L or maybe a '1' or 'I'. The 'one' is very similar.

I'm still curious on how logging into the serial console is suppose to allow you to reset the password though. I don't see any OpenBMC documentation about it. I found this: https://docs.graphcore.ai/projects/bmc-user-guide/en/latest/serial-rescue.html ...but is it specific to graphcore processors or generic to OpenBMC?

MPC7500

  • Hero Member
  • *****
  • Posts: 587
  • Karma: +41/-1
    • View Profile
    • Twitter

atomicdog

  • Newbie
  • *
  • Posts: 26
  • Karma: +3/-0
    • View Profile
Re: OpenBMC password
« Reply #6 on: March 15, 2022, 11:51:14 am »
That's for changing a password when you're already able to login, but I meant for recovering access and resetting a lost password.

Borley

  • Full Member
  • ***
  • Posts: 172
  • Karma: +14/-0
    • View Profile
Re: OpenBMC password
« Reply #7 on: April 09, 2022, 05:12:59 pm »
As far as I know, a lost or forgotten BMC password basically requires reflashing the BMC chip. But if you're already logged into the BMC, changing it should be as simple as running
Code: [Select]
passwdand very carefully entering the new passphrase, three times. I have discovered (through my own painful experience :P) that the separate password for the boot menu (Petitboot) can more easily be reset.

bobpaul

  • Newbie
  • *
  • Posts: 2
  • Karma: +2/-0
    • View Profile
Re: OpenBMC password
« Reply #8 on: February 07, 2024, 10:09:18 pm »
I'm still curious on how logging into the serial console is suppose to allow you to reset the password though. I don't see any OpenBMC documentation about it. I found this: https://docs.graphcore.ai/projects/bmc-user-guide/en/latest/serial-rescue.html ...but is it specific to graphcore processors or generic to OpenBMC?

I tried the instructions at graphcore.ai with no luck. But the instructions on the wiki for Resetting the BMC's Persistant Storage worked for me on two systems. After wiping the persistent storage, I was able to log into the BMC with the default password and get all the firmwares updated.

draconx

  • Newbie
  • *
  • Posts: 2
  • Karma: +2/-0
    • View Profile
Re: OpenBMC password
« Reply #9 on: February 23, 2024, 04:15:13 pm »
I tried the instructions at graphcore.ai with no luck. But the instructions on the wiki for Resetting the BMC's Persistant Storage worked for me on two systems. After wiping the persistent storage, I was able to log into the BMC with the default password and get all the firmwares updated.

Wiping the entire persistent storage seems like total overkill if the only problem is that you forgot the BMC root password.

All you need to do is edit the shadow file on the overlay filesystem with a new password.

Follow that wiki page instructions to add overlay-filesystem-in-ram to the boot command line via u-boot.  This enables a root console login with the default root password of 0penBmc.  Once logged in, mount the writable overlay partition somewhere, for example:

Code: [Select]
# mount -t jffs2 /dev/mtdblock5 /mnt
Then the simplest way is probably to just copy /mnt/cow/etc/shadow over /etc/shadow, run passwd, then copy the newly-updated /etc/shadow back to the writable partition, for example:

Code: [Select]
# cp /mnt/cow/etc/shadow /etc/shadow
# passwd
New password:
Retype new password:
Retype new password:
passwd: Password updated successfully
# cp /etc/shadow /mnt/cow/etc/shadow

Or just run an editor on /mnt/cow/etc/shadow and manually change the root password hash to whatever you want.  Then reboot, and voila, shiny new BMC root password.
« Last Edit: February 23, 2024, 04:22:47 pm by draconx »