This topic is locked

logon with server 2003 password and username?

7/30/2008 10:47:09 AM
PHPRunner General questions
S
swanside author

We have a windows server 2003, everybody has the a username and password.
What happens is, when we log onto our database, we first have to enter our server username and password, then up comes the database logon screen where we have to enter another username and password.
Is there a way to get the username and password from the windows server 2003 and use that to logon to our database, so we only have to do it once?
Thanks

Paul.

T
thesofa 7/30/2008

Use LDAP authentication, this will allow users to log onto the database using their Win2K3 username and password.

You will need to have Admin Access to the Win2K3 server.

are you hoping to use the PHP application outside of the premises where you have the win2K3 server, because if you are then you may have security isssues with allowing access to the server from outside for authentication.

Have fun, there is a HowTo about LDAP authentication here

Have Fun
Just read the post again, this will not do a single sign on for you, but it will allow users to have just one username and password.

Another method is to control access to the web pages according to IP address, so for example, I limit access to the behaviour databases in schiool here to just the staff PCs, they all have reserved IP adddresses via dhcp, and all within a subnet so only those machines in that subnet ( which is outside of the normal scope of the DHCP server) can read the files.

A lot depends on the web server you use.

If you are using Apache and PHP, you need to search for LDAP and single sign on on the Net and read lots, I still haven't cracked it yet.

S
steveh 7/30/2008

Just set permissions on the directory and disable anonymous access in IIS, then code your logon to use the AuthUser (not at my desk, but check the correct variable) and you can trust that to be your Windows username (and domain, think it comes back as domain\username so you'll need to trim it).

T
thesofa 7/30/2008

That sounds easier than LDAP Steve, is it IIS specific?

S
steveh 7/30/2008

No, the variable applies to any webserver that can authenticate.

Quite what the meaning would be on other servers you'd need to check (on apache, it's the username specified in the access file for instance, assuming standard authentication).