Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: userinfo on NT

by the_slycer (Chaplain)
on Jul 12, 2001 at 18:26 UTC ( #96041=note: print w/replies, xml ) Need Help??

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 :)
    ----------------------------------- --the good, the bad and the physi-- -----------------------------------
    Update: found it under:

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://96041]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (2)
As of 2023-01-29 06:02 GMT
Find Nodes?
    Voting Booth?

    No recent polls found