Re: Help: How do I get the lists of groups a unix user is in?



Brandon Hoppe <bhoppe@xxxxxx> wrote:

I need the list of groups that a user is in, similar to calling "groups" at a command prompt.

I've searched everywhere but haven't been able to find anything to do this in perl.


my @groups = `groups`;

or, my preference:

my @groups = qx/groups/;


--
Tad McClellan SGML consulting
tadmc@xxxxxxxxxxxxxx Perl programming
Fort Worth, Texas
.



Relevant Pages

  • Re: Help: How do I get the lists of groups a unix user is in?
    ... Brandon Hoppe schrob: ... I need the list of groups that a user is in, similar to calling ... "groups" at a command prompt. ...
    (comp.lang.perl.misc)
  • Re: SBS and DNS
    ... Type "NET START" at a command prompt, I believe the name will show in ... Calling an illegal alien an "undocumented worker" is like calling a ... drug dealer an "unlicensed pharmacist" ...
    (microsoft.public.windows.server.sbs)
  • Re: SBS and DNS
    ... Type "NET START" at a command prompt, I believe the name will show in ... Igitur qui desiderat pacem, praeparet bellum. ... Calling an illegal alien an "undocumented worker" is like calling a ...
    (microsoft.public.windows.server.sbs)
  • Re: Help: How do I get the lists of groups a unix user is in?
    ... Brandon Hoppe writes: ... "groups" at a command prompt. ... If you want to do it all with perl functions, ... Aaron -- aaron_baugher@xxxxxxxxx ...
    (comp.lang.perl.misc)
  • Re: Help: How do I get the lists of groups a unix user is in?
    ... Brandon Hoppe wrote: ... "groups" at a command prompt. ... getgrnam(), getgrgid() etc. ...
    (comp.lang.perl.misc)