shadow: add /etc/default/useradd

The shadow 4.9 stops shiping /etc/default/useradd[1] and uses built-in
settings by default. Some settings are not consistent with previous
shadow 4.8.1 in oe-core. e.g. The default shell is /bin/bash rather than
/bin/sh. Per shadow 4.8.1 settings, add /etc/default/useradd back.

[1] bbf4b79bc4

(From OE-Core rev: 736d0b29c6246658a925ea9036ccfe6216d12837)

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Yi Zhao
2021-08-19 17:56:21 +08:00
committed by Richard Purdie
parent c5db14b395
commit 90cf58dc7d
2 changed files with 11 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
# useradd defaults file
GROUP=100
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/sh
SKEL=/etc/skel
CREATE_MAIL_SPOOL=no

View File

@@ -17,6 +17,7 @@ SRC_URI = "https://github.com/shadow-maint/shadow/releases/download/v${PV}/${BP}
file://0001-Fix-out-of-tree-builds-with-respect-to-libsubid-incl.patch \
file://0001-libsubid-link-to-PAM-libraries.patch \
file://0001-libmisc-fix-default-value-in-SHA_get_salt_rounds.patch \
file://useradd \
"
SRC_URI:append:class-target = " \
@@ -116,6 +117,8 @@ do_install() {
# Use proper encryption for passwords
sed -i 's/^#ENCRYPT_METHOD.*$/ENCRYPT_METHOD SHA512/' ${D}${sysconfdir}/login.defs
install -d ${D}${sysconfdir}/default
install -m 0644 ${WORKDIR}/useradd ${D}${sysconfdir}/default
}
do_install:append() {