<?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>15799</bug_id>
          
          <creation_ts>2025-03-17 17:39:46 +0000</creation_ts>
          <short_desc>Add default non-root user (e.g. &quot;admin&quot;)</short_desc>
          <delta_ts>2026-05-28 13:17:57 +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>5.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>6.1 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tim Orling">tim.orling</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>ccasciato</cc>
    
    <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>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>101392</commentid>
    <comment_count>0</comment_count>
      <attachid>5107</attachid>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2025-03-17 17:39:46 +0000</bug_when>
    <thetext>Created attachment 5107
admin-user_1.0.bb: an example &quot;admin&quot; user with &quot;sudo&quot; privileges

For a more secure baseline, we should really not be logging in as root at all. Instead, we should use a non-root user with &apos;sudo&apos; privileges. I have attached a stripped down version of recipe that I use.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101434</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-03-20 14:38:04 +0000</bug_when>
    <thetext>Currently tied to systemd and has some other minor issues.
We may also want to run the ptest as the admin user so there&apos;s more work to do.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101436</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2025-03-20 14:42:42 +0000</bug_when>
    <thetext>Generally, sudo with no password is also considered a security flaw, so ptest would need to use a default password.

The systemd-journal group allows you to see dmesg and journald without using sudo, but needs to be gated on whether &apos;systemd&apos; is in DISTRO_FEATURES.

In practice, we are also using user-staticids, but I am not sure that should be added to a base image (you provide /etc/passwd and /etc/group to ensure all uid and gid are static/known).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101439</commentid>
    <comment_count>3</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2025-03-20 14:56:52 +0000</bug_when>
    <thetext>sudo with no password, but limited access to commands could be an option for ptest. We could have a dedicated ptest user.

Concept (/etc/sudoers.d/ptest):

# Add commands that the &apos;ptest&apos; user is allowed to run without a sudo password
Cmnd_Alias PTEST_CMDS=/some/restricted/command /some/other/resistricted/command

%ptest ALL=(ALL:ALL) NOPASSWORD: PTEST_CMDS</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101442</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2025-03-20 15:00:47 +0000</bug_when>
    <thetext>The ptest-runner recipe already has a user for ptests, we &quot;just&quot; need to use it in oeqa.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105633</commentid>
    <comment_count>5</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2026-05-28 13:17:57 +0000</bug_when>
    <thetext>Bulk move of unassigned 6.0-M* bugs to 6.1-M2.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>5107</attachid>
            <date>2025-03-17 17:39:46 +0000</date>
            <delta_ts>2025-03-17 17:39:46 +0000</delta_ts>
            <desc>admin-user_1.0.bb: an example &quot;admin&quot; user with &quot;sudo&quot; privileges</desc>
            <filename>admin-user_1.0.bb</filename>
            <type>text/plain</type>
            <size>1495</size>
            <attacher name="Tim Orling">tim.orling</attacher>
            
              <data encoding="base64">U1VNTUFSWSA9ICJBZG1pbmlzdHJhdGl2ZSB1c2VyIgpERVNDUklQVElPTiA9ICJTdGFydCBmcm9t
IGEgcG9zaXRpb24gb2YgbGVhc3QgcHJpdmlsZWdlcywgbm8gcm9vdCB1c2VyIFwKYWNjZXNzLiBJ
bnN0ZWFkIHVzZSBhZG1pbiB1c2VyIGFuZCBzdWRvLiIKTElDRU5TRSA9ICJNSVQiCkxJQ19GSUxF
U19DSEtTVU0gPSAiZmlsZTovLyR7Q09SRUJBU0V9L21ldGEvQ09QWUlORy5NSVQ7bWQ1PTNkYTlj
ZmJjYjc4OGM4MGEwMzg0MzYxYjRkZTIwNDIwIgoKCiMgUmVjaXBlcyB0aGF0IGRlZmluZSB0aGUg
Z3JvdXAocykgdGhpcyB1c2VyCiMgaXMgbWVtYmVyIG9mIChzdWRvKQpVU0VSQUREX0RFUEVORFMg
PSAic3VkbyIKVVNFUkFERF9QQUNLQUdFUyA9ICIke1BOfSIKCmluaGVyaXQgdXNlcmFkZAoKREVQ
RU5EUyArPSAib3BlbnNzbC1uYXRpdmUiCgpkb19pbnN0YWxsKCkgewogICAgIyBCZSBjZXJ0YWlu
IHRoaXMgbWF0Y2hlcyB3aGF0IHN1ZG8gcmVjaXBlIHNldHMgdG8gYXZvaWQgY29uZmxpY3QKICAg
IGluc3RhbGwgLWQgLW0gMDc1MCAke0R9JHtzeXNjb25mZGlyfS9zdWRvZXJzLmQKICAgICMgVG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