Is there an easy way to get a list of users who are in all specified groups?
For example, if I have the following users:
fred - rainbow, dell
jane - hp
zippy - rainbow, hp, dell
george - hp, dell
bungle - rainbow, hp, dell
I would like something like this:
[me@box ~]$ magic "dell,hp"
zippy, george, bungle
ie returning the users who are in both dell and hp.
If it is multiple steps that is fine, though if it's not really possible without having to resort to lots of Bash black magic, and it is quicker to do it in a RE-enabled text editor that is also fine.
I'm running on RHEL4 if that makes any difference.