I'm trying to retrieve the username of the user logged into a machine when a person visits my page on our intranet. I've looked over cfntauthenticate but that's not going to do what I need it to do.
Is this even possible with coldfusion or should I be looking to asp?
Now, it's just an LDAP problem, not necessarily Coldfusion.
I'd say that a basic LDAP tutorial might help. Check this Wikipedia page and the external links.
I ended up figuring it out. Here's what my cfldap looks like: -
<cfldap
-
server = "Domain Controller"
-
action = "query"
-
name = "results"
-
start = "DC=ha2000,DC=com"
-
filter="samAccountName=#form.name#"
-
attributes="cn,displayname,title,mail,member,memberof"
-
username="xxxxxx"
-
password="xxxxxxx"
-
sort = "memberof ASC">
-
11 9250
If you're using IIS and Integrated Windows Authentication, cgi.auth_user should be set to DOMAIN\username.
If you're using IIS and Integrated Windows Authentication, cgi.auth_user should be set to DOMAIN\username.
Yeah I turned on Integrated Windows Authentication and now I can get the username of the person logged in. I need to be able to retrieve a list of the groups the user is a member of on our active directory.
I'm trying to use th cfldap, but I'm not getting any data back: - <cfldap
-
server = "domain controller server"
-
action = "query"
-
name = "results"
-
start = "dc=xxxx,dc=xxx"
-
filter = "(&(objectclass=group)(name=Domain Admins))"
-
attributes = "cn,ou,dn,mail,memberOf"
-
sort = "cn ASC">
-
-
Is there a really simple cfldap query I can run to make sure I'm making the connection to the server?
See if this tutorial helps.
That helps give me some info, I think I need to have a better understanding of how to query LDAP, I think that might be where my problem is.
If you haven't already, also check out the reference. You could test with a public server (emailman has some useful info.).
If you haven't already, also check out the reference. You could test with a public server (emailman has some useful info.).
I'm able to query LDAP for info, but I can't seem to get the data I'm looking for.
I want to either check if a user is a member of a particular group, or at least retrieve all the groups a user is a member of, whichever one I can do.
Now, it's just an LDAP problem, not necessarily Coldfusion.
I'd say that a basic LDAP tutorial might help. Check this Wikipedia page and the external links.
Now, it's just an LDAP problem, not necessarily Coldfusion.
I'd say that a basic LDAP tutorial might help. Check this Wikipedia page and the external links.
I ended up figuring it out. Here's what my cfldap looks like: -
<cfldap
-
server = "Domain Controller"
-
action = "query"
-
name = "results"
-
start = "DC=ha2000,DC=com"
-
filter="samAccountName=#form.name#"
-
attributes="cn,displayname,title,mail,member,memberof"
-
username="xxxxxx"
-
password="xxxxxxx"
-
sort = "memberof ASC">
-
Glad you got it working. Thanks for posting.
for future, you can download Softerra LDAP Browser (free version) and tweak your filter as much as you like without it being too much of a pain
for future, you can download Softerra LDAP Browser (free version) and tweak your filter as much as you like without it being too much of a pain
Thanks for that info, I've got Softerra LDAP Browser now, it's how I've been figuring out what fields I can retrieve now.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: dave |
last post by:
Hi
I'm writing one asp page and developing application for intranet...
I just need to know when if anyone executes this scripts, i need to find out his windows login information (only username on...
|
by: bob |
last post by:
hi,
I want to redirect my user to another page.
With ASP (not .Net) and IIS 5.0, under windows 2000 server.
We have installed the component WinHTTP that is used to manipulate http
requests.
...
|
by: vvenk |
last post by:
Hello:
I would like to know how I can programmtically retrieve the windows login
id? This is a asp.net application.
Thanks.
venki
|
by: JIM.H. |
last post by:
Hello,
My connection string in config.web:
<appSettings>
<add key="connStr"
value="workstation id=myServer;packet size=4096;user id=MyUser;data
source=MYSERVER;persist security info=True;initial...
|
by: FayeC |
last post by:
I have created a site in Joomla with a login (no self registration,
users are provided with username and password by the admin).
The users are supposed to login to a specific page where they can...
|
by: CodeRazor |
last post by:
How can I retrieve the currently logged in user's username?
I have tried the option below:
Request.ServerVariables("LOGON_USER") while denying access to the Anonymous
user both in the config and...
|
by: Mike P |
last post by:
How do you get the Windows login and password of the person who is
logged in? Is it possible?
*** Sent via Developersdex http://www.developersdex.com ***
|
by: avnaresh |
last post by:
i have a windows application in c#. i want to run it as windows login i.e at the starting of windows os instead of username and password it will run my application. is it possible?
|
by: =?Utf-8?B?Sm9zZXBo?= |
last post by:
In a Winform application using VB.Net is there a way to capture the user's
Windows login name? Any help would be greatly appreciated, thanks.
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
| |