Ask the Expert

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?

Requires Free Membership to View

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 first published in July 2001

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
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
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: