Solved

LDAP manager Attribute - trying to write it

Posted on 2012-03-29
5
550 Views
Last Modified: 2012-03-29
Does anyone have an example of how to write the manger LDAP attribute - I can not get it to work it keeps telling me constraint error
0
Comment
Question by:r3nder
  • 3
  • 2
5 Comments
 
LVL 27

Expert Comment

by:KenMcF
ID: 37783615
Can you post the code you are using?

The manager attribute needs a Distinguished name, is that what you are using?
0
 
LVL 6

Author Comment

by:r3nder
ID: 37783790
I am getting the supervisor name (ex John Doe) and concatinating everything to see if it works

sManager = drUpdateOptions.Item("supervisor_nm").ToString.Trim
'''''''''''''''''''''''''''''''''''''
 If sSupervisorUserID.Trim.Length > 0 Then
                    Dim sDistinguishedName As String = String.Empty
                    If IsValidADLogin(sSupervisorUserID, "", "", "") Then

                        sDistinguishedName = getSupervisorDN(sSupervisorUserID, asProcessingDate, asDomain)
                    End If
                    Dim newManager As String = "CN=" & sManager & ",OU=Dallas (GREP SOMEWHERE),OU=OU,DC=COMPANY,DC=com"
                    'sNotFoundInitial = SetADProperty(dirEntryResults, "manager", sDistinguishedName) 
                    sNotFoundInitial = SetADProperty(dirEntryResults, "manager", newManager)                 End If

Open in new window

0
 
LVL 6

Author Comment

by:r3nder
ID: 37784399
I have the mangers login (example jdoe0123) and I have the display name (example John Doe) can you give me a way to use either of those 2 to write an if statement to get the distinct name from that?
0
 
LVL 27

Accepted Solution

by:
KenMcF earned 500 total points
ID: 37784429
take a look at this link, it is getting a DN for a group but you can change to get it for a user object


http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Basic.NET/Q_26293016.html
0
 
LVL 6

Author Closing Comment

by:r3nder
ID: 37785009
Worked like a champ! Thanks KenMcF
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Domain admin accounts get locked out 35 60
SqlServer no dupes 25 35
ASP/VB email question 4 35
SQL SERVER 2008 R2 Could not obtain information about Windows NT group/user 5 36
[b]Ok so now I will show you how to add a user name to the description at login. [/b] First connect to your DC (Domain Controller / Active Directory Server) SET PERMISSIONS FOR SCRIPT TO UPDATE COMPUTER DESCRIPTION TO USERNAME 1. Open Active …
Last week, our Skyport webinar on “How to secure your Active Directory” (https://www.experts-exchange.com/videos/5810/Webinar-Is-Your-Active-Directory-as-Secure-as-You-Think.html?cid=Gene_Skyport) provided 218 attendees with a step-by-step guide for…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question