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
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
>
> View/Reply Online (#47404):
> https://lists.yoctoproject.org/g/yocto/message/47404
> Mute This Topic: https://lists.yoctoproject.org/mt/61917008/3617932
> Group Owner: [email protected]
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
> [[email protected]]
> -=-=-=-=-=-=-=-=-=-=-=-
--
-----
Rudolf J Streif
CEO/CTO ibeeto
+1.855.442.3386 x700
signature.asc
Description: OpenPGP digital signature
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#47408): https://lists.yoctoproject.org/g/yocto/message/47408 Mute This Topic: https://lists.yoctoproject.org/mt/61917008/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
