I would like to search multiple servers for user ss7459
in the following files /etc/sudoers
, /etc/sudoers.d/itse
, /etc/sudoers.d/dbas
and /etc/group
.
NOTE: The numbers after the ss
may not be constant across all the servers... on some it may be ss3945...
and so on but it all starts with ss
.
Can someone please help me write a script for this?
Also, I'll be running this on a satellite with all servers on it thus the main aim is to find out all the servers with that user (ss7***) on them. I'll also be needing a way to get the servers name and compile a list of those servers.