Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-14-2012, 12:09 PM   #1
LQ Newbie
Registered: Aug 2012
Posts: 19

Rep: Reputation: Disabled
Question Error when logging into chroot jail: "sudo: must be setuid root"


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:

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:

Does anyone know what I could have done wrong? I can provide more information if needed. Thanks!
Old 09-14-2012, 12:21 PM   #2
Senior Member
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
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.
Old 09-14-2012, 12:32 PM   #3
LQ Newbie
Registered: Aug 2012
Posts: 19

Original Poster
Rep: Reputation: Disabled
Originally Posted by frieza View Post
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:

su: Cannot determine your user name.
Old 09-14-2012, 01:45 PM   #4
Wim Sturkenboom
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Ubuntu 12.04 has dropped the admin group. See

Try to add 'jailuser' to the sudo group instead.
Old 09-14-2012, 03:07 PM   #5
Senior Member
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,868

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
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:
---s--x--x. 2 root root 77372 May 17 08:00 /usr/bin/sudo
NOTE the s in the first part of the permissions.

Last edited by lleb; 09-14-2012 at 03:08 PM.


chroot, jail

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
bind-9.9.1-P2 in chroot-jail won't start, "initializing DST: openssl failure" wailingwailer Slackware 0 07-30-2012 04:48 AM
"bad passwd file" when logging into Chroot Jail ddenton Linux - Security 3 10-17-2011 02:52 AM
[SOLVED] chroot error "cannot change root directory to /jail: Operation not permitted" Soji Antony Linux - Newbie 8 05-23-2011 09:29 PM
sudo stopped working: "must be setuid root" quincy_the_penquin Linux - Software 4 04-30-2007 07:37 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:31 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration