Ubuntu – Does the sudo command not work in chroot


I just installed a 32-bit chroot to run on my 64-bit system. In the chroot environment, the sudo command doesn't work, it says

sudo: command not found

Also, when I try the su root command, my password doesn't work (su: authentication failure). What password do they want?

I'm quite new to Ubuntu, so actually I don't really know what I'm doing. I am just trying to follow instructions.

I solved this particular problem simply by starting the chroot by the command:

katarina@ubuntu:~$ schroot -c oneiric_i386 -u root

instead of the one I used the first time:

katarina@ubuntu:~$ schroot -a

I still have some other problems, but I guess that's not for this question.

Best Answer

  • In my opinion the question is more about not understanding what chroot does.

    It moves the / to wherever you tell it, so there's no more /bin, /sbin, or /usr.

    This means you're not going to have sudo anymore since it lives in one of those directories.

  • Related Question