How to prevent non-root users from using su command?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to prevent non-root users from using su command?

跳至解决方案
4,707 次查看
TammyTsai
Contributor III

Hi NXP team,

I try to create a custom layer to change su permission.

The folder structure as shown below.

meta-custom/

├── conf

│      └── layer.conf

├── recipes-core

│      └── change-su-permissions

│              ├── change-su-permissions.bb

│              └── files

The content of change-su-permissions.bb is as follows.

 

 

 

SUMMARY = "Change permissions for su command"
LICENSE = "CLOSED"
PR = "r0"

do_install() {
    install -d ${D}${bindir}
    install -m 4750 ${WORKDIR}/rootfs/bin/su.shadow ${D}/bin/su.shadow
}

FILES_${PN} = "${bindir}/su"

 

The content of layer.conf is as follows.

 

# We have a conf and classes directory, add to BBPATH
BBPATH := "${BBPATH}:${LAYERDIR}"

# We have recipes-* directories, add to BBFILES
BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"

BBFILE_COLLECTIONS += "change-su-permissions"
BBFILE_PATTERN_change-su-permissions := "^${LAYERDIR}/"
BBFILE_PRIORITY_change-su-permissions = "6"

 

The custom layer is also included in build/conf/bblayers.conf file.

 

LCONF_VERSION = "7"

BBPATH = "${TOPDIR}"
BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) + '/../..')}"

BBFILES ?= ""
BBLAYERS = " \
  ${BSPDIR}/sources/poky/meta \
  ${BSPDIR}/sources/poky/meta-poky \
  \
  ${BSPDIR}/sources/meta-openembedded/meta-oe \
  ${BSPDIR}/sources/meta-openembedded/meta-multimedia \
  \
  ${BSPDIR}/sources/meta-freescale \
  ${BSPDIR}/sources/meta-freescale-3rdparty \
  ${BSPDIR}/sources/meta-freescale-distro \
  ${BSPDIR}/sources/meta-example \
  ${BSPDIR}/sources/meta-adduser \
  ${BSPDIR}/sources/meta-custom \
"

# i.MX Yocto Project Release layers
BBLAYERS += " ${BSPDIR}/sources/meta-fsl-bsp-release/imx/meta-bsp "
BBLAYERS += " ${BSPDIR}/sources/meta-fsl-bsp-release/imx/meta-sdk "

BBLAYERS += " ${BSPDIR}/sources/meta-browser "
BBLAYERS += " ${BSPDIR}/sources/meta-openembedded/meta-gnome "
BBLAYERS += " ${BSPDIR}/sources/meta-openembedded/meta-networking "
BBLAYERS += " ${BSPDIR}/sources/meta-openembedded/meta-python "
BBLAYERS += " ${BSPDIR}/sources/meta-openembedded/meta-filesystems "
BBLAYERS += " ${BSPDIR}/sources/meta-qt5 "

 

Update build/conf/local.conf.

 

IMAGE_INSTALL_append = ' change-su-permissions'

 

Some errors occured while performing "bitbake core-image-base" to create image .

Please see the attached file "core-image-base_error_log.txt" for more details.

The log shows the path of su.shadow is not correct.

| DEBUG: Executing shell function do_install
| install: cannot stat '/home/west/yocto/build/tmp/work/cortexa7hf-neon-poky-linux-gnueabi/change-su-permissions/1.0-r0/rootfs/bin/su.shadow': No such file or directory

My su.shadow is in the directory "/home/west/yocto/build/tmp/work/imx6ulevk-poky-linux-gnueabi/core-image-base/1.0-r0/rootfs/bin".

I run the following command and find out the ${WORKDIR} variable.

$ bitbake -e core-image-base > build-env.txt

$ grep "^WORKDIR=" build-env.txt

WORKDIR="/home/west/yocto/build/tmp/work/imx6ulevk-poky-linux-gnueabi/core-image-base/1.0-r0"

Why the path in the error message is not match ${WORKDIR}/rootfs/bin/su.shadow in the change-su-permissions.bb?

How to solve this problem?

If the way of creating a custom layer can't change su permission, please help me how to achieve this requirement.

Thanks.

标签 (3)
0 项奖励
回复
1 解答
4,467 次查看
TammyTsai
Contributor III

I add the below snippet of code to do_install() in the path /source/poky/meta/recipes-extended/shadow/shadow.inc.

chmod 4750 ${D}${bindir}/su

No normal user can use “su” after the above modification.

在原帖中查看解决方案

