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)

Replies are listed 'Best First'.
Re: Re: userinfo on NT
by physi (Friar) on Jul 12, 2001 at 19:30 UTC
    Looks like this will do exactly what I need (I really need only the full name, not all the users from the domain).

    BUT ...

    where can I get Win32::Lanman ??
    I found the pod on the web, but no source :(
    Please gimme a hint :)
    Thanks.
    ----------------------------------- --the good, the bad and the physi-- -----------------------------------
    Update: found it under: http://sunsite.compapp.dcu.ie/pub/perl/modules/by-module/Win32/JHELBERG/