From: "Sourabh Banerjee" <sbanerje@codeaurora.org>
To: Khem Raj <raj.khem@gmail.com>
Cc: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] How to set the password Hashing Algorithm for root user to SHA256 or SHA512
Date: Mon, 21 Dec 2020 23:03:53 +0530 [thread overview]
Message-ID: <526da86d058f59fcef77cf1ab05af7f0@codeaurora.org> (raw)
In-Reply-To: <CAMKF1sokjzyb0kPZ1tmb1Anr5kD8GPZtVeoeWoWkqSYG=16a2g@mail.gmail.com>
On 2020-12-20 10:16, Khem Raj wrote:
> On Sat, Dec 19, 2020 at 11:58 AM Sourabh Banerjee
> <sbanerje@codeaurora.org> wrote:
>>
>> [Edited Message Follows]
>>
>> The image I generated seems to use MD5 for root password hashing.
>> I understood this from the /etc/shadow file in the image., the file
>> has following line:
>>
>> root:$1$b7X30f8f$au21weqL.9.ExM4N84AtA0:18614:0:99999:7:::
>>
>> Is there an OE config I can change to change password hashing from MD5
>> to SHA256?
>>
>
> somewhere you must be setting the password something like this in
> local.conf
>
> EXTRA_USERS_PARAMS += "\
> useradd admin; \
> usermod -p 'XXXXXX' admin; \
> "
>
> Now how you generate the password could be done separately via
>
> something like ( for setting password to me 'test' )
>
> python3 -c 'import crypt; print(crypt.crypt("test",
> crypt.mksalt(crypt.METHOD_SHA256)))'
>
> Replace XXXXXX with the output of the above cmd
>
> aside from this its perhaps better to use sha512 than sha256
>
>> I am using Thud version.
>>
>> --
>> Regards,
>> Sourabh
>>
>>
>>
Thanks Khem! I will try this and get back.
--
Regards,
Sourabh
prev parent reply other threads:[~2020-12-21 17:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Groupsio.1.uzea.1608323419985389915.mRo2@lists.openembedded.org>
2020-12-20 4:46 ` [OE-core] How to set the password Hashing Algorithm for root user to SHA256 or SHA512 Khem Raj
2020-12-21 17:33 ` Sourabh Banerjee [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=526da86d058f59fcef77cf1ab05af7f0@codeaurora.org \
--to=sbanerje@codeaurora.org \
--cc=openembedded-core@lists.openembedded.org \
--cc=raj.khem@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox