<?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>16321</bug_id>
          
          <creation_ts>2026-06-18 09:17:06 +0000</creation_ts>
          <short_desc>Enabling `pam-wheel` does not allow add wheel to sudoers</short_desc>
          <delta_ts>2026-07-03 11:14:33 +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>oe-core other</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>6.1 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Nate Kent">yocto</reporter>
          <assigned_to name="Siva Balasubramanian">sivakumar.bs</assigned_to>
          <cc>ccasciato</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>sivakumar.bs</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>105909</commentid>
    <comment_count>0</comment_count>
    <who name="Nate Kent">yocto</who>
    <bug_when>2026-06-18 09:17:06 +0000</bug_when>
    <thetext>On the current master branch [1], OE-core uses a sed operation in order to add the wheel group to the sudoers file when DISTRO_FEATURES contains pam and PACKAGECONFIG contains pam-wheel [2]. This line searches for &apos;wheel ALL=(ALL) ALL` but the sudoers file in sudo version 1.9.17p2 does not contain that line, instead it has &apos;wheel ALL=(ALL:ALL) ALL&apos; [3]. The sed fails to produce the substitute and the group is not given sudo permissions.



[1]: c2b1410faa150384562bada22c1c8f7c944c7951 at the time of writing
[2]: meta/recipes-extended/sudo/sudo_1.9.17p2.bb:40
[3]: plugins/sudoers/sudoers.in</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105926</commentid>
    <comment_count>1</comment_count>
    <who name="Siva Balasubramanian">sivakumar.bs</who>
    <bug_when>2026-06-18 11:22:52 +0000</bug_when>
    <thetext>I independently hit this and posted a fix before noticing Nate had already sent one. Both patches are on the oe-core list and the code change is identical:
  
  - sed -i &apos;s/# \(%wheel ALL=(ALL) ALL\)/\1/&apos; ${D}${sysconfdir}/sudoers
  + sed -i &apos;s/# \(%wheel ALL=(ALL:ALL) ALL\)/\1/&apos; ${D}${sysconfdir}/sudoers

  - Nate Kent&apos;s patch: https://patchwork.yoctoproject.org/project/oe-core/patch/20260618102839.363123-1-nathan@otiv.ai/
  - My patch: https://patchwork.yoctoproject.org/project/oe-core/patch/20260618110111.3484982-1-sivakumar.bs@gmail.com/

I verified the fix with a real build (DISTRO_FEATURES += &quot;pam&quot;, PACKAGECONFIG:pn-sudo += &quot;pam-wheel&quot;): with the old pattern /etc/sudoers keeps # %wheel ALL=(ALL:ALL) ALL commented (bug reproduced), and with the fix it becomes %wheel 
  ALL=(ALL:ALL) ALL uncommented while the separate # %wheel ALL=(ALL:ALL) NOPASSWD: ALL line is correctly left commented. I&apos;ve added Tested-by on Nate&apos;s patch.

No need for two competing patches — happy for either to land.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106094</commentid>
    <comment_count>2</comment_count>
    <who name="Siva Balasubramanian">sivakumar.bs</who>
    <bug_when>2026-07-03 11:14:33 +0000</bug_when>
    <thetext>https://git.openembedded.org/openembedded-core/commit/?id=76231f202a437be221c2580d4fa0fc100c453e92</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>