4 回复数
4,468 次查看
TammyTsai
Contributor III

I add the below snippet of code to do_install() in the path /source/poky/meta/recipes-extended/shadow/shadow.inc.

chmod 4750 ${D}${bindir}/su

No normal user can use “su” after the above modification.

4,576 次查看
TammyTsai
Contributor III

I can try the below commands to deny normal user su to root.

root@imx6ulevk:~# ls -l /bin/su*

lrwxrwxrwx 1 root root 14 Jun 21 18:47 /bin/su -> /bin/su.shadow
-rwsr-xr-x 1 root root 43628 May 6 2020 /bin/su.shadow

root@imx6ulevk:~# chmod 0750 /bin/su

root@imx6ulevk:~# ls -l /bin/su*

lrwxrwxrwx 1 root root 14 Jun 20 15:43 su -> /bin/su.shadow
-rwxr-x--- 1 root root 43628 May 6 2020 su.shadow

root@imx6ulevk:~#  su ap

ap@imx6ulevk:/bin$ su

-sh: su: Permission denied

I want to set the permission of su in the same way under core-image-base image instead of console mode.

 

0 项奖励
回复
4,620 次查看
TammyTsai
Contributor III

Hello @Manuel_Salas ,

Thanks for your reply.

There is no /etc/sudoers file in my i.MX6UL project.

I can't use sudo but only su.

How to set the permission of su?

 

Best regards,

Tammy

 

0 项奖励
回复
4,678 次查看
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello, 

You can look this post, there is explained how to add users and manage the privileges in a Yocto environment using layers.

 

Best regards,

--... ...--

Salas.

