physi has asked for the wisdom of the Perl Monks concerning the following question:
Brothers,
I'm trying to get the full name of the current user on NT. Normaly I can use $<, $> from that kind of stuff. But this does not work on NT. So I can use $ENV{USERNAME} instead. This gives me the logon name. In the Usermanager there is a field where the whole Username is specified. I need to access this Information. I tried out Win32::NetAdmin but this shows me only the names of my local machine. I'm currently working in a big department, so there are many different Recourcedomains and one Masterdomain. The Accounts are on the masterdomain. So what can I do to get the Information I need? When I use this:
I'm trying to get the full name of the current user on NT. Normaly I can use $<, $> from that kind of stuff. But this does not work on NT. So I can use $ENV{USERNAME} instead. This gives me the logon name. In the Usermanager there is a field where the whole Username is specified. I need to access this Information. I tried out Win32::NetAdmin but this shows me only the names of my local machine. I'm currently working in a big department, so there are many different Recourcedomains and one Masterdomain. The Accounts are on the masterdomain. So what can I do to get the Information I need? When I use this:
I get a hash filled with the users of the local machine.use Win32::NetAdmin qw(GetUser); GetUser('',undef,\%hash);
So I thought that:
... should give me all the users in the masterdomain. But it doesn't. I get an empty hash. Do I need admin privileges to do that? Or what can I do to get the Infomation I need without having admin-privileges ?use Win32::NetAdmin qw(GetUser); GetUser('masterdomainservername',undef,\%hash);
Any help is welcome :-)
Cheers,
----------------------------------- --the good, the bad and the physi-- -----------------------------------
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: userinfo on NT
by the_slycer (Chaplain) on Jul 12, 2001 at 18:26 UTC | |
by physi (Friar) on Jul 12, 2001 at 19:30 UTC | |
Re: userinfo on NT
by OzzyOsbourne (Chaplain) on Jul 12, 2001 at 18:37 UTC | |
by RayRay459 (Pilgrim) on Jul 13, 2001 at 01:31 UTC | |
by ybiC (Prior) on Jul 13, 2001 at 02:11 UTC | |
by OzzyOsbourne (Chaplain) on Jul 13, 2001 at 15:41 UTC | |
by RayRay459 (Pilgrim) on Jul 18, 2001 at 02:27 UTC | |
by RayRay459 (Pilgrim) on Jul 12, 2001 at 21:42 UTC | |
Re: userinfo on NT
by mikeB (Friar) on Jul 12, 2001 at 18:23 UTC | |
Re: userinfo on NT
by joefission (Monk) on Jul 12, 2001 at 23:15 UTC |
Back to
Seekers of Perl Wisdom