List group : User « System Functions « Perl






List group

      

#!/usr/bin/perl

use warnings;
use strict;

use User::grent;

while (my $group = getgrent) {
    print 'Name    : ', $group->name, "\n";
    print 'Password: ', $group->passwd, "\n";
    print 'Group ID: ', $group->gid, "\n";
    print 'Members : ', join(', ', @{$group->members}), "\n\n";
}

   
    
    
    
    
    
  








Related examples in the same category

1.Expired user
2.File group listing
3.Quota, change or age
4.Use User::pwent to access user data