?
Solved

how to add a user to active directory from command line, also specifying the password and the email address

Posted on 2008-10-09
8
Medium Priority
?
344 Views
Last Modified: 2012-05-05
i want to add users to active directory from command line, i must be able to

(1) create the user
(2) specify which active directory security group the user should be added to
(3) include the email address of the user

i have admin access to the active directory, not sure what else is needed to create the user.

please help me understand what is  the meaning of "DC" and "OU" and how and where to find this information on the server. i am sure this information is used while creating the user.
0
Comment
Question by:tarcot
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 70

Expert Comment

by:KCTS
ID: 22683713
You can create users with a variety of tools such as CSDVE, LDIFDE, VBSCRIPT or (with 2003/8 the DSadd commands) see http://www.computerperformance.co.uk/Logon/DSadd_add_user.htm

but why - I would help to know exactly what you are trying to achieve.
0
 

Author Comment

by:tarcot
ID: 22683762
i am specifically interested with the dsadd command, we get a nightly feed of users that are needed to be added to the domain, we use sharepoint, so the next day these users automatically get authenticated when they login.

i am not sure i should  add it in the wss_ou, we are talking about 120,000 users that need to be created.
although creation of these users is a one time thing, there will be 100's of users each day that need to be either added or deleted..

we have a dedicated active directory server to handle this volume.

also in the link that you have sent it does not indicate how  to assign the user to a group, is there a seperate command that i could use to assign user to a group..?



0
 
LVL 70

Expert Comment

by:KCTS
ID: 22683784
OK, I see where you are coming from. Theres a lot more on the DS commands (DSadd, DSMod and DSrm) at http://www.computerperformance.co.uk/Logon/DSadd_add_user.htm

As you have so many users to manage in this way, it probably worth looking at third party tools
eg http://manageengine.adventnet.com/products/ad-manager/active_directory_bulk_user_management.html
and
http://www.dovestones.com/products/Active_Directory_User_Import_Features.asp
0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 

Author Comment

by:tarcot
ID: 22683826
thanks for the resources, i will definetly consider looking more deeply into it

i did see an entry in the third link that you sent

Group memberOf "CN=ManagersGroup,DC=Domain,DC=Com"

can we use the above syntax with the dsadd command in any way. i believe this is the only thing that is missing.
0
 
LVL 70

Accepted Solution

by:
KCTS earned 1500 total points
ID: 22683846
you can use the -memberOf option
see http://forums.techarena.in/active-directory/704257.htm for an example
0
 

Author Comment

by:tarcot
ID: 22683892
please apologize my ignorance, i am not sure i have understood completly what this means

DSadd user "CN=Last\, First,OU=AB,DC=Xyxyxyx,DC=Com" -pwd Password -samid
First.last -fn First -ln Last -empid 12345 -display "Last, First" -loscr
Script.vbs -upn First.Last@Xyxyxyx.com -memberof "CN=.Abc
Def,OU=AB,DC=Xyxyxyx,DC=com"

please explain
(1) what is -loscr Script.vbs
(2) what is -upn (looking at the example above it looks like an email address for the user)
(3) -pwd, -fn, -ln,  -empid,-display  seem to be various attributes that can be specifed while user creation - am i right..?
(4) i assume that abcbef is the name of the AD security group -- is my understanding correct
0
 

Author Comment

by:tarcot
ID: 22684032
i tried the example on the server and got the following error

dsadd user "CN=mytest.user,OU=wss_ou,dc
=s265601-ad01,dc=corp" -pwd Dummy123 -upn a@b.com -memberof
 "cn=Broker,ou=wss_ou,dc=s265601-ad01,dc=corp"
dsadd failed:CN=mytest.user,OU=wss_ou,dc=s265601-ad01,dc=corp:Directory objec
t not found.:The object was created successfully but there was an error during p
ost create operations.
type dsadd /? for help.

my ou name is wss_ou which i just created using the following command
dsadd ou "ou=wss_ou, dc=s265601-ad01,dc=corp"

not sure if there is something else i should do...?
0
 

Author Closing Comment

by:tarcot
ID: 31504895
it worked
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Active Directory security has been a hot topic of late, and for good reason. With 90% of the world’s organization using this system to manage access to all parts of their IT infrastructure, knowing how to protect against threats and keep vulnerabil…
This process allows computer passwords to be managed and secured without using LAPS. This is an improvement on an existing process, enhanced to store password encrypted, instead of clear-text files within SQL
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question