proot-me / proot

chroot, mount --bind, and binfmt_misc without privilege/setup for Linux
https://proot-me.github.io
GNU General Public License v2.0
1.97k stars 372 forks source link

sudo and pkexec do not work #318

Open CicadaSeventeen opened 2 years ago

CicadaSeventeen commented 2 years ago

Expected Behavior

sudo to run as root in proot container pkexec to run root-requiring program with the define of polkit

Actual Behavior

sudo and pkexec do not work

Steps to Reproduce the Problem

  1. export docker image to /tem
  2. sudo chown -R root:root /tem
  3. sudo chmod 4755 /usr/bin/sudo
  4. sudo chmod 4755 /etc/sudo.conf
  5. sudo chmod 4755 /usr/bin/pkexec
  6. input proot -R /tem to enter container

Specifications

Command Output

sudo :

 effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?

pkexec:

pkexec must be setuid root
CicadaSeventeen commented 2 years ago

Not work with proot -0 -R /tem pkexec does work with sudo -E proot -0 -R /tem but it is meaningless because the propose or pkexec is to get permission without su and sudo