Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 06-03-2004, 11:55 AM   #1
Registered: Mar 2002
Location: Hampton, VA
Posts: 86

Rep: Reputation: 15
Force user to be in a group to use su?

The title pretty much says it all. I'm running slackware v9.1, and I want to limit users who can actually use the su command. It is like this by default with Gentoo, and figured it would be a good thing to implement since I will have multiple users on the system. Add them to an administrators group in order for them to have access to su. How would I go about doing this?

Old 06-03-2004, 12:04 PM   #2
Senior Member
Registered: Feb 2003
Location: N'rn WI -- USA
Distribution: Kubuntu 8.04, ClarkConnect 4
Posts: 1,142

Rep: Reputation: 47
Make a new group called "su".

Set the owership of su to "".

Change the permissions of su to u=rx, g=rx, a=n .

Add any users you want to be able to su to the su group.

Should work... I think.
Old 06-03-2004, 09:48 PM   #3
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Two points: first, remember to keep the setuid bit on the su binary, otherwise it won't work. Secondly you can use the pluggable authentication module to accomplish this (by default, it disallows su to all but members of the wheel group). Ranger_nemo's idea also works, though, provided you remember my caveat about keeping su setuid root.


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
How to list user in Linux box, add an user to a group! steady_lfcfan Linux - Newbie 12 01-27-2013 01:14 PM
User and Group Admin: How to tell Who is in What group? Akhran Linux - Newbie 1 11-12-2005 11:16 PM
I want to force user logouts qowpal Linux - Newbie 10 09-23-2004 02:52 PM
Force user login with different account rte Linux - Newbie 1 04-01-2004 09:09 AM
Force user ust Linux - General 1 10-09-2003 11:03 AM > Forums > Linux Forums > Linux - Security

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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration