From: Quirin Gylstorff <Quirin.Gylstorff@siemens.com>
To: jan.kiszka@siemens.com, isar-users@googlegroups.com
Subject: [PATCH 1/2] classes/image-account-extension:Move account configuration to post-process
Date: Wed, 11 May 2022 15:13:37 +0200 [thread overview]
Message-ID: <20220511131338.450234-2-Quirin.Gylstorff@siemens.com> (raw)
In-Reply-To: <20220511131338.450234-1-Quirin.Gylstorff@siemens.com>
From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
If the root account is deactivate during rootfs configuration
, e.g. by setting 'USER_root[expire]="01-01-1970"', the following error
occurs if a packages tries to create/modifies a user account.
```
Setting up systemd (247.3-7) ...
Created symlink /etc/systemd/system/getty.target.wants/getty@tty1.service -> /lib/systemd/system/getty@.service.
Created symlink /etc/systemd/system/multi-user.target.wants/remote-fs.target -> /lib/systemd/system/remote-fs.target.
Created symlink /etc/systemd/system/sysinit.target.wants/systemd-pstore.service -> /lib/systemd/system/systemd-pstore.service.
Initializing machine ID from random generator.
Your account has expired; please contact your system administrator.
chfn: PAM: Authentication failure
adduser: `/bin/chfn -f systemd Network Management systemd-network' returned error code 1. Exiting.
dpkg: error processing package systemd (--configure):
installed systemd package post-installation script subprocess returned error exit status 1
Setting up dmsetup (2:1.02.175-2.1) ...
Errors were encountered while processing:
systemd
E: Sub-process /usr/bin/dpkg returned an error code (1)
WARNING: exit code 100 from a shell command.
```
This move also allows /etc/skel modification to be applicable to
all users.
Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
meta/classes/image-account-extension.bbclass | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/meta/classes/image-account-extension.bbclass b/meta/classes/image-account-extension.bbclass
index c9bebe85..caa962a0 100644
--- a/meta/classes/image-account-extension.bbclass
+++ b/meta/classes/image-account-extension.bbclass
@@ -58,8 +58,7 @@ IMAGE_ACCOUNTS_GROUPS =+ "${@gen_accounts_array(d, 'GROUPS', 'GROUP', ['gid', 'f
do_rootfs_install[vardeps] += "${IMAGE_ACCOUNTS_GROUPS} ${IMAGE_ACCOUNTS_USERS}"
-ROOTFS_CONFIGURE_COMMAND += "image_configure_accounts"
-image_configure_accounts[weight] = "3"
+ROOTFS_POSTPROCESS_COMMAND += "image_configure_accounts"
image_configure_accounts() {
# Create groups
# Add space to the end of the list:
--
2.35.1
next prev parent reply other threads:[~2022-05-11 13:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-11 13:13 [PATCH 0/2] Fix possible build errors due to expired root account Quirin Gylstorff
2022-05-11 13:13 ` Quirin Gylstorff [this message]
2022-05-11 14:57 ` [PATCH 1/2] classes/image-account-extension:Move account configuration to post-process Henning Schild
2022-05-12 5:53 ` Jan Kiszka
2022-05-11 13:13 ` [PATCH 2/2] classes/image-account-extension: Add flag to force password change on first login Quirin Gylstorff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220511131338.450234-2-Quirin.Gylstorff@siemens.com \
--to=quirin.gylstorff@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox