Q

Create a group in Active Directory and add members

I want to create a group in the AD and add some members to it using the LDIFDE tool. When I am trying to create...

the group and add one member, every thing works fine.

dn: CN=Adm,OU=Groups,DC=reskit,DC=com changetype: add objectClass: group samAccountName: Adm description: ADM Group member: CN=Daniel Dvir,OU=Test,DC=reskit,DC=com However, when I try to add several members at once, I get an error message. dn: CN=Adm,OU=Groups,DC=reskit,DC=com changetype: add objectClass: group samAccountName: Adm description: ADM Group member: CN=Daniel Dvir,OU=Test,DC=reskit,DC=com member: CN=Gearshon Israeli,OU=Test,DC=reskit,DC=com What am I doing wrong?

You cannot add multiple members at the same time in the same add block. You must build additional modify blocks following the initial add as follows:

dn: CN=newgroup1,CN=Users,DC=company,DC=com changetype: add cn: newgroup1 distinguishedName: CN=newgroup1,CN=Users,DC=company,DC=com instanceType: 4 name: newgroup1 objectCategory: CN=Group,CN=Schema,CN=Configuration,DC=company,DC=com objectClass: group sAMAccountName: newgroup1

dn: CN=newgroup1,CN=Users,DC=company,DC=com changetype: modify add: member member: CN=newuser3,CN=Users,DC=company,DC=com

dn: CN=newgroup1,CN=Users,DC=company,DC=com changetype: modify add: member member: CN=newuser2,CN=Users,DC=company,DC=com

dn: CN=newgroup1,CN=Users,DC=company,DC=com changetype: modify add: member member: CN=newuser1,CN=Users,DC=company,DC=com

This was last published in July 2001

Dig Deeper on Microsoft Active Directory

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchServerVirtualization

SearchCloudComputing

SearchExchange

SearchSQLServer

SearchWinIT

SearchEnterpriseDesktop

SearchVirtualDesktop

Close