diff options
author | Andrei Gherzan <andrei.gherzan@huawei.com> | 2022-08-24 11:42:17 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-25 11:07:33 +0100 |
commit | 364a6f408c9feb5b9472ddabbc352d8b432bfffd (patch) | |
tree | 42ff31f210429796e1891386fd50fa2b64f06309 /meta/recipes-extended | |
parent | 2ae1eb5528c21fce31d4ac3c1837423c62da77d8 (diff) | |
download | openembedded-core-contrib-364a6f408c9feb5b9472ddabbc352d8b432bfffd.tar.gz |
shadow: Enable subid support
shadow utils are used when creating users at image creation time. The
useradd/usermod tools will only try to add a default configuration for
subid files if they exist.
Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r-- | meta/recipes-extended/shadow/shadow.inc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc index fbb1d395ff..b2f82e9ac7 100644 --- a/meta/recipes-extended/shadow/shadow.inc +++ b/meta/recipes-extended/shadow/shadow.inc @@ -147,6 +147,13 @@ do_install:append() { # Handle link properly after rename, otherwise missing files would # lead rpm failed dependencies. ln -sf newgrp.${BPN} ${D}${bindir}/sg + + # usermod requires the subuid/subgid files to be in place before being + # able to use the -v/-V flags otherwise it fails: + # usermod: /etc/subuid does not exist, you cannot use the flags -v or -V + install -d ${D}${sysconfdir} + touch ${D}${sysconfdir}/subuid + touch ${D}${sysconfdir}/subgid } PACKAGES =+ "${PN}-base" |