Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set root password on Yocto / Poky image?

I am building an image with Yocto/Poky release Daisy 1.6.3.
What is the correct way or config file where to set the root password? The default password is empty and I can't find a place where to specify it.

like image 798
Alessandro Da Rugna Avatar asked Aug 28 '15 15:08

Alessandro Da Rugna


People also ask

How do I change my Yocto root password?

Generate the password using mkpasswd When setting the password encrypted, make sure to use an lowercase p ( -p ) option in usermod when setting the root password. This tells the usermod command that the password is in cleartext.

What is poky in Yocto?

Poky is the build tool in the Yocto Project. The Yocto Project uses Poky to build images (kernel, system, and application software) for targeted hardware. Before diving into Poky, it helps to have an understanding of the Yocto Project.


1 Answers

Here is what you have to do in your recipe.

inherit extrausers
EXTRA_USERS_PARAMS = "usermod -P p@ssw0rd root;"

where p@ssw0rd is the password you want root user to have.

This link may help you.

As "debug-tweaks"'s goal is to set root's password empty, you must remove it from your EXTRA_IMAGE_FEATURES.

like image 159
john madieu Avatar answered Oct 04 '22 04:10

john madieu