[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.4

Double-hop authentication with ADSI

Asked by Jharper in Active Server Pages (ASP)

Ok.. This one is driving me crazy! I am trying to solve a problem for our developers. I'm no programmer but I made a basic page to update the description field of a test user in AD. I want to have my credentials to pass through this page to make the AD changes ( I am a domain admin).  

This page works if I make the following changes in IIS:
- I setup myself as the anonymous user and click on the page.
- It also works if I turn on just basic authentication and log in when prompted.
- When I pass my user info through the OpenDSObject() function.

This page does not work when I:
- Just enable Windows Integrated Authentication.
- Set the OpenDSObject() username and password to NULL which is supposed to pass the caller's credenitals. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adsi/adsi/iadsopendsobject_opendsobject.asp

Things I have done:
- I have changed the Metabase to NTAuthenticationProviders="Negotiate,NTLM"
- All this stuff: http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/security/kerbnlb.mspx

Any help with this would be much appreciated!

CODE:

<%
strContainer = "cn=Users"
strName = "john smith"

Const ADS_PROPERTY_CLEAR = 1
Const ADS_PROPERTY_UPDATE = 2
Const ADS_PROPERTY_APPEND = 3
Const ADS_PROPERTY_DELETE = 4
Const ADS_SECURE_AUTHENTICATION = 1


'***********************************************
'*          Connect to an object                 *
'***********************************************
oUsername=vbNullString
oPassword=vbNullString
Set objRootDSE = GetObject("LDAP://rootDSE")
Set openDS = GetObject("LDAP:")
If strContainer = "" Then
  Set objItem = GetObject("LDAP://" & _
    objRootDSE.Get("defaultNamingContext"))
Else
  Response.Write "LDAP://cn=" & strName & "," & strContainer & "," & objRootDSE.Get("defaultNamingContext") & "<br>"
  Set objItem = openDS.OpenDSObject("LDAP://cn=" & strName & "," & strContainer & "," & objRootDSE.Get("defaultNamingContext"),oUsername,oPassword,ADS_SECURE_AUTHENTICATION)
End If
'***********************************************
'*         End connect to an object           *
'***********************************************

Response.Write "Was: <BR>"
Response.Write objItem.DisplayName & "<BR>"
Response.Write objItem.Description & "<BR>"
Response.Write "<BR>"

objItem.Put "givenName", "John"
objItem.SetInfo
objItem.Put "initials", "JS"
objItem.SetInfo
objItem.Put "sn", "Smith"
objItem.SetInfo
objItem.Put "displayName", "John Smith"
objItem.SetInfo
objItem.Put "description", "Generated by ADTEST1"
objItem.SetInfo
objItem.Put "physicalDeliveryOfficeName", "DALLAS"
objItem.SetInfo
objItem.Put "telephoneNumber", "214-555-1212"
objItem.SetInfo
objItem.Put "mail", "jsmith@xxx.com"
objItem.SetInfo
objItem.Put "wWWHomePage", " "
objItem.SetInfo

Response.Write "Now: <BR>"
Response.Write objItem.DisplayName & "<BR>"
Response.Write objItem.Description & "<BR>"

objItem.PutEx ADS_PROPERTY_UPDATE, "otherTelephone", _
  Array("VALUE1", "VALUE2", "...VALUEn")
objItem.SetInfo
objItem.PutEx ADS_PROPERTY_UPDATE, "url", _
  Array("VALUE1", "VALUE2", "...VALUEn")
objItem.SetInfo

objItem.Put "streetAddress", "123 Main Street"
objItem.SetInfo
objItem.Put "l", " "
objItem.SetInfo
objItem.Put "st", "TX"
objItem.SetInfo
objItem.Put "postalCode", "75201"
objItem.SetInfo

'Response.Write VbCrLf & "**Non-standard value on Address Properties Page**"
'See Script Notes for information on setting this value.
'objItem.Put "c", "1"
'objItem.SetInfo

objItem.PutEx ADS_PROPERTY_UPDATE, "postOfficeBox", _
  Array("VALUE1", "VALUE2", "...VALUEn")
objItem.SetInfo

objItem.Put "profilePath", " "
objItem.SetInfo
objItem.Put "scriptPath", " "
objItem.SetInfo
objItem.Put "homeDirectory", " "
objItem.SetInfo

'See Script Notes for information on setting this value.
objItem.Put "homeDrive", " "
objItem.SetInfo

objItem.Put "homePhone", "214-555-1212"
objItem.SetInfo
objItem.Put "pager", "214-555-1212"
objItem.SetInfo
objItem.Put "mobile", "214-555-1212"
objItem.SetInfo
objItem.Put "facsimileTelephoneNumber", "214-555-1212"
objItem.SetInfo
objItem.Put "ipPhone", "214-555-1212"
objItem.SetInfo
objItem.Put "info", "214-555-1212"
objItem.SetInfo

objItem.PutEx ADS_PROPERTY_UPDATE, "otherHomePhone", _
  Array("VALUE1", "VALUE2", "...VALUEn")
objItem.SetInfo
objItem.PutEx ADS_PROPERTY_UPDATE, "otherPager", _
  Array("VALUE1", "VALUE2", "...VALUEn")
objItem.SetInfo
objItem.PutEx ADS_PROPERTY_UPDATE, "otherMobile", _
  Array("VALUE1", "VALUE2", "...VALUEn")
objItem.SetInfo
objItem.PutEx ADS_PROPERTY_UPDATE, "otherFacsimileTelephoneNumber", _
  Array("VALUE1", "VALUE2", "...VALUEn")
objItem.SetInfo
objItem.PutEx ADS_PROPERTY_UPDATE, "otherIpPhone", _
  Array("VALUE1", "VALUE2", "...VALUEn")
objItem.SetInfo

objItem.Put "title", "Computer User"
objItem.SetInfo
objItem.Put "department", "IT"
objItem.SetInfo
objItem.Put "company", "XXX"
objItem.SetInfo

'See Script Notes for information on setting this value.
objItem.Put "manager", " "
objItem.SetInfo

objItem.SetInfo
%>
[+][-]06/10/05 11:18 PM, ID: 14194382Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/13/05 08:31 AM, ID: 14203240Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/13/05 09:28 AM, ID: 14203828Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Active Server Pages (ASP)
Sign Up Now!
Solution Provided By: ihenry
Participating Experts: 2
Solution Grade: B
 
[+][-]06/17/05 06:41 AM, ID: 14240665Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/17/05 09:23 AM, ID: 14242600Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/12/05 06:44 AM, ID: 14421277Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/13/05 06:53 AM, ID: 14430955Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/02/05 01:10 PM, ID: 14582935Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/18/05 12:12 PM, ID: 14703457Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81