私が追加したユーザーとしてsudoを使用することはできません。

私が追加したユーザーとしてsudoを使用することはできません。

新しいユーザーを追加トム

useradd -m -p 12345 -s /bin/bash -G wheel tom

ユーザーをルートからトムに切り替える

su tom

正しいパスワードを入力しても、Tomはsudoを使用できません。

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.

ここに画像の説明を入力してください。

/etc/sudoers
%wheel (ALL)=(ALL) ALL

/etc/pam.s/su uncommented
auth required pam_wheel.so

$ groups
tom wheel

ベストアンサー1

からman useradd (8)

-p、--password PASSWORD
     暗号化されたパスワード、crypt(3)によって返されます。デフォルトはパスワードを無効にすることです。

調査すれば/etc/shadow見つけることができるだろう暗号化パスワードはです12345。したがって、パスワードが間違っているのは驚くべきことではありません。

ルートIDを使用してパスワードを変更できます。

passwd tom

動作する必要があります。

おすすめ記事