Q:

Two users in ActiveDirectory with same name

I am creating application that will add new users to AD through LDAP.
I can generate users, but my problem is when I have two users with same givenname and sn, because I construct name and cn from (givenname [space] sn), and from there I also construct DN (distinguished name). The problem is with same cn and path both users have same DN
I can not put users in different OU's, they have to have same path.
What is the best way to handle this automaticly? Just add a number to cn? Add another attribute to cn? 

A:

Adding a number is a common approach. The approach I prefer however is to set the CN to something guaranteed to be unique, e.g. employee ID or username. 

