in reply to Re: Re: Retrieve unix group membership for a uid in a perl CGI
in thread Retrieve unix group membership for a uid in a perl CGI

I was going to use getgrent, for the guy's answer, and I couldn't get it to work.... Until now: I just realized that instead of looping through /etc/group, you can loop through getgrent.

The thing I didn't immediately realize is that getgrent returns different values on subsequent calls.

(Since I've never done this particular thing before, I was testing the code before posting...)

  • Comment on Re: Re: Re: Retrieve unix group membership for a uid in a perl CGI