Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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:
use Win32::NetAdmin qw(GetUser); GetUser('',undef,\%hash);
I get a hash filled with the users of the local machine.

So I thought that:

use Win32::NetAdmin qw(GetUser); GetUser('masterdomainservername',undef,\%hash);
... 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 ?

Any help is welcome :-)

Cheers,

----------------------------------- --the good, the bad and the physi-- -----------------------------------

In reply to userinfo on NT by physi

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-26 06:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found