LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-10-2008, 03:22 PM   #1
gishaust
LQ Newbie
 
Registered: Aug 2006
Location: Victoria
Distribution: ubuntu 7.04 server and 7.04 desktops
Posts: 15

Rep: Reputation: 0
su sudo


Hi everyone

I setup a user and then added the user to the wheel then I logout of root and in to the new user and tried to su it said,

setgid: operation not permitted.

I then tried sudo and it said,

sudo: must be setuid.

Does anyone know why this is happening I am using backtrack.

gishaust.
 
Old 02-10-2008, 04:30 PM   #2
Ephracis
Senior Member
 
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109

Rep: Reputation: 50
Please write the exact commands and their output.

Also write the output of the command "groups" and "sudo whoami"
 
Old 02-10-2008, 06:05 PM   #3
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Are you doing this on a Slackware box?

Eric
 
Old 02-10-2008, 07:12 PM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Can you also post the output of these 2 commands?
Code:
ls -l `which sudo`
ls -l `which su`
Does your /etc/sudoers file have the wheel group use enabled?
Code:
%wheel        ALL=(ALL)       ALL
or
%wheel        ALL=(ALL)       NOPASSWD: ALL
 
Old 02-10-2008, 07:48 PM   #5
gishaust
LQ Newbie
 
Registered: Aug 2006
Location: Victoria
Distribution: ubuntu 7.04 server and 7.04 desktops
Posts: 15

Original Poster
Rep: Reputation: 0
Thankyou for your responses to answer all your questions
My os is backtrack with a slackware base and kde gui or flax.

The following commands and responses

these are being done from the root account as I have no other user on the machine except for the other I have just created

groups gishaust
users root

sudo whoami
root

etc/sudoers
# %wheel all=(all) setenv:all

ls-l 'which sudo'
/bi/ls: cannot access which sudo: No such file or directory

ls-l 'which su'
/bi/ls: cannot access which sudo: No such file or directory


The following comes from gishaust account

su
Password: *******
setgidperation not permitted

sudo
sudo: Must be setuid root
 
Old 02-10-2008, 07:57 PM   #6
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
The 2 ls commands use backticks ` (on my keyboard, to the left of the 1 key, with the tilde ~), not a single quote ' (on my keyboard on the same key as ").

Also, in your /etc/sudoers file, giving permissions to the wheel group is disabled because that line is commented out. You can edit the file with visudo and remove the comment symbol.

You don't need to be in root's group as a user if you have sudo and su access. You can just be in users, or better still, create a private group and make that your primary group.
 
Old 02-10-2008, 08:31 PM   #7
gishaust
LQ Newbie
 
Registered: Aug 2006
Location: Victoria
Distribution: ubuntu 7.04 server and 7.04 desktops
Posts: 15

Original Poster
Rep: Reputation: 0
here are the responses you asked for

bt ~ # ls -l `which sudo`
-rwxr-xr-x 1 root root 97948 Jul 24 2007 /usr/local/bin/sudo*
bt ~ # ls -l `which su`
-rwx--x--x 1 root root 35868 Dec 7 16:28 /bin/su*

I have remove the # in sudoers and logout of root and back into gishaust at the terminal and the sudo and still got the same response.

What you are saying at the bottom of the post I create a group name etc 'accounts' then add the user to it 'accountmanager' after that all you have to do is su or sudo and as long as you have the root password it will allow me to have root privileges. Is that correct. Thanks.
 
Old 02-10-2008, 08:56 PM   #8
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Both of those executables are suid on my systems. As root, you can run the following to change it which should allow you to use sudo as a member of the wheel group (now that the line in /etc/sudoers is uncommented):
Code:
chmod u+s /bin/su /usr/local/bin/sudo
Yes, for using su it doesn't matter which groups you're in as long as you know the root account's password. It would be better to create another group for your user account than to leave it in the root group.
 
Old 02-10-2008, 10:22 PM   #9
gishaust
LQ Newbie
 
Registered: Aug 2006
Location: Victoria
Distribution: ubuntu 7.04 server and 7.04 desktops
Posts: 15

Original Poster
Rep: Reputation: 0
su works find sudo gives me the password but as soon as I enter the root password it asks for it again three times and then says gishaust is not of the sudo group.

I want to know if I have the following correct before i do it.

groupadd accounts

adduser

login: name accountmanager
Id uid: "automatic choosen by the computer"
initial group: accounts
additional groups: "press enter"
home directory : "press enter"
shell: "press enter"
Expiry date: "press enter" #this is if I want the account end at some stage

I am fairly new to groups and accounts. so would this achieve what we have be discussing.

Last edited by gishaust; 02-10-2008 at 10:24 PM.
 
Old 02-10-2008, 11:07 PM   #10
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
There's a couple of things there...

Firstly, I'm assuming you've added the gishaust user to the wheel group and uncommented that line from /etc/sudoers using visudo. If so, when you use sudo you need to type in gishaust's password, not the root password. You use the root password when you use su.

The last part will create a group called accounts and a user called accountmanager who is a member of that group. To access sudo, the accountmanager will need to be added to the wheel group and will use their own password with sudo.
 
Old 02-10-2008, 11:16 PM   #11
gishaust
LQ Newbie
 
Registered: Aug 2006
Location: Victoria
Distribution: ubuntu 7.04 server and 7.04 desktops
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks for all your help i have not add gishaust to the wheelgroup.
I have been read up and found this information and your support helped me greatly with the learning curve. But what is the wheel group.

Last edited by gishaust; 02-10-2008 at 11:18 PM.
 
Old 02-10-2008, 11:17 PM   #12
gishaust
LQ Newbie
 
Registered: Aug 2006
Location: Victoria
Distribution: ubuntu 7.04 server and 7.04 desktops
Posts: 15

Original Poster
Rep: Reputation: 0
only joking ta
 
Old 02-11-2008, 02:46 AM   #13
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Remember - this is a Slackware forum. Backtrack is not Slackware. The parts of Slackware that Backtrack changes/removes/mutilates are not endorsed by Slackware, Inc. and you should not ask support here. Your problem is one of Backtrack exclusively - in Slackware this would work.

Eric
 
  


Reply



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
LXer: The Ultimate Sudo FAQ — To Sudo Or Not To Sudo? LXer Syndicated Linux News 13 04-13-2013 01:36 AM
LXer: sudo, or not sudo: that is the question LXer Syndicated Linux News 0 02-07-2008 05:40 PM
What do you use sudo for dosnlinux Slackware 10 12-15-2006 08:12 PM
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 03:20 PM
Sudo without having to type "sudo?" Mitch G Linux - Security 3 09-28-2006 02:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:46 PM.

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