I have a perl CGI script which gets retrieves a valid unix userid ($username) via http basic auth and mod_auth_pam. I am trying to find a way to retrieve the unix group membership(s) for $username. I am currently doing this by spawning a subshell;
@groups = `/usr/bin/groups $username`;
Which returns me a listing of all the groups a user belongs to (primary and secondaries). I would like to know if there is a better perl-esque way to do this without spawning a subshell.
In reply to Retrieve unix group membership for a uid in a perl CGI by cprice
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |