Openembedded Core Discussions
 help / color / mirror / Atom feed
* Re: [OE-core] How to set the password Hashing Algorithm for root user to SHA256 or SHA512
       [not found] <Groupsio.1.uzea.1608323419985389915.mRo2@lists.openembedded.org>
@ 2020-12-20  4:46 ` Khem Raj
  2020-12-21 17:33   ` Sourabh Banerjee
  0 siblings, 1 reply; 2+ messages in thread
From: Khem Raj @ 2020-12-20  4:46 UTC (permalink / raw)
  To: Sourabh Banerjee; +Cc: Patches and discussions about the oe-core layer

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
>
> 
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [OE-core] How to set the password Hashing Algorithm for root user to SHA256 or SHA512
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Sourabh Banerjee @ 2020-12-21 17:33 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-21 17:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox