LoginSignup
0
0

[Linux 初期設定] wheelグループに属しているユーザーのみ su を許可

Posted at

Linux 初期設定シリーズ

変更内容:wheelグループに属しているユーザーのみ su を許可
確認OS:Red Hat Enterprise Linux release 9.2 (Plow)
対象ファイル:/etc/pam.d/su
反映:即時

1.設定ファイルのバックアップ

test.sh
sudo cp -an /etc/pam.d/su{,.$(date +%Y%m%d)}
sudo ls -alF /etc/pam.d/su*

2.設定の変更

test.sh
sudo sed -i -e 's/#auth\t\trequired/auth\t\trequired/g' /etc/pam.d/su

3.設定の確認

test.sh
sudo grep required /etc/pam.d/su
sudo diff /etc/pam.d/su{,.$(date +%Y%m%d)}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0