summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/shadow
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2021-08-19 17:56:21 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-20 08:53:03 +0100
commit90cf58dc7dda609ff5accad0b26bfb0936b1a0bd (patch)
tree400caa3d875b12b52234b7714bb270f9061a5dbe /meta/recipes-extended/shadow
parentc5db14b395ee5dc55baae5e84166ccfcdc1ef083 (diff)
downloadpoky-90cf58dc7dda609ff5accad0b26bfb0936b1a0bd.tar.gz
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] https://github.com/shadow-maint/shadow/commit/bbf4b79bc49fd1826eb41f6629669ef0b647267b (From OE-Core rev: 736d0b29c6246658a925ea9036ccfe6216d12837) Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/shadow')
-rw-r--r--meta/recipes-extended/shadow/files/useradd8
-rw-r--r--meta/recipes-extended/shadow/shadow.inc3
2 files changed, 11 insertions, 0 deletions
diff --git a/meta/recipes-extended/shadow/files/useradd b/meta/recipes-extended/shadow/files/useradd
new file mode 100644
index 0000000000..782aeef418
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/useradd
@@ -0,0 +1,8 @@
1# useradd defaults file
2GROUP=100
3HOME=/home
4INACTIVE=-1
5EXPIRE=
6SHELL=/bin/sh
7SKEL=/etc/skel
8CREATE_MAIL_SPOOL=no
diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc
index c1e24b4f16..c35cc8396d 100644
--- a/meta/recipes-extended/shadow/shadow.inc
+++ b/meta/recipes-extended/shadow/shadow.inc
@@ -17,6 +17,7 @@ SRC_URI = "https://github.com/shadow-maint/shadow/releases/download/v${PV}/${BP}
17 file://0001-Fix-out-of-tree-builds-with-respect-to-libsubid-incl.patch \ 17 file://0001-Fix-out-of-tree-builds-with-respect-to-libsubid-incl.patch \
18 file://0001-libsubid-link-to-PAM-libraries.patch \ 18 file://0001-libsubid-link-to-PAM-libraries.patch \
19 file://0001-libmisc-fix-default-value-in-SHA_get_salt_rounds.patch \ 19 file://0001-libmisc-fix-default-value-in-SHA_get_salt_rounds.patch \
20 file://useradd \
20 " 21 "
21 22
22SRC_URI:append:class-target = " \ 23SRC_URI:append:class-target = " \
@@ -116,6 +117,8 @@ do_install() {
116 # Use proper encryption for passwords 117 # Use proper encryption for passwords
117 sed -i 's/^#ENCRYPT_METHOD.*$/ENCRYPT_METHOD SHA512/' ${D}${sysconfdir}/login.defs 118 sed -i 's/^#ENCRYPT_METHOD.*$/ENCRYPT_METHOD SHA512/' ${D}${sysconfdir}/login.defs
118 119
120 install -d ${D}${sysconfdir}/default
121 install -m 0644 ${WORKDIR}/useradd ${D}${sysconfdir}/default
119} 122}
120 123
121do_install:append() { 124do_install:append() {