Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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:

http://stackoverflow.com/questions/8751690/using-integrated-windows-authentication-in-a-perl-dancer-app

http://www.perlmonks.org/?node_id=821419

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?

thanks!

Comment on Obtaining Windows username from an intranet ActiveState Perl script
Re: Obtaining Windows username from an intranet ActiveState Perl script
by Plankton (Priest) 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 http://www.quest.com/identity-management/ 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 CGI.pm? FastCGI? mod_perl?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (10)
As of 2014-08-20 17:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (120 votes), past polls