LoginSignup
1
0

More than 5 years have passed since last update.

CentOSでsudoコマンドを使えるようにする

Posted at

sudoユーザーに追加していないユーザーでsudoコマンドを実行すると、↓のような感じで怒られた。
image.png

特定のユーザーがsudoコマンドを実行できるようにしてみましょう。

groups を確認。
image.png

wheel のグループに変更する。

usermod -G wheel naoki-s

groups を確認。
image.png

これで、sudoコマンが使えるようになる。

ところで、wheel って?

cat コマンドで /etc/sudoers の中身を確認してみよう。

image.png

1
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
1
0