How to expand a UNIX group and list all of its members
In Perl | No commentRecently, I needed a way to show all of the members of a UNIX group. I’m in the process of writing a sudoers parser and this functionality was needed to show which users could actually run which commands as which users. After doing some internet research, I came across the following link: http://stackoverflow.com/questions/2835368/how-to-list-all-users-in-a-linux-group. Though it worked, it relied on UNIX commands to build the hash, getent and id. It was very slow. The function below…