0 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-1893586%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%A6%82%E4%BD%95%E9%98%B2%E6%AD%A2%E9%9D%9Eroot%E7%94%A8%E6%88%B7%E4%BD%BF%E7%94%A8su%E5%91%BD%E4%BB%A4%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1893586%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3E%E6%82%A8%E5%A5%BD%EF%BC%8CNXP%E5%9B%A2%E9%98%9F%EF%BC%9A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%E6%88%91%E5%B0%9D%E8%AF%95%E5%88%9B%E5%BB%BA%E4%B8%80%E4%B8%AA%E8%87%AA%E5%AE%9A%E4%B9%89%E5%B1%82%E6%9D%A5%E6%9B%B4%E6%94%B9%20su%20%E6%9D%83%E9%99%90%E3%80%82%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%E6%96%87%E4%BB%B6%E5%A4%B9%E7%BB%93%E6%9E%84%E5%A6%82%E4%B8%8B%E5%9B%BE%E6%89%80%E7%A4%BA%E3%80%82%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Emeta-%3CSPAN%20class%3D%22%22%3Ecustom%3C%2FSPAN%3E%2F%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%E2%94%9C%E2%94%80%E2%94%80%20conf%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%E2%94%82%20%E2%94%94%E2%94%80%E2%94%80%20layer.conf%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%E2%94%80%E2%94%80%E2%94%80%20%E9%A3%9F%E8%B0%B1%E6%A0%B8%E5%BF%83%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%E2%94%82%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%E2%94%94%E2%94%80%E2%94%80%20change-su-permissions%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%E2%94%82%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%E2%94%9C%E2%94%80%E2%94%80%20change-su-permissions.bb%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%E2%94%82%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%E2%94%94%E2%94%80%E2%94%80%20files%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Echange-su-permissions.bb%E7%9A%84%E5%86%85%E5%AE%B9%E5%A6%82%E4%B8%8B%E3%80%82%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CPRE%20class%3D%22lia-code-sample%20language-python%22%3E%3CCODE%20translate%3D%22no%22%3ESUMMARY%20%3D%20%22Change%20permissions%20for%20su%20command%22%0ALICENSE%20%3D%20%22CLOSED%22%0APR%20%3D%20%22r0%22%0A%0Ado_install()%20%7B%0A%20%20%20%20install%20-d%20%24%7BD%7D%24%7Bbindir%7D%0A%20%20%20%20install%20-m%204750%20%24%7BWORKDIR%7D%2Frootfs%2Fbin%2Fsu.shadow%20%24%7BD%7D%2Fbin%2Fsu.shadow%0A%7D%0A%0AFILES_%24%7BPN%7D%20%3D%20%22%24%7Bbindir%7D%2Fsu%22%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3Elayer.conf%E7%9A%84%E5%86%85%E5%AE%B9%E5%A6%82%E4%B8%8B%E3%80%82%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CPRE%20class%3D%22lia-code-sample%20language-python%22%3E%3CCODE%20translate%3D%22no%22%3E%23%20We%20have%20a%20conf%20and%20classes%20directory%2C%20add%20to%20BBPATH%0ABBPATH%20%3A%3D%20%22%24%7BBBPATH%7D%3A%24%7BLAYERDIR%7D%22%0A%0A%23%20We%20have%20recipes-*%20directories%2C%20add%20to%20BBFILES%0ABBFILES%20%3A%3D%20%22%24%7BBBFILES%7D%20%24%7BLAYERDIR%7D%2Frecipes-*%2F*%2F*.bb%20%24%7BLAYERDIR%7D%2Frecipes-*%2F*%2F*.bbappend%22%0A%0ABBFILE_COLLECTIONS%20%2B%3D%20%22change-su-permissions%22%0ABBFILE_PATTERN_change-su-permissions%20%3A%3D%20%22%5E%24%7BLAYERDIR%7D%2F%22%0ABBFILE_PRIORITY_change-su-permissions%20%3D%20%226%22%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3E%E8%87%AA%E5%AE%9A%E4%B9%89%E5%B1%82%E4%B9%9F%E5%8C%85%E5%90%AB%E5%9C%A8%3CSPAN%3Ebuild%2Fconf%2Fbblayers.conf%20%E6%96%87%E4%BB%B6%E4%B8%AD%E3%80%82%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CPRE%20class%3D%22lia-code-sample%20language-python%22%3E%3CCODE%20translate%3D%22no%22%3ELCONF_VERSION%20%3D%20%227%22%0A%0ABBPATH%20%3D%20%22%24%7BTOPDIR%7D%22%0ABSPDIR%20%3A%3D%20%22%24%7B%40os.path.abspath(os.path.dirname(d.getVar('FILE'%2C%20True))%20%2B%20'%2F..%2F..')%7D%22%0A%0ABBFILES%20%3F%3D%20%22%22%0ABBLAYERS%20%3D%20%22%20%5C%0A%20%20%24%7BBSPDIR%7D%2Fsources%2Fpoky%2Fmeta%20%5C%0A%20%20%24%7BBSPDIR%7D%2Fsources%2Fpoky%2Fmeta-poky%20%5C%0A%20%20%5C%0A%20%20%24%7BBSPDIR%7D%2Fsources%2Fmeta-openembedded%2Fmeta-oe%20%5C%0A%20%20%24%7BBSPDIR%7D%2Fsources%2Fmeta-openembedded%2Fmeta-multimedia%20%5C%0A%20%20%5C%0A%20%20%24%7BBSPDIR%7D%2Fsources%2Fmeta-freescale%20%5C%0A%20%20%24%7BBSPDIR%7D%2Fsources%2Fmeta-freescale-3rdparty%20%5C%0A%20%20%24%7BBSPDIR%7D%2Fsources%2Fmeta-freescale-distro%20%5C%0A%20%20%24%7BBSPDIR%7D%2Fsources%2Fmeta-example%20%5C%0A%20%20%24%7BBSPDIR%7D%2Fsources%2Fmeta-adduser%20%5C%0A%20%20%24%7BBSPDIR%7D%2Fsources%2Fmeta-custom%20%5C%0A%22%0A%0A%23%20i.MX%20Yocto%20Project%20Release%20layers%0ABBLAYERS%20%2B%3D%20%22%20%24%7BBSPDIR%7D%2Fsources%2Fmeta-fsl-bsp-release%2Fimx%2Fmeta-bsp%20%22%0ABBLAYERS%20%2B%3D%20%22%20%24%7BBSPDIR%7D%2Fsources%2Fmeta-fsl-bsp-release%2Fimx%2Fmeta-sdk%20%22%0A%0ABBLAYERS%20%2B%3D%20%22%20%24%7BBSPDIR%7D%2Fsources%2Fmeta-browser%20%22%0ABBLAYERS%20%2B%3D%20%22%20%24%7BBSPDIR%7D%2Fsources%2Fmeta-openembedded%2Fmeta-gnome%20%22%0ABBLAYERS%20%2B%3D%20%22%20%24%7BBSPDIR%7D%2Fsources%2Fmeta-openembedded%2Fmeta-networking%20%22%0ABBLAYERS%20%2B%3D%20%22%20%24%7BBSPDIR%7D%2Fsources%2Fmeta-openembedded%2Fmeta-python%20%22%0ABBLAYERS%20%2B%3D%20%22%20%24%7BBSPDIR%7D%2Fsources%2Fmeta-openembedded%2Fmeta-filesystems%20%22%0ABBLAYERS%20%2B%3D%20%22%20%24%7BBSPDIR%7D%2Fsources%2Fmeta-qt5%20%22%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3E%E6%9B%B4%E6%96%B0%20build%2Fconf%2Flocal.conf%E3%80%82%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CPRE%20class%3D%22lia-code-sample%20language-python%22%3E%3CCODE%20translate%3D%22no%22%3EIMAGE_INSTALL_append%20%3D%20'%20change-su-permissions'%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3E%E6%89%A7%E8%A1%8C%E2%80%9Cbitbake%20core-image-base%E2%80%9D%E5%88%9B%E5%BB%BA%E5%9B%BE%E5%83%8F%E6%97%B6%E5%87%BA%E7%8E%B0%E4%B8%80%E4%BA%9B%E9%94%99%E8%AF%AF%E3%80%82%3C%2FP%3E%3CP%3E%E8%AF%B7%E5%8F%82%E9%98%85%E9%99%84%E4%BB%B6%E2%80%9Ccore-image-base_error_log.txt%E2%80%9D%E4%BA%86%E8%A7%A3%E6%9B%B4%E5%A4%9A%E8%AF%A6%E7%BB%86%E4%BF%A1%E6%81%AF%E3%80%82%3C%2FP%3E%3CP%3E%E6%97%A5%E5%BF%97%E6%98%BE%E7%A4%BAsu.shadow%E7%9A%84%E8%B7%AF%E5%BE%84%E4%B8%8D%E6%AD%A3%E7%A1%AE%E3%80%82%3C%2FP%3E%3CBLOCKQUOTE%3E%3CP%3E%7C%20%E8%B0%83%E8%AF%95%EF%BC%9A%E6%89%A7%E8%A1%8C%20shell%20%E5%87%BD%E6%95%B0%20do_install%3CBR%20%2F%3E%20%7C%20%E5%AE%89%E8%A3%85%EF%BC%9A%3CFONT%20color%3D%22%23FF0000%22%3E%E6%97%A0%E6%B3%95%E7%BB%9F%E8%AE%A1'%2Fhome%2Fwest%2Fyocto%2Fbuild%2Ftmp%2Fwork%2Fcortexa7hf-neon-poky-linux-gnueabi%2Fchange-su-permissions%2F1.0-r0%2Frootfs%2Fbin%2Fsu.shadow'%EF%BC%9A%E6%B2%A1%E6%9C%89%E8%BF%99%E6%A0%B7%E7%9A%84%E6%96%87%E4%BB%B6%E6%88%96%E7%9B%AE%E5%BD%95%3C%2FFONT%3E%3C%2FP%3E%3C%2FBLOCKQUOTE%3E%3CP%3E%E6%88%91%E7%9A%84%20su.shadow%20%E4%BD%8D%E4%BA%8E%E7%9B%AE%E5%BD%95%E2%80%9C%2Fhome%2Fwest%2Fyocto%2Fbuild%2Ftmp%2Fwork%2Fimx6ulevk-poky-linux-gnueabi%2Fcore-image-base%2F1.0-r0%2Frootfs%2Fbin%E2%80%9D%E4%B8%AD%E3%80%82%3C%2FP%3E%3CP%3E%E6%88%91%E8%BF%90%E8%A1%8C%E4%BB%A5%E4%B8%8B%E5%91%BD%E4%BB%A4%E5%B9%B6%E6%89%BE%E5%87%BA%24%7BWORKDIR%7D%E5%8F%98%E9%87%8F%E3%80%82%3C%2FP%3E%3CBLOCKQUOTE%3E%3CP%3E%24%20bitbake%20-e%20core-image-base%20%26gt%3B%20build-env.txt%3C%2FP%3E%3CP%3E%24%20grep%E2%80%9C%5E%20WORKDIR%20%3D%E2%80%9Dbuild-env.txt%3C%2FP%3E%3CP%3EWORKDIR%3D%22%2Fhome%2Fwest%2Fyocto%2Fbuild%2Ftmp%2Fwork%2Fimx6ulevk-poky-linux-gnueabi%2Fcore-image-base%2F1.0-r0%22%3C%2FP%3E%3C%2FBLOCKQUOTE%3E%3CP%3E%E4%B8%BA%E4%BB%80%E4%B9%88%E9%94%99%E8%AF%AF%E4%BF%A1%E6%81%AF%E4%B8%AD%E7%9A%84%E8%B7%AF%E5%BE%84%E4%B8%8Echange-su-permissions.bb%E4%B8%AD%E7%9A%84%24%7BWORKDIR%7D%20%2Frootfs%2Fbin%2Fsu.shadow%E4%B8%8D%E5%8C%B9%E9%85%8D%3CSPAN%3E%EF%BC%9F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%E5%A6%82%E4%BD%95%E8%A7%A3%E5%86%B3%E8%BF%99%E4%B8%AA%E9%97%AE%E9%A2%98%EF%BC%9F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%E5%A6%82%E6%9E%9C%E5%88%9B%E5%BB%BA%E8%87%AA%E5%AE%9A%E4%B9%89%E5%B1%82%E7%9A%84%E6%96%B9%E5%BC%8F%E6%97%A0%E6%B3%95%E6%94%B9%E5%8F%98su%E6%9D%83%E9%99%90%EF%BC%8C%E8%AF%B7%E5%B8%AE%E6%88%91%E5%A6%82%E4%BD%95%E5%AE%9E%E7%8E%B0%E8%BF%99%E4%B8%AA%E8%A6%81%E6%B1%82%E3%80%82%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%E8%B0%A2%E8%B0%A2%E3%80%82%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1893586%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MX6UL%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELinux%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EYocto%20Project%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1898182%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E5%A6%82%E4%BD%95%E9%98%B2%E6%AD%A2%E9%9D%9E%20root%20%E7%94%A8%E6%88%B7%E4%BD%BF%E7%94%A8%20su%20%E5%91%BD%E4%BB%A4%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1898182%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%88%91%E5%B0%86%E4%BB%A5%E4%B8%8B%E4%BB%A3%E7%A0%81%E7%89%87%E6%AE%B5%E6%B7%BB%E5%8A%A0%E5%88%B0%E8%B7%AF%E5%BE%84%20%2Fsource%2Fpoky%2Fmeta%2Frecipes-extended%2Fshadow%2Fshadow.inc%20%E4%B8%AD%E7%9A%84%20do_install()%E3%80%82%3C%2FP%3E%3CBLOCKQUOTE%3E%3CP%3Echmod%204750%20%24%7BD%7D%24%7Bbindir%7D%2Fsu%3C%2FP%3E%3C%2FBLOCKQUOTE%3E%3CP%3E%E7%BB%8F%E8%BF%87%E4%B8%8A%E8%BF%B0%E4%BF%AE%E6%94%B9%E5%90%8E%EF%BC%8C%E6%99%AE%E9%80%9A%E7%94%A8%E6%88%B7%E5%B0%86%E6%97%A0%E6%B3%95%E4%BD%BF%E7%94%A8%E2%80%9Csu%E2%80%9D%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1894249%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E5%A6%82%E4%BD%95%E9%98%B2%E6%AD%A2%E9%9D%9E%20root%20%E7%94%A8%E6%88%B7%E4%BD%BF%E7%94%A8%20su%20%E5%91%BD%E4%BB%A4%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1894249%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%88%91%E5%8F%AF%E4%BB%A5%E5%B0%9D%E8%AF%95%E4%BB%A5%E4%B8%8B%E5%91%BD%E4%BB%A4%E6%9D%A5%E6%8B%92%E7%BB%9D%E6%99%AE%E9%80%9A%E7%94%A8%E6%88%B7%20su%20%E4%B8%BA%20root%E3%80%82%3C%2FP%3E%3CBLOCKQUOTE%3E%3CP%3Eroot%40imx6ulevk%3A~%23%26nbsp%3Bls%20-l%20%2Fbin%2Fsu*%3C%2FP%3E%3CP%3Elrwxrwxrwx%201%20root%20root%2014%20Jun%2021%2018%3A47%20%2Fbin%2Fsu%20-%26gt%3B%20%2Fbin%2Fsu.shadow%3CBR%20%2F%3E-rwsr-xr-x%201%20root%20root%2043628%202020%E5%B9%B45%E6%9C%886%E6%97%A5%20%2Fbin%2Fsu.shadow%3C%2FP%3E%3CP%3Eroot%40imx6ulevk%3A~%23%20chmod%200750%20%2Fbin%2Fsu%3C%2FP%3E%3CP%3Eroot%40imx6ulevk%3A~%23%26nbsp%3Bls%20-l%20%2Fbin%2Fsu*%3C%2FP%3E%3CP%3Elrwxrwxrwx%201%20root%20root%2014%20Jun%2020%2015%3A43%20su%20-%26gt%3B%20%2Fbin%2Fsu.shadow%3CBR%20%2F%3E-rwxr-x---%201%20root%20root%2043628%202020%E5%B9%B45%E6%9C%886%E6%97%A5%20su.shadow%3C%2FP%3E%3CP%3Eroot%40imx6ulevk%3A~%23%26nbsp%3B%26nbsp%3Bsu%20ap%3C%2FP%3E%3CP%3Eap%40imx6ulevk%3A%2Fbin%24%20su%3C%2FP%3E%3CP%3E-sh%3Asu%3A%E6%9D%83%E9%99%90%E8%A2%AB%E6%8B%92%E7%BB%9D%3C%2FP%3E%3C%2FBLOCKQUOTE%3E%3CP%3E%E6%88%91%E6%83%B3%E5%9C%A8%20core-image-base%20%E6%98%A0%E5%83%8F%E4%B8%8B%E8%80%8C%E4%B8%8D%E6%98%AF%E6%8E%A7%E5%88%B6%E5%8F%B0%E6%A8%A1%E5%BC%8F%E4%B8%8B%E4%BB%A5%E7%9B%B8%E5%90%8C%E7%9A%84%E6%96%B9%E5%BC%8F%E8%AE%BE%E7%BD%AE%20su%20%E7%9A%84%E6%9D%83%E9%99%90%E3%80%82%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1894083%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E5%A6%82%E4%BD%95%E9%98%B2%E6%AD%A2%E9%9D%9E%20root%20%E7%94%A8%E6%88%B7%E4%BD%BF%E7%94%A8%20su%20%E5%91%BD%E4%BB%A4%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1894083%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F203368%22%20target%3D%22_blank%22%3E%40Manuel_Salas%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3E%E6%84%9F%E8%B0%A2%E6%82%A8%E7%9A%84%E5%9B%9E%E5%A4%8D%E3%80%82%3C%2FP%3E%3CP%3E%E6%88%91%E7%9A%84%20i.MX6UL%20%E9%A1%B9%E7%9B%AE%E4%B8%AD%E6%B2%A1%E6%9C%89%20%2Fetc%2Fsudoers%20%E6%96%87%E4%BB%B6%E3%80%82%3C%2FP%3E%3CP%3E%E6%88%91%E4%B8%8D%E8%83%BD%E4%BD%BF%E7%94%A8%20sudo%EF%BC%8C%E5%8F%AA%E8%83%BD%E4%BD%BF%E7%94%A8%20su%E3%80%82%3C%2FP%3E%3CP%3Esu%E7%9A%84%E6%9D%83%E9%99%90%E5%A6%82%E4%BD%95%E8%AE%BE%E7%BD%AE%EF%BC%9F%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%E9%A1%BA%E7%A5%9D%E5%95%86%E7%A5%BA%EF%BC%81%3C%2FP%3E%3CP%3E%E5%A1%94%E7%B1%B3%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1893823%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E5%A6%82%E4%BD%95%E9%98%B2%E6%AD%A2%E9%9D%9E%20root%20%E7%94%A8%E6%88%B7%E4%BD%BF%E7%94%A8%20su%20%E5%91%BD%E4%BB%A4%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1893823%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%E6%82%A8%E5%8F%AF%E4%BB%A5%E6%9F%A5%E7%9C%8B%3CA%20href%3D%22https%3A%2F%2Fejaaskel.dev%2Fyocto-hardening-non-root-users-sudo-configuration-disabling-root%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%E8%BF%99%E7%AF%87%E6%96%87%E7%AB%A0%3C%2FA%3E%EF%BC%8C%E5%85%B6%E4%B8%AD%E8%A7%A3%E9%87%8A%E4%BA%86%E5%A6%82%E4%BD%95%E5%9C%A8%20Yocto%20%E7%8E%AF%E5%A2%83%E4%B8%AD%E4%BD%BF%E7%94%A8%E5%B1%82%E6%B7%BB%E5%8A%A0%E7%94%A8%E6%88%B7%E5%92%8C%E7%AE%A1%E7%90%86%E6%9D%83%E9%99%90%E3%80%82%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%E9%A1%BA%E7%A5%9D%E5%95%86%E7%A5%BA%EF%BC%81%3C%2FP%3E%0A%3CP%3E--...%20...--%3C%2FP%3E%0A%3CP%3ESalas.%3C%2FP%3E%3C%2FLINGO-BODY%3E