I'm using Ubuntu server 12.04. If a user is only a member of it's own group why he can still do su SOME_OTHER_USER ? Can I prevent this?
Asked
Active
Viewed 135 times
3 Answers
1
If you don't want the a user can execute "su" you can set the owner of it to "root" and the chmod to 700. Than only root can execute it.
If you want users of a special group to execute "su" you can set the group of it to - lets say - "wheel". And the chmod to 770. And put all users that have to execute "su" into the wheel group.

jfried
- 451
- 3
- 4
1
I found a solution that I like a lot:
- sudo groupadd nosu
- sudo usermod -a -G nosu USERNAME
- sudo vi /etc/pam.d/su
- uncomment line:
auth required pam_wheel.so deny group=nosu

Kovica
- 113
- 2
0
I can think of two obvious explanations:
- User still retains a login that was created before the user was removed from a group giving privilege
- User is explicitly listed i /etc/sudoers

Bittrance
- 3,070
- 3
- 24
- 27