View previous topic :: View next topic |
Author |
Message |
thegergo02 n00b
Joined: 06 Nov 2021 Posts: 2
|
Posted: Sat Nov 06, 2021 7:03 am Post subject: [solved] sudo permission issues |
|
|
I've made a qemu chroot according to (https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Base#Chrooting, https://wiki.gentoo.org/wiki/Project:Hardened_musl, https://wiki.gentoo.org/wiki/Raspberry_Pi_3_64_bit_Install, https://wiki.gentoo.org/wiki/Raspberry_Pi4_64_Bit_Install) the wiki, everything works well (and it's bootable) BUT as I've emerged `sudo`, I can run it as the `root` user, but the `gentoopi` user (that I created with useradd) cannot run it. I get this by default: Code: | Error while loading /usr/bin/sudo: Permission denied | Current (and to my knowledge proper) permissions on the binary: Code: | -rws--x--x 1 root root 161592 Nov 5 18:36 /usr/bin/sudo | I did try a couple of things that were recommended to me on IRC: setting permissions to `4755` gives me: Code: | 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? | (no fs is mounted with nosuid, other than `dev, sys, proc...` and everything is `ext4`). Trying `go+s` changes nothing from the default problem. Doing `go+rs` gives the same suid error. This error is present when the system is booted, not only in chroot. (Though I've yet to try emerging it while the system is booted, and I would like to avoid that.)
Last edited by thegergo02 on Sat Nov 06, 2021 10:51 am; edited 1 time in total |
|
Back to top |
|
|
thegergo02 n00b
Joined: 06 Nov 2021 Posts: 2
|
Posted: Sat Nov 06, 2021 10:50 am Post subject: |
|
|
I've solved the issue (thanks marcus_c from IRC), the interpreters need the C flag to properly work with sudo.
Code: | echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm:C' > /proc/sys/fs/binfmt_misc/register
echo ':aarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\xb7\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-aarch64:C' > /proc/sys/fs/binfmt_misc/register | Notice the `:C` part.
If you need to remove your current interpreters just Code: | echo -1 > /proc/sys/fs/binfmt_misc/[insert arch name here] |
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|