View previous topic :: View next topic |
Author |
Message |
honeymak Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Final Fantasy/Final_Fantasy_8_-_Squall.gif)
Joined: 30 Dec 2002 Posts: 595
|
Posted: Wed May 19, 2010 1:37 am Post subject: is it possible.... |
|
|
to limit some accounts NOT to be su by any others except root?
i don't mean the capability of running the su command
e.g. i want user account A that will never be su by user account B who is capable of running su command
so,
root can su - A
while
userB CANNOT su - A AND userB CAN su - C
![Embarassed :oops:](images/smiles/icon_redface.gif) _________________ hackers - make sth real
academics - read sth said to be real |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
shazeal Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/202851639151d2401cf006f.jpg)
Joined: 03 May 2006 Posts: 208 Location: New Zealand
|
Posted: Wed May 19, 2010 1:50 am Post subject: |
|
|
Dont tell userB userA's password? Sorry its hard to see why you would want a system like this in the first place? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
honeymak Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Final Fantasy/Final_Fantasy_8_-_Squall.gif)
Joined: 30 Dec 2002 Posts: 595
|
Posted: Wed May 19, 2010 12:09 pm Post subject: |
|
|
when auditors are at your back,
u know why _________________ hackers - make sth real
academics - read sth said to be real |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
rainer Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/gallery/Austin_Powers/Austin_Powers_-_Austin.gif)
Joined: 17 Feb 2005 Posts: 251 Location: Bonn, Germany
|
Posted: Wed May 19, 2010 12:21 pm Post subject: |
|
|
Isn't that what the wheel group is good for?
User A --> member of wheel group --> can su
User B --> not member of wheel group --> cannot su
I'm not sitting in front of my Gentoo machine right now - but that's what I remember... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
wthrowe Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 19 Aug 2009 Posts: 141
|
Posted: Wed May 19, 2010 1:53 pm Post subject: |
|
|
Use sudo instead of su. It allows finer grained control of who can do what as whom. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
honeymak Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Final Fantasy/Final_Fantasy_8_-_Squall.gif)
Joined: 30 Dec 2002 Posts: 595
|
Posted: Wed May 19, 2010 2:23 pm Post subject: |
|
|
hm.....seems this is the missing use case for su/sudo design
i am not needing any capability to be doing anything as anyone
i just want certain accounts that CANNOT be su-ed by any others except root
u may say 'deny to be su-ed except root'
![Embarassed :oops:](images/smiles/icon_redface.gif) _________________ hackers - make sth real
academics - read sth said to be real |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
rainer Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/gallery/Austin_Powers/Austin_Powers_-_Austin.gif)
Joined: 17 Feb 2005 Posts: 251 Location: Bonn, Germany
|
Posted: Wed May 19, 2010 2:42 pm Post subject: |
|
|
Not sure whether I understand. What do you mean with "be su-ed by any others"?
Probably your problem can be solved by rights allocation. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
wthrowe Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 19 Aug 2009 Posts: 141
|
Posted: Wed May 19, 2010 2:58 pm Post subject: |
|
|
I still think sudo can do what you want, although you might have to list all the allowed users. Something like (UNTESTED)
Code: | Defaults targetpw = on
Runas_Alias ALLOWED_SU_TARGETS = userB userC userD everyone_except_userA
Cmnd_Alias SHELLS = /bin/bash /bin/sh /bin/tcsh /whatever/other/shells/you/use
ALL ALL = (ALLOWED_SU_TARGETS) SHELLS |
And then users can |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
phajdan.jr Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/88460585744f84aef98c79.jpg)
Joined: 23 Mar 2006 Posts: 1777 Location: Poland
|
Posted: Wed May 19, 2010 5:31 pm Post subject: |
|
|
From what I understand, you want to disallow user A to use so to become user B.
But if user A is allowed to use su, he can su to root, and the su to B. If you want to allow user A to su to some users, but not others, sudo seems to be a better option.
But the simplest solution is to not let the users use su at all. _________________ http://phajdan-jr.blogspot.com/ |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
honeymak Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Final Fantasy/Final_Fantasy_8_-_Squall.gif)
Joined: 30 Dec 2002 Posts: 595
|
Posted: Wed May 19, 2010 11:00 pm Post subject: |
|
|
wthrowe's reply is more likely....but seems a tedious task...becoz that's not by design, i can't negate
so i have to do ALL users x ALL targets cases
phajdan.jr, it's not possible in my situation
![Crying or Very sad :cry:](images/smiles/icon_cry.gif) _________________ hackers - make sth real
academics - read sth said to be real |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
honeymak Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Final Fantasy/Final_Fantasy_8_-_Squall.gif)
Joined: 30 Dec 2002 Posts: 595
|
Posted: Wed May 19, 2010 11:08 pm Post subject: |
|
|
ooops.....seems i just found my answer in sudoers manpage
i will give it a try
![Twisted Evil :twisted:](images/smiles/icon_twisted.gif) _________________ hackers - make sth real
academics - read sth said to be real |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|