in reply to userinfo on NT
Update Ok, This is better now. Here's how to use Win32::Lanman to do this.
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)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;
In Section
Seekers of Perl Wisdom