CentOS7でuserをsudoユーザーに追加する方法

CentOS7でuserをsudoユーザーに追加する方法

sudoできるユーザーの追加方法です

Centos7バージョン

# cat /etc/centos-release
CentOS Linux release 7.6.1810 (Core)

設定

## 編集
visudo

## Allows people in group wheel to run all commands
#%wheel  ALL=(ALL)       ALL
→ コメントアウトされていれば外す
%wheel  ALL=(ALL)       ALL

## wheelグループに対象ユーザーを追加
usermod -aG wheel username

ログアウト後に、適応される

以上で完了