I am just a little bit confused here. When you are asked to give a user sudo access to the machine. Should I just add the user to the wheel group.
# usermod -aG wheel bob
Or let's say there is no wheel group or it is deleted for some reason.
then how can I grant bob sudo access to the machine.When I did
# which sudo
I get the result:
So can I do the following line then:
But then I changed to user bob after and tried to execute
# sudo iptables -L
and then it gives me that error message:
Sorry, user bob is not allowed to execute '/sbin/iptables -L' as root
And so am not sure how to give sudo access to the machine to a user if the group wheel is not there. And according to my knowledge
bob ALL=ALL ALL
Basically makes bob have the same power like root which is not good right.
Another question I have is how to make all users on the system able to execute the last command. Do I have to create a group and then add all users to this group or is there another way?