Solved

Proper Syntax for DSADD Command

Posted on 2010-08-12
6
1,777 Views
Last Modified: 2012-05-10
Hi folks!

I am trying to add users to our Windows Server 2003-based Active Directory domain using the dsadd command. Unfortunately, even after looking through the documentation and knowledge base articles online, I am still apparently getting something wrong about the syntax.

Our domain name is a three-part name in the format "name1.name2.com". Here is the syntax I am using for the command:

dsadd user "CN=jdoe,CN=Users,DC=name1,DC=name2,DC=com" -fn "FirstName" -ln "LastName" -display "FullName" -pwd xxxxxx -memberof "CN=Students1" -hmdir \\server\home$\$username$ -hmdrv U: -profile \\server\profiles$\$username$ -mustchpwd yes -disabled no

When I execute that command, I receive the following error:

dsadd failed:CN=jdoe,CN=Users,DC=name1,DC=name2,DC=com:Directory object not found.

Can someone tell me where I'm messing this up?

Thanks!

- Ithizar
0
Comment
Question by:Ithizar
[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
  • 3
  • 2
6 Comments
 
LVL 5

Accepted Solution

by:
TechnicallyMaybe earned 500 total points
ID: 33424516
It looks like it's with your -memberof switch as cn=students1 is not properly formatted.
0
 
LVL 5

Expert Comment

by:TechnicallyMaybe
ID: 33424524
Try the command without the -memberof to see if it works please.
0
 

Author Comment

by:Ithizar
ID: 33424592
No, even without the "memberof" argument, it still fails with the same error.
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 5

Expert Comment

by:TechnicallyMaybe
ID: 33425450
Try  changing "CN=jdoe,CN=Users,DC=name1,DC=name2,DC=com" to:

 "CN=jdoe, OU=Users, DC=name1, DC=name2, DC=com"
0
 
LVL 41

Expert Comment

by:Adam Brown
ID: 33425480
Is the domain you're adding the user in a child of another domain? Like random.company.com?
0
 

Author Comment

by:Ithizar
ID: 33425795
Turns out it was a combination of a mistake in the name of the OU the user was going into -and- an error in the -memberof command. Thanks everyone!
0

Featured Post

Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

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…
Group policies can be applied selectively to specific devices with the help of groups. Utilising this, it is possible to phase-in group policies, over a period of time, by randomly adding non-members user or computers at a set interval, to a group f…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

729 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