3

This link here mentions there is no difference between super-user and root user and according to the man page of sudo

 -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.

If we specify no command and use -l flag, it is supposed to give us a list of allowed and forbidden commands for the invoking user. But when I tried this as a non-root user, it gives me an error saying.

Sorry, user parasite may not run sudo on playbox.

I'm unable to run this command as any non-root user but if I can't run this command being a non-root user, what is it used for?

hakiki_makato
  • 135
  • 1
  • 1
  • 4

1 Answers1

4

Well, exactly as it says: list the allowed (and forbidden) commands for the invoking user. You are able to run sudo -l and this it what it tells you.

In your case: the user parasite is not allowed to run any sudo commands. If you try sudo id you'll get a message:

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

On my system, I get from sudo -l:

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

If you want to enable parasite to run sudo commands, you must add him to the sudoers file. Typically, you would run visudo as root to do this.

Ljm Dullaart
  • 4,643