Skip to main content
more optical touchup
Source Link
Bananguin
  • 8.2k
  • 3
  • 28
  • 59

su (mostly) uses pam for authentication and pam has a module called pam_wheel which checks group membership of the authenticating user. In short, by adding

auth required pam_wheel.so group=becomeroot 

to the file /etc/pam.d/su, only users who are members of the group becomerootbecomeroot may become root using su. Now you make sure only your user EMERG is a member of the group becomeroot. Some distros have/use the group named wheel for that.

groupadd becomeroot #add the group becomeroot to your system gpasswd -a EMERG becomeroot # add the user EMERG to the group becomeroot 

Further reading: pam (7) pam_wheel (8) groupadd (8) gpasswd (1) and many distros have explaining comments in /etc/pam.d/su as well

su (mostly) uses pam for authentication and pam has a module called pam_wheel which checks group membership of the authenticating user. In short, by adding

auth required pam_wheel.so group=becomeroot 

to the file /etc/pam.d/su, only users who are members of the group becomeroot may become root using su. Now you make sure only your user EMERG is a member of the group becomeroot. Some distros have/use the group named wheel for that.

groupadd becomeroot #add the group becomeroot to your system gpasswd -a EMERG becomeroot # add the user EMERG to the group becomeroot 

Further reading: pam (7) pam_wheel (8) groupadd (8) gpasswd (1) and many distros have explaining comments in /etc/pam.d/su as well

su (mostly) uses pam for authentication and pam has a module called pam_wheel which checks group membership of the authenticating user. In short, by adding

auth required pam_wheel.so group=becomeroot 

to the file /etc/pam.d/su, only users who are members of the group becomeroot may become root using su. Now you make sure only your user EMERG is a member of the group becomeroot. Some distros have/use the group named wheel for that.

groupadd becomeroot #add the group becomeroot to your system gpasswd -a EMERG becomeroot # add the user EMERG to the group becomeroot 

Further reading: pam (7) pam_wheel (8) groupadd (8) gpasswd (1) and many distros have explaining comments in /etc/pam.d/su as well

Source Link
Bananguin
  • 8.2k
  • 3
  • 28
  • 59

su (mostly) uses pam for authentication and pam has a module called pam_wheel which checks group membership of the authenticating user. In short, by adding

auth required pam_wheel.so group=becomeroot 

to the file /etc/pam.d/su, only users who are members of the group becomeroot may become root using su. Now you make sure only your user EMERG is a member of the group becomeroot. Some distros have/use the group named wheel for that.

groupadd becomeroot #add the group becomeroot to your system gpasswd -a EMERG becomeroot # add the user EMERG to the group becomeroot 

Further reading: pam (7) pam_wheel (8) groupadd (8) gpasswd (1) and many distros have explaining comments in /etc/pam.d/su as well