Re: Yocto build to add root password


andy.pont@sdcsystems.com <andy.pont@...>
 

Mauro wrote...

pay attention that "openssl passwd ${ROOT_PASSWORD}" command handles only passwords up to 8 characters (the extra characters will be truncated and the generated hash is for the first eight).
 
If you want to use more than 8 characters in the password, use another password algorithm instead of the default one. You can see other supported algorithms typing "openssl help passwd".
 
For example, command could become
 
openssl passwd -6 ${ROOT_PASSWORD}
 
I tried this out on a build that I am working on for which I needed to add a root password and to create a non-root user with a password.

If I use:

EXTRA_USERS_PARAMS += "usermod -p `openssl passwd -6 ${ROOT_PASSWORD}` root;”

When I try to login to the device it rejects the password that was defined as ROOT_PASSWORD.  If I remove the “-6” from the openssl command and rebuild/deploy the image then I can login to the target as expected.  Is there something else that needs to be defined/included in the Yocto configuration in order for the “-6” option to work?

-Andy.

Join {yocto@lists.yoctoproject.org to automatically receive all group messages.