Solved

Change Default LDAP CN on Active Directory users

Posted on 2009-05-07
5
2,015 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
ID: 24329105
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
ID: 24329107
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
ID: 24329230
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
ID: 24329271
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
ID: 24329608
Holy moly Ms. Hunter, you've got more credentials than I've got [insert lame joke here].
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
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 from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

774 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