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

Obtaining Windows username from an intranet ActiveState Perl script

by saa (Initiate)
on Feb 06, 2013 at 21:09 UTC ( #1017505=perlquestion: print w/replies, xml ) Need Help??
saa has asked for the wisdom of the Perl Monks concerning the following question:

hi everyone,

I have a Perl web script running on Apache in Windows, and I'd like to get the Windows usernames of the users who access this script. Everyone who accesses this script will be on intranet and running Windows.

I think I found this exact question at:

However, the solution presented there was to use Apache2::AuthenNTLM. For my Perl I'm using ActiveState Perl on Windows, and this module does not show up in Perl Package manager. I tried getting it and compiling it, but it does not compile properly under windows. I looked around for other packages to get this information, but most of the other NTLM packages seem to be around the script authenticating itself with NTLM, rather than the script being able to read username using that information.

Does anyone know how I could get AuthenNTLM running under ActiveState Perl, or have ideas for other packages or techniques I could use to solve this problem?


  • Comment on Obtaining Windows username from an intranet ActiveState Perl script

Replies are listed 'Best First'.
Re: Obtaining Windows username from an intranet ActiveState Perl script
by Plankton (Vicar) on Feb 06, 2013 at 22:40 UTC
      Is Basic Apache authentication able to automatically get the person's Windows username without prompting them?
        Its like any other authentication scheme, the user supplies the username and a password. Or does Apache2::AuthenNTLM somehow read the mind of the person on the other end of the network and determine their window's username? Not even windows can get a person username until they type it in to the login screen. Maybe what you are looking for is a single sign on solution. If so why didn't ask about that? I have used products from Quest that handle Apache authentication with Window credentials but its not free or opensource.
Re: Obtaining Windows username from an intranet ActiveState Perl script
by Anonymous Monk on Feb 07, 2013 at 08:24 UTC
    What webserver are you using, what protocol?
      Apache HTTP Server 2.0, HTTP protocol.

        Apache HTTP Server 2.0, HTTP protocol.

        Are you using FastCGI? mod_perl?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1017505]
Approved by blue_cowdawg
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (13)
As of 2018-06-22 15:24 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (124 votes). Check out past polls.