This combination has been working for 10+ years. I do like banner. But it's sometimes misleading. See the example. This patch is trying to make it not misleading.
I don’t think erroring out in useradd_base.bbclass with special case is a good approach. Why so? I don't see any strong reason to break previous behavior. And that makes useradd_base.bbclass bundled with IMAGE_FEATURES. Regards, Qi -----Original Message----- From: Alexander Kanavin <[email protected]> Sent: Saturday, November 29, 2025 6:16 PM To: Chen, Qi <[email protected]> Cc: [email protected]; [email protected] Subject: Re: [OE-core][PATCH V2 1/2] rootfs-postcommands.bbclass: fix adding 'no password' banner On Sat, 29 Nov 2025 at 04:54, Chen Qi via lists.openembedded.org <[email protected]> wrote: > 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: > 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;" > > Note that allowing 'empty-root-password' image feature + > setting/expiring root password has been working since available. This > patch focuses on the banner. We want to ensure that it's there only > when root really has empty password. > > We need to ensure that the function runs after set_user_group function > from extrausers.bbclass. This is because the check is valid only after > things set in EXTRA_USERS_PARAMS are done. So change to use :append. If you are setting a password for root, then why at the same time you add root-login-with-empty-password to fragments? Aren't they contradicting each other, and you should pick one or the other, but not both? Yes up to now EXTRA_USERS_PARAMS setting took priority over the empty-password setting, and gave you the desired outcome, but that does not in itself make the combination a valid configuration with a well-defined behaviour that needs to be preserved. Alex
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#226937): https://lists.openembedded.org/g/openembedded-core/message/226937 Mute This Topic: https://lists.openembedded.org/mt/116522681/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
