On 25/11/19 17:24, Rudolf J Streif wrote:
Hi,
That's done via the extrausers class in an image recipe. Add this to
your image recipe:
>>>>>>
inherit extrausers
ROOT_PASSWORD = "secret"
EXTRA_USERS_PARAMS = "usermod -p `openssl passwd ${ROOT_PASSWORD}` root;"
<<<<<<
Make sure you use the backticks (`).
:rjs
On 11/23/19 2:25 PM, JH wrote:
Hi,
I built a Yocto image and I could log into the root without password,
how could I set up the Yocto build in a receipt to set password for
logging?
Thank you.
Kind regards,
- jh
Hi,
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}
Regards
--
Mauro Salvini | KOAN sas | Bergamo - Italia
embedded software engineering
Phone: +39 035-255235
http://KoanSoftware.com
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#47414): https://lists.yoctoproject.org/g/yocto/message/47414
Mute This Topic: https://lists.yoctoproject.org/mt/61917008/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-