sudoを使えるようにする!【~~ is not in the sudoers file. This incident will be reported.】

~~ is not in the sudoers file.  This incident will be reported.

sudoersに追加する方法

どうやら、/etc/sudoersに追加しないといけないみたい

tanaka  ALL=(ALL:ALL) ALL

グループに追加する方法

グループでも許可されてたので、adminグループかsudoグループにしたらsudoが使えそう

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

田中君をadminに加えます。

usermod -aG admin tanaka

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です