There is a server with a large number of system users who have access to it via SSH.
As part of the access inventory task, you need to get a list of all users who are allowed on this server to become root through sudo .
It is clear that about a single user you can see the output of id username on the subject of the wheel group (which out of the box gives you the opportunity to become root through sudo in CentOS), but how would you get a list of all such users? It is clear that you can write a cycle in which to iterate over the output of id for all users of the system, but is it possible to make something more elegant?