agherzan / meta-raspberrypi

Yocto/OE BSP layer for the Raspberry Pi boards
https://www.yoctoproject.org/
MIT License
528 stars 407 forks source link

[Kirkstone] Unable to set root password for CM4 #1161

Closed RajasJoshi closed 1 year ago

RajasJoshi commented 1 year ago

Hi All,

I am trying to build a custom image based on kirkstone branch for my raspberry pi CM4. I am trying to set password for root user by adding the following to the image recipe

inherit extrausers

EXTRA_USERS_PARAMS += "\
        usermod -p 'root' root; \
        "

And have also removed debug-tweaks from local.conf. When I build image using this configuration and try to enter the mentioned password, I get an error that the password is wrong. I have used the same method for setting root password for CM3 using the pyro branch and it works. In pyro build I used the following

inherit extrausers

EXTRA_USERS_PARAMS += "\
        usermod -P 'root' root; \
        "

Please let me know if I am doing somthing wrong or if there is any alternate method to do this. Any help is greatly appreciated!!

kraj commented 1 year ago

see this https://github.com/YoeDistro/yoe-distro/blob/master/sources/meta-yoe/recipes-core/images/yoe-simple-image.bb

it might help

RajasJoshi commented 1 year ago

@kraj Thank you so much!!! That solved the problem!