Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-20-2006, 08:39 AM
|
#1
|
Member
Registered: Dec 2004
Location: Atlanta, GA U.S.
Distribution: I play with them all :-)
Posts: 316
Rep:
|
Blocking access on a particular app (via sudo)
I would like to block anyone from using 'su' across the board for anyone in the sudoers file. How do I do this?
Thanks,
Harlin Seritt
|
|
|
10-20-2006, 04:37 PM
|
#2
|
Senior Member
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098
Rep: 
|
|
|
|
10-21-2006, 02:34 AM
|
#3
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
I could be misinterpreting your question, but su and sudo are very different things. The easiest way to limit su usage is in the /etc/suauth file. The man page has more info...
|
|
|
10-21-2006, 07:38 AM
|
#4
|
Member
Registered: Dec 2004
Location: Atlanta, GA U.S.
Distribution: I play with them all :-)
Posts: 316
Original Poster
Rep:
|
Yes they are different. What I'm wondering is how can you stop anyone from doing this successfull:
# sudo su
?
Thanks for the help!
Harlin
|
|
|
10-21-2006, 07:40 AM
|
#5
|
Member
Registered: Dec 2004
Location: Atlanta, GA U.S.
Distribution: I play with them all :-)
Posts: 316
Original Poster
Rep:
|
Oh sorry meant to include this in the post... there isn't a suauth file in /etc/ on my box.
|
|
|
10-21-2006, 01:59 PM
|
#6
|
Senior Member
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098
Rep: 
|
Never really done anything like this before but couldn't you find the command and just change the permissions on the su command. So that is not executable.
|
|
|
10-21-2006, 02:30 PM
|
#7
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
Quote:
Originally Posted by Harlin
Oh sorry meant to include this in the post... there isn't a suauth file in /etc/ on my box.
|
That's not a problem - there wasn't one on mine either. Once I created it, it was used by su.
|
|
|
10-21-2006, 02:41 PM
|
#8
|
Member
Registered: Dec 2004
Location: Atlanta, GA U.S.
Distribution: I play with them all :-)
Posts: 316
Original Poster
Rep:
|
What kind of entries should i put in suauth to make this work?
thanks,
Harlin
|
|
|
10-21-2006, 02:51 PM
|
#9
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
The easies method is a default deny and only allow specific users. For example, to only allow the user steve to su to root:
Code:
root:ALL EXCEPT steve:DENY
I also have the permissions set so that only the root user can view/modify the file:
Code:
$ ls -l /etc/suauth
-rw-r----- 1 root root 27 2006-08-20 19:22 /etc/suauth
Users can still su to other users with this particular configuration - I only limit being able to su to root.
Last edited by gilead; 10-21-2006 at 02:52 PM.
|
|
|
10-22-2006, 08:07 AM
|
#10
|
Member
Registered: Dec 2004
Location: Atlanta, GA U.S.
Distribution: I play with them all :-)
Posts: 316
Original Poster
Rep:
|
Hey thanks!! One thing I'm wondering: if i'm wanting to deny many users besides Steve, how would I delimit the entries? comma? space?
Thanks!
Harlin
|
|
|
10-22-2006, 02:11 PM
|
#11
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
Commas - I recommend reading the man page for suauth. It's explained well and there are examples.
|
|
|
All times are GMT -5. The time now is 02:04 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|