<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Incorrect permissions for the “sudo” command in 6.12.20 in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Incorrect-permissions-for-the-sudo-command-in-6-12-20/m-p/2321433#M244141</link>
    <description>&lt;P&gt;I understand, please try to add to your local.conf&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;EXTRA_IMAGE_FEATURES += "allow-setuid"&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Feb 2026 18:20:17 GMT</pubDate>
    <dc:creator>Oswalag</dc:creator>
    <dc:date>2026-02-23T18:20:17Z</dc:date>
    <item>
      <title>Incorrect permissions for the “sudo” command in 6.12.20</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Incorrect-permissions-for-the-sudo-command-in-6-12-20/m-p/2306097#M243832</link>
      <description>&lt;P&gt;Hello community,&lt;/P&gt;&lt;P&gt;I have tried to change the user rights management of the Linux system I am using.&lt;BR /&gt;Instead of using root, I would like to add two new users. One as a “normal” user and one as a “sudo” user.&lt;/P&gt;&lt;P&gt;To solve this, I added the following lines to my local.conf:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;inherit extrausers
EXTRA_USERS_PARAMS = "\
    useradd -M -N -G sudo -p 'test01' sudo_user; \
    useradd -M -N -G users -p 'test02' normal_user; \
    "&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This seems to work, as the users are listed in /etc/passwd and /etc/shadow.&lt;/P&gt;&lt;P&gt;To execute root commands, I also need the sudo command. To include this in my package, I added the following to local.conf:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;IMAGE_INSTALL:append = " sudo"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This installs the sudo command in my package, but the permissions are incorrect and result in the following output:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To solve this problem, I can change the permissions in the running system as follows:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;chown root:root /usr/bin/sudo
chmod 4755 /usr/bin/sudo&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I need this directly as bitbake output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have any idea what I might have overlooked?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using Linux 6.12.20 for an iMX8M Mini based on the DDR4 EVK and the Bitbake image "fsl-image-machine-test".&lt;/P&gt;&lt;P&gt;The image “imx-image-multimedia” already includes sudo, but the permissions appear to be the same.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Feb 2026 10:30:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Incorrect-permissions-for-the-sudo-command-in-6-12-20/m-p/2306097#M243832</guid>
      <dc:creator>cedric_starke</dc:creator>
      <dc:date>2026-02-04T10:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect permissions for the “sudo” command in 6.12.20</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Incorrect-permissions-for-the-sudo-command-in-6-12-20/m-p/2314045#M243905</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Please check the link below:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://unix.stackexchange.com/questions/375433/etc-sudoers-vs-etc-sudoers-d-file-for-enabling-sudo-for-a-user" target="_blank"&gt;https://unix.stackexchange.com/questions/375433/etc-sudoers-vs-etc-sudoers-d-file-for-enabling-sudo-for-a-user&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Feb 2026 03:33:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Incorrect-permissions-for-the-sudo-command-in-6-12-20/m-p/2314045#M243905</guid>
      <dc:creator>Oswalag</dc:creator>
      <dc:date>2026-02-07T03:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect permissions for the “sudo” command in 6.12.20</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Incorrect-permissions-for-the-sudo-command-in-6-12-20/m-p/2314370#M243917</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/199933"&gt;@Oswalag&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thanks for your reply, but the link has nothing to do with my problem.&lt;/P&gt;&lt;P&gt;I didn't mention in my question that I had already decided to change the sudoers file and comment out the line:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# %sudo ALL=(ALL) ALL&lt;/LI-CODE&gt;&lt;P&gt;So my sudo user could run sudo IF the sudo command itself had the correct permissions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, after the YOCTO build, the sudo command shows me the following permissions:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;---x--x--x 1 root root 334976 Mar  9  2018 /usr/bin/sudo&lt;/LI-CODE&gt;&lt;P&gt;To run it as a member of the sudo group, the following is required:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;-rwsr-xr-x 1 root root 334976 Mar  9  2018 /bin/sudo&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any thoughts on this point&lt;/P&gt;</description>
      <pubDate>Mon, 09 Feb 2026 05:53:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Incorrect-permissions-for-the-sudo-command-in-6-12-20/m-p/2314370#M243917</guid>
      <dc:creator>cedric_starke</dc:creator>
      <dc:date>2026-02-09T05:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect permissions for the “sudo” command in 6.12.20</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Incorrect-permissions-for-the-sudo-command-in-6-12-20/m-p/2321433#M244141</link>
      <description>&lt;P&gt;I understand, please try to add to your local.conf&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;EXTRA_IMAGE_FEATURES += "allow-setuid"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Feb 2026 18:20:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Incorrect-permissions-for-the-sudo-command-in-6-12-20/m-p/2321433#M244141</guid>
      <dc:creator>Oswalag</dc:creator>
      <dc:date>2026-02-23T18:20:17Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect permissions for the “sudo” command in 6.12.20</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Incorrect-permissions-for-the-sudo-command-in-6-12-20/m-p/2343496#M244719</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/199933"&gt;@Oswalag&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thanks for your reply, but when I run “bitbake”, with this option, I get an error.&lt;/P&gt;&lt;P&gt;In the end, I solved the problem by using a “bbappend” in my own layer, as shown in this example:&lt;BR /&gt;&lt;A href="https://github.com/stromerbike/meta-medusa-dist/blob/master/recipes-extended/sudo/sudo_%25.bbappend" target="_blank"&gt;https://github.com/stromerbike/meta-medusa-dist/blob/master/recipes-extended/sudo/sudo_%25.bbappend&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe this will help someone else.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Apr 2026 08:03:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Incorrect-permissions-for-the-sudo-command-in-6-12-20/m-p/2343496#M244719</guid>
      <dc:creator>cedric_starke</dc:creator>
      <dc:date>2026-04-01T08:03:38Z</dc:date>
    </item>
  </channel>
</rss>

