It's possible that users use EXTRA_USERS_PARAMS to set password
for root or explicitly expire root password. So we need to check
these two cases to ensure the 'no password' banner is not misleading.
As an example, below are configurations to make an image requiring
setting a root password on first boot, but without having to first enter
a static initial password:
In conf/toolcfg.cfg:
OE_FRAGMENTS += "distro/poky core/yocto/root-login-with-empty-password
In local.conf:
INHERIT += "extrausers"
EXTRA_USERS_PARAMS += " passwd-expire root;"
Adding such banner is only meaningful when base-passwd and baes-files are
installed. In case of container image, they might not be installed (e.g.,
container-test-image). So add extra checking for it. With the above logic,
we avoid breaking the following oe-selftest test case:
containerimage.ContainerImageTests.test_expected_files