Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^4: Obtaining Windows username from an intranet ActiveState Perl script

by saa (Initiate)
on Feb 07, 2013 at 00:55 UTC ( #1017533=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Obtaining Windows username from an intranet ActiveState Perl script
in thread Obtaining Windows username from an intranet ActiveState Perl script

Because the users are on intranet and it's a Microsoft IT environment, their browser automatically identifies who they are (I believe using NTLM authentication).

Using ASP, the variable is HttpContext.Current.User

The original post that I linked to also describes this scenario (where the intranet user never has to supply their username/password to the site, but the site can still obtain it).


Comment on Re^4: Obtaining Windows username from an intranet ActiveState Perl script
Re^5: Obtaining Windows username from an intranet ActiveState Perl script
by Anonymous Monk on Feb 07, 2013 at 08:24 UTC
    So, you're running this "perl script" under what environment? Have you looked inside %ENV?
      I am running this script using Apache Web Server on Windows. I have tried the code that displays all variables inside of %ENV, but in terms of identifying the users that shows only their IP and not their username.

        but in terms of identifying the users that shows only their IP and not their username.

        Did you setup NTLM authentication on apache? For the URI where your program runs? What interface (mod_perl/cgi)?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2014-12-21 13:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (105 votes), past polls