Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Proper Syntax for DSADD Command

Posted on 2010-08-12
6
Medium Priority
?
1,847 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 2000 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 43

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 Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
Wouldn't it be nice if objects in Active Directory automatically moved into the correct Organizational Units? This is what AutoAD aims to do and as a plus, it automatically creates Sites, Subnets, and Organizational Units.
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
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 …

618 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