开发者

Two users in ActiveDirectory with same name

开发者 https://www.devze.com 2023-04-05 21:22 出处:网络
I am creating app开发者_开发百科lication 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

I am creating app开发者_开发百科lication 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号