archive mirror
 help / color / mirror / Atom feed
From: Joseph Reynolds <>
To: openbmc <>
Subject: Update phosphor-defaults with stronger root password hash algorithm
Date: Thu, 1 Jul 2021 09:42:54 -0500	[thread overview]
Message-ID: <> (raw)

OpenBMC Community,

Testing the [libpam_1.5.1 changes][] revealed a limitation with the old 
MD5 hash algorithm used to encode OpenBMC's root password.  The fix is 
to change phosphor-defaults to use an acceptable hash algorithm such as 
SHA-512.  We can keep the same password so our testing tools continue to 
work.  Details are below.  I plan to push a fix for this.

- Joseph


OpenBMC provisions the BMC firmware image with the root account password 
in a form which is no longer acceptable to Linux-PAM version 1.5.1.

Specifically, [][] sets the password hash into 
/etc/shadow as "\$1\$UGMqyqdG\$FZiylVFmRRfl9Z0Ue8G7e/", where $1 
indicates the old weak MD5 hash algorithm.  Ref: [wikipedia passwd 
entry][].  Beginning around PAM version 1.5.1, when you log in, the 
[ module][] authenticates okay but requires the password to 
be changed.  (For example, you'll get a message like "You are required 
to change your password immediately (administrator enforced)."  This 
behavior is undesirable for the OpenBMC project defaults, and is not 
tolerated by the project's current continuous integration tools.)  Note 
the new password is stored using the SHA-512 algorithm.   Thanks to Noah 
Brewer for debugging this issue.

This has an easy fix: use the same password with an updated hash 
algorithm.  Specifically, update the password hash supplied in to use the same password as before but encoded 
with the SHA-512 algorithm.  An acceptable hash can be provided by the 
`openssl passwd -6 0penBmc` command.  This change ought to be 
transparent, forward and backward compatible.  This change is also a 
prerequisite for going to libpam_1.5.1 (presuming you don't want to 
force users to change their password the first time they login).

Note various meta-layers use this same old hash string in 
conf/local.conf.sample files. They should consider updating to match the 
new value.

Closely related: the [Replace deprecated Linux-PAM modules][] gerrit review.

[libpam_1.5.1 changes]:

[wikipedia passwd entry]:
[ module]:
[Replace deprecated Linux-PAM modules]:

                 reply	other threads:[~2021-07-01 14:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).