List sudo users in centos
Solution 1:
Try this:
for USER in `cut -d: -f1 /etc/passwd`
do
sudo -U $USER -l
done
Solution 2:
What is wrong with sudo cat /etc/sudoers
and maybe getent group <groupname>
to get usernames of group members?
Try this:
for USER in `cut -d: -f1 /etc/passwd`
do
sudo -U $USER -l
done
What is wrong with sudo cat /etc/sudoers
and maybe getent group <groupname>
to get usernames of group members?