http://qs321.pair.com?node_id=96041


in reply to userinfo on NT

Update Ok, This is better now. Here's how to use Win32::Lanman to do this.
use Win32::Lanman; my $domain="DOMAINNAME"; my $pdc; my $username; my %info; Win32::Lanman::NetGetDCName('',$my_domain,\$pdc); Win32::Lanman::NetUserGetInfo($pdc, $username, \%info); print "$_ == $info{$_}\n" foreach keys %info;
This is of couse assuming that you are after what you asked (ie full name of $env{username} ) vs the code you posted (ie enumerating all users in the domain)