blackadder has asked for the wisdom of the Perl Monks concerning the following question:

O'Holly Ones,

I have written the script below to obtain user/group permission information, then I split the 'permissionees' into groups or users. It works (in terms of extracting the information), however, If I grant a local group access permission, the script will detect the changes but it leaves the field "account" empty. It only does this with local groups. example, if I grant the user john, the global group G_group1 and the local group l_group1 access permission to a remote drive (lets say g$) then I get an output like this:

This '' is a group account

This 'john' is a user account

Has anyone came across similar problem? Your replyies are highly appreciated.
use strict; use Win32::NetResource; use Win32::AdminMisc; use Win32::NetAdmin; use Win32::Perms; my $drive = shift @ARGV; my $srv; my $path; my $perms; if (Win32::NetResource::GetUNCName( $path,$drive)) { $path =~ /^\\\\(\w+)/; $srv = $&; print "\nServer " . $srv . "\n"; } $perms = new Win32::Perms($path) || die "\n$^E\n"; print "\nPath: " . $perms->Path() . "\n"; my $intgr = $perms->Get(\ my @perms); foreach my $permy (@perms) { while (my ($field, $data) = each %{$permy}) { next if $field !~ /account/i; if (Win32::NetAdmin::UsersExist('',$data)) { print "This '$data' is a user account\n"; } else { print "This '$data' is a group account\n"; } } print "\n\n"; }
Many Thanks and "A little example can go a long way"