From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7096466322200985600 X-Received: by 2002:a2e:84c7:0:b0:24b:6842:1923 with SMTP id q7-20020a2e84c7000000b0024b68421923mr17597141ljh.166.1652274821215; Wed, 11 May 2022 06:13:41 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ac2:4c49:0:b0:472:627f:9c3c with SMTP id o9-20020ac24c49000000b00472627f9c3cls26739lfk.3.gmail; Wed, 11 May 2022 06:13:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNAPzA+X490ngzq5h6zHrtBpVTGQ0Orl4ZZ5tz6UVt+c5+bddPgWm/4WIGQlUC6MrBH+we X-Received: by 2002:a19:e01e:0:b0:473:c404:230c with SMTP id x30-20020a19e01e000000b00473c404230cmr19459114lfg.194.1652274820041; Wed, 11 May 2022 06:13:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652274820; cv=none; d=google.com; s=arc-20160816; b=oOtOsboav6pOwNg8McMn5xNP+iSkZzK2uIIis6OUMeGBpK+5Bhhlgu+a5F/xqhqZFU 3Nkc+zw42PrXTWJ8Ra5hvgOB3paxUZ1w5TTUufY7frz3cMhqX/QbDlrF1ZyvtSGf2r5d OEpsyEYlordS86DMmn3dy2UkNbW701KAq2R4ji/WSd0+df3PkowIO8JLeqHmtIH5JuCO oS4cChwU2SxwOxGbNPnQc9vqinypfHxrLxBLezyqS/Ikoht79Qqnp8Bquy5YriiDWvdz MNNNnoDBTmO7C4PhB5b0V5r3w7acZsY1xAFDgiprq6LBDXEnjCGoTseDyoh4fCo+4UwD k2sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:to:from:dkim-signature; bh=Dx4mUaf8Z4E9JZEMxZTXoVApkp28xcVE9CaqiR3IRtM=; b=ROAh/UcEiSPW/wFWVDY6lapKPRhYhJqxlwwugZsEUFvujUaISHVNR5gIrHYEfZGd8u oSDcTlW6lkeE5iGrl3Ufe5idTxE6SU61NuTz068pnLRiPqawjpgeNaFEaYB8obVrVILV jM+hy+XuyLjJOzSfTeSvo5YA+pxK5IzwF058SgiwS1ZI349+g6c3TBqpmbaJLJcM1urW l3n9G0AExogB2lkCVzoLhzR0hyyvDBVLc8GS8rw1GWt5u57DzfG673wdwO2xaPFOAGqZ J4Qb+DL0JDV/rikIm8Qy9cVpC4IflxVwbs8ZFbtu9VVHjPaHGr5ZYydb+LswemTZl+Hj vMdA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=hrIgud41; spf=pass (google.com: domain of fm-51332-202205111313399ca9876ccdd48f2ee3-oymbi9@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-51332-202205111313399ca9876ccdd48f2ee3-oyMBI9@rts-flowmailer.siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from mta-64-227.siemens.flowmailer.net (mta-64-227.siemens.flowmailer.net. [185.136.64.227]) by gmr-mx.google.com with ESMTPS id c5-20020a2e9d85000000b002499fdca3e4si143591ljj.3.2022.05.11.06.13.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 May 2022 06:13:40 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-51332-202205111313399ca9876ccdd48f2ee3-oymbi9@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) client-ip=185.136.64.227; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=hrIgud41; spf=pass (google.com: domain of fm-51332-202205111313399ca9876ccdd48f2ee3-oymbi9@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-51332-202205111313399ca9876ccdd48f2ee3-oyMBI9@rts-flowmailer.siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: by mta-64-227.siemens.flowmailer.net with ESMTPSA id 202205111313399ca9876ccdd48f2ee3 for ; Wed, 11 May 2022 15:13:39 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=Quirin.Gylstorff@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:References:In-Reply-To; bh=Dx4mUaf8Z4E9JZEMxZTXoVApkp28xcVE9CaqiR3IRtM=; b=hrIgud415K/asv5Sr1i+jE03EwbtCbMdKB/eFbzD70JPJ1NACeFosPebwY3EH8o95Pqg6U j4psiU5HQ5ccJxyRWCnclXqvC7QeuF0ocFgdGYZKZFjD0mbBJ1BOivq29QCGfBg0lLX4gSld BVd/k0GxOWGrcg1Wycr38H6/zFlzM=; From: Quirin Gylstorff 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 Message-Id: <20220511131338.450234-2-Quirin.Gylstorff@siemens.com> In-Reply-To: <20220511131338.450234-1-Quirin.Gylstorff@siemens.com> References: <20220511131338.450234-1-Quirin.Gylstorff@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-51332:519-21489:flowmailer X-TUID: mn8FhRzQvXRw From: Quirin Gylstorff 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 --- 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