wheelグループ以外suできないようにする の変更点


*wheelグループ以外suできないようにする [#ma7f36bc]

[[dokuwiki.fl8.jp転載済>http://dokuwiki.fl8.jp/doku.php/01_linux/01_net/wheel_group]]

FreeBSDだと標準ですが、Linuxの場合どのユーザでもsuできるようになっているので、~
下記を編集しておく。

**/etc/pam.d/suのコメントを一行外すだけ [#b22df919]
 # Uncomment the following line to require a user to be in the "wheel" group.
 # auth       required     /lib/security/$ISA/pam_wheel.so use_uid
                      ↓
 # Uncomment the following line to require a user to be in the "wheel" group.
 auth       required     /lib/security/$ISA/pam_wheel.so use_uid

これでwheelグループに所属していないユーザはsuできない。

**CentOS5.2の/etc/pam.d/su [#s7d60b18]
 # Uncomment the following line to implicitly trust users in the "wheel" group.
 #wheelグループに属していると、パスワード無しでsuできる
 #auth           sufficient      pam_wheel.so trust use_uid
 # Uncomment the following line to require a user to be in the "wheel" group.
 #wheelグループに属していると、パスワード有りでsuできる
 #auth            required        pam_wheel.so use_uid