Re: extrausers-bbclass: plaintext password (since shadow update to 4.9)


Peter Bergin
 

Hi Matthias,

On 2021-08-31 09:03, Matthias Klein wrote:
But I have not found a way to set the password with EXTRA_USERS_PARAMS.
Do you know a working variant?
Is it a requirement that you need to regenerate the hash on every build? If not one solution can be:

    inherit extrausers

    #
    # HASH generated with this command:
    # python3 -c "import crypt; print(crypt.crypt('toor', crypt.METHOD_SHA512))"
    #
    HASH = "\\\$6\\\$8Z5vMcqCIB19PgY8\\\$Sv4kAfsH1k.SANHL5JVb6hdqmQWHOeH0Rjrjyii7fGAK20Gclj/.qiBvUPnAfh.WSsr1.XV0pUNom2L9oYYDV/"

    EXTRA_USERS_PARAMS = " \
       usermod -p ${HASH} root; \
    "

Best regards,
/Peter

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