LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Error when logging into chroot jail: "sudo: must be setuid root" (https://www.linuxquestions.org/questions/linux-newbie-8/error-when-logging-into-chroot-jail-sudo-must-be-setuid-root-4175427264/)

Docky 09-14-2012 11:09 AM

Error when logging into chroot jail: "sudo: must be setuid root"
 
Hi,

I just finished following this tutorial to set up a simple chroot jail on my Ubuntu 12.04 server, and after following all the steps and trying to log in, I get the MOTD but right after that it displays this error message, and then the connection is closed:

Code:

sudo: must be setuid root
I'm not sure what the issue is here, but if it matters, my /etc/group file did not have an admin line, so I just added this to the end of the file:

Code:

admin:x:119:jailuser
Does anyone know what I could have done wrong? I can provide more information if needed. Thanks!

frieza 09-14-2012 11:21 AM

try booting the ubuntu server in recovery mode (root prompt) and running chmod u+s on /usr/bin/sudo
if that fails, try doing it on the client machine.

Docky 09-14-2012 11:32 AM

Quote:

Originally Posted by frieza (Post 4780426)
try booting the ubuntu server in recovery mode (root prompt) and running chmod u+s on /usr/bin/sudo
if that fails, try doing it on the client machine.

Did that, and now I get this:

Code:

su: Cannot determine your user name.

Wim Sturkenboom 09-14-2012 12:45 PM

Ubuntu 12.04 has dropped the admin group. See https://wiki.ubuntu.com/PrecisePango...Infrastructure

Try to add 'jailuser' to the sudo group instead.

lleb 09-14-2012 02:07 PM

this is an easy fix. get to root, and type the following:

chmod 4111 /usr/bin/sudo
chown root:root /usr/bin/sudo

problem should be solved.

the permissions should look like this:
Code:

---s--x--x. 2 root root 77372 May 17 08:00 /usr/bin/sudo
NOTE the s in the first part of the permissions.


All times are GMT -5. The time now is 11:29 AM.