Re: Cannot reset root password with yocto build #kirkstone

Otavio Salvador


You can use a task for this, see below:

inherit extrausers

# Default root password
change_root_password() {
    echo 'root:${ROOT_USER_PASSWORD}' | chpasswd -R ${IMAGE_ROOTFS} root

ROOTFS_POSTPROCESS_COMMAND += "change_root_password ; "

Em seg., 2 de jan. de 2023 às 05:48, <vivsundar@...> escreveu:

Hi all,

I am usnig the imx6 freescale processor.
I am trying to build rootFS with yocto build "5.15-kirkstone" branch
I use Sysvinit for my bootup sequence.
I cannot reset the root password. I have tried the following things:

Added the following line in local.conf
INHERIT += "extrausers"
EXTRA_USERS_PARAMS = "usermod -p '\$6\$rYOC7GCfUdPrKZdt\$GbxrFaYxl0Wdk9ZyuR/HarDrChctvbHQqdmdtGS.dxCq0FUxLVdxgvdBCoofs4NLcc/0GZ3pbMcrNeT3KwCFk/' root;"
I can see that when i add this line the /etc/shadow file is updated with the password hash

Manually changed the /etc/shadow file with the hash

But yet no use.

I tried to add
IMAGE_FEATURES = " debug-tweaks"
EXTRA_IMAGE_FEATURES = " empty-root-password"
EXTRA_IMAGE_FEATURES += " ssh-server-dropbear"
EXTRA_IMAGE_FEATURES += " allow-empty-password"
EXTRA_IMAGE_FEATURES += " allow-root-login"

but yet no use.

I am using sysvinit V3.01 in the build.

Can some one point what file should i change in order to change the root password?

Otavio Salvador                             O.S. Systems
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750

Join { to automatically receive all group messages.