"sudo -l"コマンドの用途は何ですか?

これここのリンクはスーパーユーザーとrootユーザーの間に違いはありません。

 -l, --list  If no command is specified, list the allowed (and forbidden)
             commands for the invoking user (or the user specified by the
             -U option) on the current host.  A longer list format is used
             if this option is specified multiple times and the security
             policy supports a verbose output format.

コマンドを指定せずに-lフラグを使用する場合は、呼び出すユーザーに許可または禁止されているコマンドのリストを提供する必要があります。ただし、root以外のユーザーとしてこれを試みると、エラーメッセージが表示されます。

申し訳ありません。ユーザー寄生虫はPlayboxでsudoを実行できない可能性があります。

root以外のユーザーでこのコマンドを実行することはできませんが、root以外のユーザーとしてこのコマンドを実行できない場合は何が役に立ちますか?

ベストアンサー1

まあ、それはまさに言うことです。呼び出すユーザーが許可する(および禁止する)コマンドをリストします。あなたは実行することができますsudo -l。それがあなたに言うことです。

parasiteあなたの場合:ユーザーはsudoコマンドを実行できません。すると、次のsudo idメッセージが表示されます。

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

私のシステムでは、次から始めますsudo -l

User bigboss may run the following commands on verlaine:
   (ALL) NOPASSWD: ALL

sudoコマンドを有効にするには、parasiteこのファイルにそのコマンドを追加する必要がありますsudoers。通常、visudoこれを行うにはrootとして実行します。

おすすめ記事