summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/shadow/shadow.inc
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-12-13 14:42:46 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-13 14:51:21 +0000
commit68fbbd1008a76d78c7cef141dc06696d27fe2d0c (patch)
treeff96d9a84fc9d341cdbc5ec392bc34e48dd51a0e /meta/recipes-extended/shadow/shadow.inc
parent79e2bbdac0487cb419b3efaeb27c9ed3fc4384b2 (diff)
downloadpoky-68fbbd1008a76d78c7cef141dc06696d27fe2d0c.tar.gz
shadow: change to use SHA512 password encryption
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]. (From OE-Core rev: a9e072f9f0da774411e07abf47dd4bd8c6d685d7) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/shadow/shadow.inc')
-rw-r--r--meta/recipes-extended/shadow/shadow.inc3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc
index 33ecc7db40..048709edd2 100644
--- a/meta/recipes-extended/shadow/shadow.inc
+++ b/meta/recipes-extended/shadow/shadow.inc
@@ -109,6 +109,9 @@ do_install() {
109 # Disable checking emails. 109 # Disable checking emails.
110 sed -i 's/MAIL_CHECK_ENAB/#MAIL_CHECK_ENAB/g' ${D}${sysconfdir}/login.defs 110 sed -i 's/MAIL_CHECK_ENAB/#MAIL_CHECK_ENAB/g' ${D}${sysconfdir}/login.defs
111 111
112 # Use proper encryption for passwords
113 sed -i 's/^#ENCRYPT_METHOD.*$/ENCRYPT_METHOD SHA512/' ${D}${sysconfdir}/login.defs
114
112 # Now we don't have a mail system. Disable mail creation for now. 115 # Now we don't have a mail system. Disable mail creation for now.
113 sed -i 's:/bin/bash:/bin/sh:g' ${D}${sysconfdir}/default/useradd 116 sed -i 's:/bin/bash:/bin/sh:g' ${D}${sysconfdir}/default/useradd
114 sed -i '/^CREATE_MAIL_SPOOL/ s:^:#:' ${D}${sysconfdir}/default/useradd 117 sed -i '/^CREATE_MAIL_SPOOL/ s:^:#:' ${D}${sysconfdir}/default/useradd