logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Windows UserID
Author
viquarshaikh



Joined: 05 Jan 2007
Posts: 5
Location: Mumbai, India

PostPosted: Mon 08 Jan '07 15:01    Post subject: Windows UserID Reply with quote

Hi .. I'm new to using Apache and PHP and my only interaction with Apache was when I was learning Servlets/JSP.

I'm using PHP/MySQL for developing an intranet application for my department. I've installed Apache2Triad version 1.5.4

The problem I'm grappling with is this : We need to capture the Windows USERNAME that the network users logon with onto the Windows Network.

As far as I've read and seen Apache/PHP, the only solution for me seems to be using one of the modules mod_auth_ldap or mod_auth_sspi.

Unfortunately, being a novice I think I'm making some mistake in copying the mod_auth_XXXX.so file into the modules directory. The Manual/Readme files for the mod_XXXXX states that I'm supposed to copy the .so file in the modules directory and copy some text in the httpd.conf file. I've made the changes but after doing the changes , if I start the Apache Server, I get a message stating that Apache could not be started. However if I remove the newly added lines in httpd.conf file or comment them, the Server starts without any problem.

Please suggest a solution. Kindly tell me what would be the best and simplest way to obtain the UserNAME (from the Windows Login) of the person accessing the web page.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Mon 08 Jan '07 15:48    Post subject: Reply with quote

a) Is the module you downloaded for your apache version? (1.3x; 2.0.x; 2.2.x)
b) Is that module compiled with the same compiler as your apache?
c) are all related modules loaded?

I do run mod_auth_asspi on Win XP Pro SP2 fine.

in a .htaccess in your protected folder
Code:

AuthName "A Protected Place"
AuthType SSPI
SSPIAuth On
SSPIAuthoritative On
require valid-user
Back to top
viquarshaikh



Joined: 05 Jan 2007
Posts: 5
Location: Mumbai, India

PostPosted: Mon 08 Jan '07 16:29    Post subject: Reply with quote

Hi JB

The Apache version is 2.2

The module is mod_auth_sspi and is meant to run on Apache2 server

What do you mean by "Related Modules"

Do I have to compile any of the modules I download? I've tried copying the text you mentioned in the .htaccess file but still am faced with the same error.

Please help.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Mon 08 Jan '07 22:55    Post subject: Reply with quote

You need to load

auth_basic_module authn_default_module authz_user_module this modules are compiled by default, so you don't have to compile 'em.

Apache2.0 != 2.2.x many modules which are compiled for 2.0.x not work with 2.2.x

I downloaded it here
Back to top
viquarshaikh



Joined: 05 Jan 2007
Posts: 5
Location: Mumbai, India

PostPosted: Tue 09 Jan '07 9:36    Post subject: Reply with quote

Does that mean I just have to copy the .so files for these modules
(auth_basic_module; authn_default_module; authz_user_module) in the modules directory and then start the Apache Server?

I'm sorry for being too much of a simpleton on this but really appreciate your help.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Tue 09 Jan '07 10:19    Post subject: Reply with quote

You don't have to copy the *.so files. There must be a folder in the apache folder named modules. These modules have to be loaded in httpd.conf like the mod_auth_sspi.

i.e.
Code:

LoadModule auth_basic_module modules/mod_auth_basic.so



It might be OS related. Which Windows do you run? Made all updates?
Back to top
viquarshaikh



Joined: 05 Jan 2007
Posts: 5
Location: Mumbai, India

PostPosted: Thu 11 Jan '07 13:29    Post subject: Reply with quote

Hi

Was out for two days.

I'm using Windows XP Professional Service Pack 1.

Apache2Triad version 1.5.4
Apache version is 2.2


btw, the modules (auth_basic_module; authn_default_module; authz_user_module) are not to be found on the link you provided
http://www.gknw.net/development/apache/httpd-2.2/win32/modules/

I'll tell you what I've done so far

I've downloaded mod_auth_sspi-1.0.4 and copied the mod_auth_sspi.so file into the Modules directory.

Then I've copied the following text into the httpd.conf directory.

Code:
    LoadModule sspi_auth_module modules/mod_auth_sspi.so


I've made this the last module to be loaded.

Then I've added the following Files to the httpd.conf file at the end
Code:

<IfModule mod_auth_sspi.c>
    <Location / >
        AuthName "A Protected Place"
        AuthType SSPI
        SSPIAuth On
        SSPIAuthoritative On
        SSPIOfferBasic On
        # SSPIBasicPreferred
        # SSPIUsernameCase lower
        require valid-user
    </Location>
</IfModule>


Then I try to start the Apache Server and it says it cannot start . However it does start if I undo the changes I made above.

Please help.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Thu 11 Jan '07 14:33    Post subject: Reply with quote

You should download all binaries from http://www.gknw.net/ That makes sure that mod_auth_sspi will run!
Back to top
viquarshaikh



Joined: 05 Jan 2007
Posts: 5
Location: Mumbai, India

PostPosted: Thu 11 Jan '07 14:38    Post subject: Reply with quote

Ok... Let's say I get the source files for Apache then how do I compile them?

I don't have the VC++ compiler
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Thu 11 Jan '07 15:52    Post subject: Reply with quote

Visual Studio 8 for c++ is free von M$ to download
Back to top


Reply to topic   Topic: Windows UserID View previous topic :: View next topic
Post new topic   Forum Index -> Apache