LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 09-14-2012, 11:09 AM   #1
Docky
LQ Newbie
 
Registered: Aug 2012
Posts: 19

Rep: Reputation: Disabled
Question 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!
 
Old 09-14-2012, 11:21 AM   #2
frieza
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, 11:32 AM   #3
Docky
LQ Newbie
 
Registered: Aug 2012
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
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:

Code:
su: Cannot determine your user name.
 
Old 09-14-2012, 12:45 PM   #4
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

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

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

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
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.

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


Reply

Tags
chroot, jail



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 03:48 AM
"bad passwd file" when logging into Chroot Jail ddenton Linux - Security 3 10-17-2011 01:52 AM
[SOLVED] chroot error "cannot change root directory to /jail: Operation not permitted" Soji Antony Linux - Newbie 8 05-23-2011 08:29 PM
sudo stopped working: "must be setuid root" quincy_the_penquin Linux - Software 4 04-30-2007 06:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:58 AM.

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