Skip to contentSkip to conversation

How to compute the password hash

DISCUSSION Joseph Reynolds 1 participant 1 message Aug 20, 2020

lore
Share & tools
lore
#0 lore raw

Richard,

Thanks for putting together the OpenBMC user authentication presentationand presenting it as part of today's OpenBMC learning series event.  Well done!  The following question (paraphrased here) was asked.  My answer is below.

- Joseph

Q. How to compute a user account password hash [1] such as the project default [2] for my own distro? A. From my Linux system, I use:
openssl passwd -1 -salt "UGMqyqdG" 0penBmc
$1$UGMqyqdG$FZiylVFmRRfl9Z0Ue8G7e/

Notes:
- The -1 option and the -salt "UGMqyqdG" option were used to get the exact result in the project default [2].  You would probably want to use sha512 and your own salt.
- The first character of the password is a zero, not a capital O.

[1]: https://en.wikipedia.org/wiki/Passwd
[2]: https://github.com/openbmc/openbmc/blob/master/meta-phosphor/conf/distro/include/phosphor-defaults.inc