In my server, I have 2 groups:
ssh-users hold users I ssh to the box with. User
sshu is a member of
ssh-users. Once logged in to the server, I want
ssh-users members to be able to perform su to an user of
su-users group but don't want them to be able to
su-users hold users who can do core work and want them to have rights to perform
su to root or any user.
How can I achieve this on Debian?
I tried the
pam_wheel.so module in
/etc/pam.d/su but any group I mention there are allowed su to root.
I also tried this but with no effect: https://superuser.com/a/398087/119486