1

I need to retrieve the username of the windows user logged in currently when he is accessing my intranet page. I am trying to authenticate my webpage using SSPI(mod_auth_sspi.so) on Windows Server 2008, with Apache 2.2. I have made the following changes to the httpd.conf file and added my intranet site to the trusted sites on browser settings. My webpage is in Perl and am using CGI.pm. I am attempting to retrieve the username via $cgi->user_name() and $cgi->remote_user() and also, checking for the REMOTE_USER and AUTH_USER cgi ENV Variables to get the username.

<IfModule !mod_auth_sspi.c>
    LoadModule sspi_auth_module modules/mod_auth_sspi.so
</IfModule>

<Directory "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/TestWeb/">
<Files Test.pl>
AuthName "TestWeb"
AuthType SSPI 
SSPIAuth On 
SSPIAuthoritative On 
SSPIOfferBasic Off
Require valid-user 
SSPIDomain domain name
</Files>
</Directory>

I have restarted apache after the changes. I don't see the cgi Environment variable to get the userid in the environment variables. I have searched the same forum and others and this is what they have all done and seems to work. Am I missing something? Appreciate any help.

Thanks

  • Got it working for me by including Options FollowSymLinks ExecCGI Order allow,deny Allow from all in the directory directive. I had the original files being referred to from another directory location. – Suzun Apr 3 '13 at 18:50
0

Got it working for me by including Options

FollowSymLinks ExecCGI Order allow,deny Allow from all

in the directory directive. I had the original files being referred to from another directory location.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.