<?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>11043</bug_id>
          
          <creation_ts>2017-02-10 11:28:02 +0000</creation_ts>
          <short_desc>inconsistent shadow backup files</short_desc>
          <delta_ts>2018-12-04 08:12:04 +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>devtools / tool chain</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.7</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Patrick Ohly">patrick.ohly</reporter>
          <assigned_to name="Changqing Li">changqing.li</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>ross.burton</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>70616</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-02-10 11:28:02 +0000</bug_when>
    <thetext>In bug #11007 it was found that removing a user during the rootfs construction leads to a /etc/shadow- file with a &quot;games&quot; entry that does not exit in the corresponding /etc/passwd-.

This looks like a bug in the &quot;shadow&quot; scripts which create these backup files.
It is not relevant for rootfs construction (the solution for #11007 will be to remove the backup files), but might hint towards something that could have bigger impact elsewhere (runtime?) and thus should be investigated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70653</commentid>
    <comment_count>1</comment_count>
    <who name="Maxin B. John">maxin.john</who>
    <bug_when>2017-02-13 09:18:21 +0000</bug_when>
    <thetext>password related backup files created (from shadow-utils) during image build time, should not be present in the final image. Ideally, we should delete those files and run &quot;pwck&quot; and &quot;grpck&quot; during image creation time to verify the integrity of password and group files.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70654</commentid>
    <comment_count>2</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-02-13 10:02:13 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; password related backup files created (from shadow-utils) during image build
&gt; time, should not be present in the final image. Ideally, we should delete
&gt; those files

I&apos;m doing that now as solution for bug #11007 (patch pending). However, this bug here is about the code which led to the inconsistent backup files in the first place - IMHO that shouldn&apos;t have happened.

&gt; and run &quot;pwck&quot; and &quot;grpck&quot; during image creation time to verify
&gt; the integrity of password and group files.

Sounds like a useful QA check.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72665</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-04-19 15:51:31 +0000</bug_when>
    <thetext>The patch to remove backup files was merged in OE-Core e5628c80a52f3caeea9d9dc7f67d1b8a61222aef.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77570</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-10-13 15:56:33 +0000</bug_when>
    <thetext>Reassigning to 2.5M2.  Removing the files at rootfs time means they&apos;re not inconsistant but something was writing the bad files in the first place...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81909</commentid>
    <comment_count>5</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2018-10-18 15:15:25 +0000</bug_when>
    <thetext>@changqing, First step is to check if there are oeqa stress tests for adding/removing users/groups. We were going to just delete this defect since people think that everything works well now but I&apos;d like to be 100% sure that things are solid. I&apos;m sure Ross will have some ideas about how to test as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82171</commentid>
    <comment_count>6</comment_count>
    <who name="Changqing Li">changqing.li</who>
    <bug_when>2018-11-12 09:43:01 +0000</bug_when>
    <thetext>@Randy, I checked current test cases, there is no testcase that designed to test
adding/removing users/groups. only have 2 testcase under selftest,  which designed to test ssh with/without passwd, during test, use useradd and usermod. (see imagefeatures.py)

And I retest Bug11007 today, even I revert commit e5628c80a52f3caeea9d9dc7f67d1b8a61222aef, I can build success, and after boot,
I checked passwd- and shadow- both don&apos;t have account games.


I think maybe we can close this defect and open a new enhancement defect for 
add testcases to test adding/removing users/groups. Maybe Ross  can comments
his idea about the testcases in the new enhacement defect.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82390</commentid>
    <comment_count>7</comment_count>
    <who name="Changqing Li">changqing.li</who>
    <bug_when>2018-12-04 08:12:04 +0000</bug_when>
    <thetext>cannot reproduce bug 11007 event revert commit e5628c80a52f3caeea9d9dc7f67d1b8a61222aef</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>