chriskeeler2 wrote:
> Is there any way to get the current user logged into a
client (Windows XP), and
> pass those credentials into an ldap request?
>
> Basically I want to create an Intranet site, where the
users will
> automatically be authenticated from thier Windows login
credentials already on
> the client.
>
> Any help would be great.
> Thank you.
> -Christopher Keeler
>
Yes there is a way. As long as we are talking Microsoft
clients using
Microsoft browsers connecting to a Microsoft network.
.
.
.
.
.
.
.
.
Oh, you would like some hints on how?
In IIS manager, select the resource(s) [website(s), folder(s)
or
file(s)] you would like to authenticate users in this manner
and under
the security tab in properties, edit the authentication
method to use
"Windows Integrated Authentication" and make user "Anonymous
Access" is
unchecked. When this is done, cgi.auth_user (or is it
cgi.authuser)
will be populated with the domain/userID of the logged on
user of the
client accessing the resource.
This can then easily be used in a <CFLDAP ...> tag to
retrieve Active
Directory information about this user. This is how we use it
on our
intranet web site.
<cfldap
name="Entity" username="xxx" password="xxx"
server="xxx"
action="query"
attributes="displayname,mail,sn,cn,givenName,..."
scope="subtree" start="DC=smfbc,DC=org"
filter =
"(&(objectCategory=CN=Person,CN=Schema,CN=Configuration,DC=smfbc,DC=org)(samAccountName=#arguments.userid#))">
We also use this bit of code to find out the machine name of
the client
accessing the resource.
<cfexecute name="C:\WINDOWS\system32\nbtstat.exe"
arguments="-A
#cgi.REMOTE_HOST#" timeout="5" variable="nbtstat"/>