![ユーザーがsudoersリストに追加されないのはなぜですか? [コピー]](https://linux33.com/image/111611/%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC%E3%81%8Csudoers%E3%83%AA%E3%82%B9%E3%83%88%E3%81%AB%E8%BF%BD%E5%8A%A0%E3%81%95%E3%82%8C%E3%81%AA%E3%81%84%E3%81%AE%E3%81%AF%E3%81%AA%E3%81%9C%E3%81%A7%E3%81%99%E3%81%8B%EF%BC%9F%20%5B%E3%82%B3%E3%83%94%E3%83%BC%5D.png)
CentOS 7 サーバーでは、ユーザーはホイールグループに追加されますが、ユーザーはsudo
コマンドを実行できません。
wannabe_sudoer_user
特定のユーザーがコマンドを実行できるようにするには、以下にどのような特定のコマンドを追加する必要がありますかsudo
?
詳細:
wannabe_sudoer_user
以下は、リストにユーザーを追加しようとして失敗したことを示す端末ログですsudoers
。
[wannabe_sudoer_user@localhost ~]$ su -
Password:
Last login: Mon May 15 13:58:21 PDT 2017 on ttyS0
[root@localhost ~]# gpasswd -a wannabe_sudoer_user wheel
Adding user wannabe_sudoer_user to group wheel
[root@localhost ~]# exit
logout
[wannabe_sudoer_user@localhost ~]$ sudo mkdir /opt/atlassian/
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
[sudo] password for wannabe_sudoer_user:
wannabe_sudoer_user is not in the sudoers file. This incident will be reported.
答え1
簡単に見た後、上記の例のセッションは、ユーザーが「wheel」に追加されたことを知らないと言いたいと思います。セッションを閉じて(ログアウト)、新しいセッションを開始して(ログイン、新しい端末を開くなど)、もう一度やり直してください。