LoginSignup
8
3

More than 5 years have passed since last update.

Amazon Linux 2で、あるユーザをsudoできるようにする

Posted at

sudo設定の変更

sudo設定ファイルを開く

sudo visudo

下記の行を変更

## Allows people in group wheel to run all commands
# %wheel        ALL=(ALL)       ALL
# ↑ これをコメントアウト

## Same thing without a password
%wheel  ALL=(ALL)       NOPASSWD: ALL
# ↑ これをコメントアウトを外す

ユーザをwheelグループに追加する

sudo usermod -aG wheel 対象ユーザ名

対象ユーザがログイン中の場合はログインをしなおす

ログイン中だと反映されませんので、一度ログアウトしてログインします。

8
3
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
8
3