* [PATCH] shadow: change to use SHA512 password encryption
@ 2013-12-13 14:42 Paul Eggleton
0 siblings, 0 replies; only message in thread
From: Paul Eggleton @ 2013-12-13 14:42 UTC (permalink / raw)
To: openembedded-core
The default encryption method for shadow is DES, which limits passwords
to 8 characters. Not only is this undesirable, it's also not how busybox
works so we had different passwd/login length behaviour depending on
whether shadow was installed in the image or not. Change it to SHA512
which is what most Linux distributions seem to be using currently.
(SHA512 also matches up with how we are configuring PAM.)
Fixes [YOCTO #5656].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
meta/recipes-extended/shadow/shadow.inc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc
index 33ecc7d..048709e 100644
--- a/meta/recipes-extended/shadow/shadow.inc
+++ b/meta/recipes-extended/shadow/shadow.inc
@@ -109,6 +109,9 @@ do_install() {
# Disable checking emails.
sed -i 's/MAIL_CHECK_ENAB/#MAIL_CHECK_ENAB/g' ${D}${sysconfdir}/login.defs
+ # Use proper encryption for passwords
+ sed -i 's/^#ENCRYPT_METHOD.*$/ENCRYPT_METHOD SHA512/' ${D}${sysconfdir}/login.defs
+
# Now we don't have a mail system. Disable mail creation for now.
sed -i 's:/bin/bash:/bin/sh:g' ${D}${sysconfdir}/default/useradd
sed -i '/^CREATE_MAIL_SPOOL/ s:^:#:' ${D}${sysconfdir}/default/useradd
--
1.8.1.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-12-13 14:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-13 14:42 [PATCH] shadow: change to use SHA512 password encryption Paul Eggleton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox