Discuss / Python / 问下,为什么我的普通用户,也可以执行廖老师说的需要sudo 进python才能执行的命令?

问下,为什么我的普通用户,也可以执行廖老师说的需要sudo 进python才能执行的命令?

Topic source

用的阿里云的云命令行,用户shell

比如这个

>>> psutil.test()
USER         PID  %MEM     VSZ     RSS  NICE STATUS  START   TIME  CMDLINE
root           1   0.1   62.3M    2.1M        sleep  14:43  00:03  /bin/sh /cloudshell/linux/entrypoint.sh
root          90   1.5  766.6M   27.8M        sleep  14:43  00:02  /cloudshell/daemon/ttyd --max-connection 5 -w /cloudshell/linux/start.sh
root         102   0.1   62.2M    2.0M        sleep  14:43  00:02  /bin/sh /cloudshell/linux/start.sh
root         110   0.1   49.7M    1.5M        sleep  14:43  00:00  runuser -u shell /bin/bash
shell        112   0.4  399.5M    8.1M        sleep  14:43  00:06  /bin/bash
shell        214   0.7   63.3M   12.1M        runni  14:48  00:00  python

  • 1

Reply