Solved

Change Default LDAP CN on Active Directory users

Posted on 2009-05-07
5
2,013 Views
Last Modified: 2012-06-27
We moved from a Novell NetWare server to a MS Windows Server 2003 AD server recently... users were migrated using a utility by Quest software and everything worked out great - until now.

When the migration utility copied over the users, the CN in an LDAP query was the same as our usernames (FirstInitialLastname) - this is what we wanted because one of the applications we use query via LDAP but does not let us specify which field to query (So we can't force the program to pull sAMAccountName - it only pulls the CN). Again, this has been working fine since the CN is the same as the username... except - all new users... users that weren't on the Novell server, the CN is FirstName LastName.

I looked around on Google and found Adsiedit and it mentioned:
# In the right-hand pane, open the properties for "CN=user-Display".
# Scroll to the createDialog optional property.
# Set the attribute to %<sn>.%<givenName>. Make sure that you click Set.
Note The only tokens that can be formatted in the dislayName are %<sn>, %<givenName>, and %<initials>.

It doesn't let me use %<sAMAccountName > or %<userPrincipalName>.

So how can I do this? How can I make the default CN be the same as the username?

I've seen ADAM mentioned but I haven't looked into it too much. If I made an ADAM server and tied it into our AD database could I "re-arrange" the fields a bit?

Thank you for your time.
0
Comment
Question by:sbrown_cesd
  • 2
  • 2
5 Comments
 
LVL 15

Expert Comment

by:zelron22
Comment Utility
When you look at the General tab of a migrated user's properties in AD Users and Computers, what does it show for First Name and Last Name?
0
 
LVL 30

Accepted Solution

by:
LauraEHunterMVP earned 250 total points
Comment Utility
To my knowledge, you cannot enforce this using only native AD tools like ADSI Edit or AD Users & Computers. You'll need to use either a home-grown or paid provisioning script or tool (roll your own user creation VBScript, Powershell or web page) that will populate CN automatically using the same value as sAMAccountName. Unfortunately, native string validation functionality within AD is somewhat limited, as you're discovering.
0
 

Author Comment

by:sbrown_cesd
Comment Utility
zelron22:
Username: sbrown
First Name: Scott
Last Name: Brown
Display Name: Scott Brown
CN= sbrown

LauraEHunterMVP:
I was afraid of that... I saw some scripts online - I might have to play with those on a test domain controller (don't want to accidentally wipe out my server :-) )
0
 
LVL 30

Expert Comment

by:LauraEHunterMVP
Comment Utility
Thing with AD is that it's really good at publishing information and replicating it everywhere. It's really not good at (nor was it intended to be good at) enforcing "business rules" such as the proper way to format a telephone number or the name of a city, etc.
0
 
LVL 15

Expert Comment

by:zelron22
Comment Utility
Holy moly Ms. Hunter, you've got more credentials than I've got [insert lame joke here].
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Starting in Windows Server 2008, Microsoft introduced the Group Policy Central Store. This automatically replicating location allows IT administrators to have the latest and greatest Group Policy (GP) configuration settings available. Let’s expl…
Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
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 …

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now