termux / proot

An chroot-like implementation using ptrace.
https://wiki.termux.com/wiki/PRoot
Other
745 stars 161 forks source link

Sudo doesn't works #201

Closed phoenix183 closed 2 years ago

phoenix183 commented 2 years ago

I am having issues with sudo, sudo doesn't works even I tried compiling from source, changing distributions it only shows "Killed" whenever I invoke it.

Grimler91 commented 2 years ago

Sounds like this issue: https://github.com/sudo-project/sudo/issues/117

Happens on old kernel versions, but a fix/workaround will be included in the next sudo release. Closing since it has (probably) been fixed upstream.

Until an updated sudo is available you can either compile it from source, or switch to using doas

ZhymabekRoman commented 2 years ago

Have you tried:

pacman -S sudo

?

And do not forget that in proot, root rights are just faked.

phoenix183 commented 2 years ago

I know that, I have created another user for regular use and to prevent from accidently removing packages, so it is a bit weird to type su and a password everytime when installing a package or removing one.

phoenix183 commented 2 years ago

doas shows the permission denied error.

Grimler91 commented 2 years ago

doas shows the permission denied error.

When running what? Have you configured doas as in the wiki article?

SDRausty commented 2 years ago

I am having issues with sudo, sudo doesn't work

startarch s user sudo

sudo: /etc/sudo.conf is owned by uid 1001, should be 0
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

Seemed perfectly fixed for a short while; was working good for years without QEMU; Please see Sudo is non functional #4 for work regarding fix in 2018. PRoot is now broken with the latest updates.

Grimler91 commented 2 years ago

@SDRausty that looks like an unrelated issue. Open a new issue and fill in the bug report template

phoenix183 commented 2 years ago

Yep thats not a bug, its more likely due to wrong config.