Assigning Groups

G

Glenn

I'm creating some e-mail groups in Active Directory.

I'd like to be able to add users (that have already been created) to various
groups by uploading the group names from a database.

For instance, I have a user named smithj, another named cupidh, and one
named doem. I have groups named Accounting, Department X, Payables, etc.

I want to add smithj to Department X and Payables; cupidh to Accounting; and
doem to Accounting and Payables.

I have all of this information in an excel spread sheet (a list of the users
in column A, and "X" under the appropriate heading in column b (Accounting),
c, d, etc.

Is there a way to import the group information?

Thanks,
Glenn
 
D

David Swales

Modify Distribution Group memberships through Exchange
Administrator, or Active Directory Users & Computers.
 
G

Glenn

Thanks for the reply. I know how to do it that way, however I have many of
them to do and was trying to come up with a little more automated way of
doing so.

I thought I had read somewhere that you could do an import.
 
C

Cary Shultz [A.D. MVP]

Glenn,

Have not really made use of csvde to do this but if you have an excel
spreadsheet already properly formatted you might consider using csvde. I
typically prefer ldifde but if you have the spreadsheet already I might look
into this.

HTH,

Cary
 
G

Glenn

I'm not really sure what ldifde is. I might be able to get my info into
that format if I know what it is.

Thanks again.
 
C

Cary Shultz [A.D. MVP]

Okay. That makes sense!

ldifde is LDAP Data Interchange Format and is used to import / export data
to / from the Active Directory. It is a really nice tool but has a rather
unforgiving syntax.

Take a look at the following MSKB Article:

http://support.microsoft.com/default.aspx?scid=kb;[LN];237677

You would have to create the .ldf file that you would use to import these
changes. It would look something like this:

=======================================================
dn: cn=dl_accounting,cn=users,dc=yourdomain,dc=net
changeType: add
member: cn=cupidh,cn=users,dc=yourdomain,dc=net
member: cn=doem,cn=users,dc=yourdomain,dc=net

dn: cn=dl_payables,cn=users,dc=yourdomain,dc=net
changeType: add
member: cn=smithj,cn=users,dc=yourdomain,dc=net
member: cn=doem,cn=users,dc=yourdomain,dc=net

dn: cn=dl_departmentx,cn=users,dc=yourdomain,dc=net
changeType: add
member: cn=smtihj,cn=users,dc=yourdomain,dc=net

=======================================================
This file would be of use if your set up was as such:

*all of your user account objects were in the default Users container,
*all of your distribution groups were also in the default Users container,
*your Distribution Groups had the names dl_accounting, dl_payables and
dl_departmentx

You would then site at a DC and enter "ldifde -i -f yourfile.ldf -s DCNAME"

ldifde is the command
-i is telling ldifde that you are doing an import
-f yourfile.ldf is the name of the .ldf file that you have created
-s DCNAME is the name of the DC to which you want to bind

This could be a lot of work upfront, especially for someone using it the
first time. I would suggest that you become familiar with it in a test lab
before using it in the production environment. This may not be feasible -
timewise.

HTH,

Cary
 
C

Cary Shultz [A.D. MVP]

One more thing to take into account that I should have stated in the above
message:

You need to look at it from the group point of view and not from the user
point of view. Meaning, you are adding user accounts to the group. So, for
XXX group I need to add Joe and Mary and Frank as a member and for YYY group
I need to add John and Peter and Sally as a member by making use of the
'member:' attribute. You can not go to a user account and try to make use
of the 'member of:' attribute; it will not work.

Many people doing this for the first few times they are using ldifde.

I would still take a look at csvde so lang as you have the excel
spreadsheet. Might be quicker for this time.

Cary


Cary Shultz said:
Okay. That makes sense!

ldifde is LDAP Data Interchange Format and is used to import / export data
to / from the Active Directory. It is a really nice tool but has a rather
unforgiving syntax.

Take a look at the following MSKB Article:

http://support.microsoft.com/default.aspx?scid=kb;[LN];237677

You would have to create the .ldf file that you would use to import these
changes. It would look something like this:

=======================================================
dn: cn=dl_accounting,cn=users,dc=yourdomain,dc=net
changeType: add
member: cn=cupidh,cn=users,dc=yourdomain,dc=net
member: cn=doem,cn=users,dc=yourdomain,dc=net

dn: cn=dl_payables,cn=users,dc=yourdomain,dc=net
changeType: add
member: cn=smithj,cn=users,dc=yourdomain,dc=net
member: cn=doem,cn=users,dc=yourdomain,dc=net

dn: cn=dl_departmentx,cn=users,dc=yourdomain,dc=net
changeType: add
member: cn=smtihj,cn=users,dc=yourdomain,dc=net

=======================================================
This file would be of use if your set up was as such:

*all of your user account objects were in the default Users container,
*all of your distribution groups were also in the default Users container,
*your Distribution Groups had the names dl_accounting, dl_payables and
dl_departmentx

You would then site at a DC and enter "ldifde -i -f yourfile.ldf -s DCNAME"

ldifde is the command
-i is telling ldifde that you are doing an import
-f yourfile.ldf is the name of the .ldf file that you have created
-s DCNAME is the name of the DC to which you want to bind

This could be a lot of work upfront, especially for someone using it the
first time. I would suggest that you become familiar with it in a test lab
before using it in the production environment. This may not be feasible -
timewise.

HTH,

Cary



Glenn said:
I'm not really sure what ldifde is. I might be able to get my info into
that format if I know what it is.

Thanks again.
might
look
way
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

addition or substraction 3
Multi-Forest and OUs, Groups 4
Group Servers 2
Groups 1
AD OU and Security Group Structure 1
AD organizational design 1
Combining Two Queries 1
Constants 1

Top