LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-12-2007, 02:52 PM   #1
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 54
how can I stop user from being able to su to root?


Hi guys,

I know this must be on here somewhere but I can't find it using the search.

I had a userid setup so that he couldn't su to root. As far as I remember I checked it when I first set it up and today I checked again and how he can if he knows the root password.

How can I stop this? He is only in the normal Slackware users group and not in wheel.

Thanks,
Rand
 
Old 06-12-2007, 02:53 PM   #2
bird603568
Member
 
Registered: Aug 2004
Distribution: Slackware current
Posts: 250

Rep: Reputation: 30
you could not give him the password, make su -x or rm su
 
Old 06-12-2007, 03:14 PM   #3
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,913

Rep: Reputation: Disabled
chown root:wheel /bin/su
chmod 4710 /bin/su

Add users you want to be able to su to the wheel group, and problem solved.
 
Old 06-12-2007, 03:15 PM   #4
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Original Poster
Rep: Reputation: 54
Uhhh..... I'm all the users on this machine....I know all the passwords

I want to setup a userid so that if it gets hacked nobody can go any further. Isn't there some easy way?

edit: Thanks Robby...this isn't the first time I've gotten good advice from you. You know what you're talking about!

I thought I had something like that because all my other users are also in wheel. I'll have to check what happened. Thanks again.

Last edited by Randux; 06-12-2007 at 03:17 PM.
 
Old 06-12-2007, 04:59 PM   #5
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Original Poster
Rep: Reputation: 54
I couldn't remember whether you need read access to be able to execute a command but it looks like you do.

So instead of chmod 4710 /bin/su we should use chmod 4750 /bin/su. Updated in case anyone else can benefit from the thread and Robby's help.

thanks again.
 
Old 06-12-2007, 05:03 PM   #6
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,123

Rep: Reputation: 162Reputation: 162
Although it looks like you already have a workable solution...

There's also the /etc/suauth file (man suauth). If you don't want any users (except, for example, steve) being able to su to root, you could put the following in it:
Code:
root:ALL EXCEPT steve:DENY
 
Old 06-12-2007, 05:05 PM   #7
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,913

Rep: Reputation: Disabled
$ ls -l /bin/su
-rws--x--- 1 root wheel 32K 2006-08-22 15:08 /bin/su*

$ su
Password:
#

Seems to work here with 4710 :-)
 
Old 06-13-2007, 05:30 AM   #8
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Original Poster
Rep: Reputation: 54
Thanks Gilead and Robby for the info!

Robby it's really wierd because it did not work for me without read access. I tried it from two different users and no dice. I changed it to read and exec and it started working. Can't figure it out, I guess I will have to come back to it. Main thing is it's doing what I want now.

Thanks to everybody.
 
  


Reply


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
stop ssh login without root permissions cad Linux - Networking 3 12-28-2006 10:02 AM
root/user stop asking for password Jean Of mArc Linux - Security 3 11-27-2005 10:47 PM
how do i stop root password reset? robhargreaves Linux - Security 3 01-31-2004 09:16 AM
stop sendming internal mail to root? paperdiesel Linux - Newbie 14 10-30-2003 08:46 AM
Stop root from accessing my files MasterC Linux - General 10 10-20-2002 12:05 PM


All times are GMT -5. The time now is 03:53 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration