67 links
  • Ban's links
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
Links per page: 20 50 100
  • su or sudo in chroot: beware of nosuid mount

    For su or sudo to work, the rootfs has to be mounted suid -- which is obvious when you know how it work or think about it. sudo is nice enough to hint us at it, but sud isn't.

    Either way, when chrooting you need to make sure the partition holding your new root is not mounter nosuid. Any user-mounted partition usually is (for fairly obvious security reasons I guess), so if you're plugging in a drive, make sure you mount it manually or remount it mount -o remount,suid.
    Then, su and sudo should work fine in the chroot (at least if you mounted all the bits like /proc, /sys, /dev, /dev/pts and al.).

    Beware of shady stuff though, obviously.

    May 14, 2025 at 11:37:28 GMT+2 * - permalink -
    QRCode
    - https://forums.linuxmint.com/viewtopic.php?p=1860809&sid=32d6fb32b8a1ca9b4eca60eb79aeabdc#p1860809
    Linux chroot Debian
Links per page: 20 50 100
Shaarli - The personal, minimalist, super fast, database-free, bookmarking service by the Shaarli community - Help/documentation