Jump to content

how to enable windows login dialog in php/apache


sunilvadranapu

Recommended Posts

Hi,

  how can i generate windows login dialog when ever users access my PHP application.

  I am running PHP on Apache. what configurations i need to do on apache side and php side.

  On IIS, we can enable "Integrated Windows authentication". how can i do this on apache and PHP?

  please guide me in this regard.

 

  thanks in advance.

 

-sunil

Link to comment
Share on other sites

You're posting your question on a wrong forum. You have a section for this.

 

I assume that you are asking how to protect access to the phpmyadmin, or something like that

 

For phpmyadmin, you need to access config.inc.php and change line number 71 to

$cfg['Servers'][$i]['auth_type']     = 'http'; 

 

So when you try to access phpmyadmin it will pop up a window and ask you for the username and password.

 

Correct me if I have missunterstood?

Link to comment
Share on other sites

 

Hi, thanks for your reply.

my question is: In IIS security tab, we can set "Integrated windows authentication" for our webapp, then login window will ask for windows username and password. i want the same functionality in apache/PHP. how to configure apache to enable windows login dialog box when user access my PHP webapp??

 

Thanks,

Sunil

Link to comment
Share on other sites

if you want to secure a section of a web app you are better off having an html login page and holding login information in a mysql database. otherwise you would have to have a login script on every page.

 

Ray

Link to comment
Share on other sites

thanks for your replies.

 

I can put a login page but the thing is all of us already having network/windows logins here and instead of giving them another login and pwd, i am thinking it is better to ask them to enter same windows loign/pwd.

 

if i am able to enable the windows login dialog, then they can login with their windows loign/pwd and i can keep them in sessions and can proceed with that.

 

any alternative for this??

 

Thanks,

Sunil

Link to comment
Share on other sites

my problem is :

 

We have a Windows file server with some shared folders. We have a web

server running Apache on Suse. We want to give access to the shared

folders via PHP running on apache(the web server) only to the valid Windows users. We can not

use the normal authenication techniques commonly used in Apache like

basic, authentication, dbm, or LDAP.

 

I wanted to know if there is any way to authenticate users against a

Windows domain on Apache running in Linux? I couln't find any useful

information on Google. Can anyone point me the appropriate resources?

 

thanks,

Sunil

Link to comment
Share on other sites

Well to be honest, even if you did it wouldn't help. Working with remote files is not one of php's strong points or any web based language for that matter. You won't be able to browse shared directories on the windows box from the linux box. Only way to do something like that would be to setup an FTP server on the windows server and have linux connect to it through some login script. Even then transferring the files would be a nightmare. You would have to transfer the file to the linux box through ftp then download the file from the linux box.

Link to comment
Share on other sites

Hi all,

  I got one solution for this using  NTLM module with Apache.

  I have downloaded and installed NTLM from sourceforce (http://sourceforge.net/project/showfiles.php?group_id=4906&package_id=75281).

  Find the configuration procedure at http://www.section6.net/wiki/index.php/Setting_up_Apache_2.2.x_for_NTLM_Authentication_using_Mod_NTLM2

 

  Now i am able to read the windows login username with PHPs $_SERVER['REMOTE_USER'].

 

  Thanks for all your help and time.

 

  please let me know if there any other solution for this.

 

Thanks,

Sunil

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.