<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>9789</bug_id>
          
          <creation_ts>2016-06-16 15:43:48 +0000</creation_ts>
          <short_desc>systemd rootfs-postprocess command should check staticids</short_desc>
          <delta_ts>2026-06-29 14:07:48 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>2.1</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>RETEST</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>6.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Stephano Cetola">stephano</reporter>
          <assigned_to name="Himani Barde">HimaniRamesh.Barde</assigned_to>
          <cc>chuckwolber</cc>
    
    <cc>joshuagloe</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>patrick.ohly</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>63053</commentid>
    <comment_count>0</comment_count>
    <who name="Stephano Cetola">stephano</who>
    <bug_when>2016-06-16 15:43:48 +0000</bug_when>
    <thetext>In rootfs-postcommands.bbclass, systemd_create_users does not check the staticids data to ensure that any of the groups or users it is creating has been marked with a static id.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73106</commentid>
    <comment_count>1</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-05-08 07:18:10 +0000</bug_when>
    <thetext>Here&apos;s how Ostro OS solved this:
https://github.com/ostroproject/ostro-os/commits/master/meta-ostro/classes/systemd-sysusers.bbclass</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73107</commentid>
    <comment_count>2</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-05-08 07:19:00 +0000</bug_when>
    <thetext>Refkit still has the same class.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77098</commentid>
    <comment_count>3</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-09-25 13:29:53 +0000</bug_when>
    <thetext>I&apos;m running into this in another distro. Is this still on the table for fixing in 2.4?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77137</commentid>
    <comment_count>4</comment_count>
    <who name="Stephano Cetola">stephano</who>
    <bug_when>2017-09-26 13:26:12 +0000</bug_when>
    <thetext>I believe the window for 2.4M4 has closed though I will discuss this with the team today. If it is possible to include this in 2.4 I&apos;ll get it submitted today.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77180</commentid>
    <comment_count>5</comment_count>
    <who name="Stephano Cetola">stephano</who>
    <bug_when>2017-09-27 21:34:33 +0000</bug_when>
    <thetext>Moving this to 2.5M1. I will backport to Rocko (2.4.1) if needed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96881</commentid>
    <comment_count>6</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-10-24 14:24:36 +0000</bug_when>
    <thetext>Bulk move from 4.99 or 0.00 to 5.99</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105947</commentid>
    <comment_count>7</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2026-06-18 15:29:51 +0000</bug_when>
    <thetext>Himani - please take a look and see if you can retest.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106039</commentid>
    <comment_count>8</comment_count>
    <who name="Himani Barde">HimaniRamesh.Barde</who>
    <bug_when>2026-06-29 12:41:58 +0000</bug_when>
    <thetext>Retested on openembedded-core master branch.

The original issue has been fixed by commit 0c7e76df68 (&quot;rootfs-postcommands: change sysusers.d command&quot;, 2023-06-15) by Louis Rannou.

The old systemd_create_users function, which created users/groups at rootfs time without checking static IDs, has been completely replaced by systemd_sysusers_check. The new function does NOT create users/groups — it only validates that users/groups defined in sysusers.d/*.conf already exist in /etc/passwd and /etc/group with consistent properties.

Static IDs are now enforced by useradd-staticids.bbclass at recipe parse time, before any user creation occurs. The rootfs postprocess step just verifies consistency afterward.

A follow-up commit 2a700c3102 (2023-12-27) further relaxed the check to ignore comment mismatches.

This bug can be marked as RESOLVED/FIXED.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106040</commentid>
    <comment_count>9</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2026-06-29 14:07:48 +0000</bug_when>
    <thetext>As per Himani&apos;s comment. 

Stephano, re-open if you disagree.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>