Home > Articles

  • Print
  • + Share This
This chapter is from the book

Creating and Managing Computer Accounts in an Active Directory Environment

For every computer running Windows NT, Windows 2000 Professional, or Windows XP and every server running Windows Server 2003 that is a member of a domain, a computer account must be created in the domain. The computer account is a security principal, and it can be authenticated and granted permissions to access resources. A computer account is automatically created for each computer running the listed operating systems when the computer joins the domain.

No Account

No computer accounts are created for computers running any version of Windows 95, Windows 98, or Windows Me. They lack the advanced security features that make the computer accounts worthwhile. This is an important fact—most network administrators prefer to have no computers running these operating systems in their networks because it is difficult to manage and secure these computers.

Although it is true that computer accounts are created automatically when a computer joins a domain, sometimes it is worthwhile to create computer accounts manually. Doing so allows a user to install a new computer in the appropriate location in the domain, even if that user doesn't have the necessary administrative privileges, using the name of the computer account that already exists.

When you're using Remote Installation Services (RIS), it is helpful to set up a default naming policy because this allows you to determine where in Active Directory the computer object is placed. You have three options in choosing the Organizational Unit for the computer object:

  • In the default location for computer objects (Computers, under the domain object)

  • In the same Organizational Unit as the object of the user installing the computer

  • In a predetermined Organizational Unit

Note that even if the computer object has been pre-created, the user installing the computer must have been delegated the right to join a computer to the domain.

Creating Computer Accounts Using the Active Directory Users and Computers Console

To create a computer account using Active Directory Users and Computers, right-click the container you want the account to appear in and then choose New, Computer from the context menu. Assign the necessary values to the parameters available and click OK. Figure 3.30 shows the New Object dialog box in which you type the computer name and give a pre–Windows 2000 computer name (limited to 15 characters). You may also designate the computer as a pre–Windows 2000 computer, and you may state that the computer is to be a Windows NT 4 backup domain controller.

Figure 3.30Figure 3.30 Type the name of the computer. Windows Server 2003 will automatically create a pre–Windows 2000 computer name.

The next dialog box you see will ask you whether this is a managed computer. If you accept this option, the computer object will be accessible for automatic operating system installation by RIS.

Creating Computer Accounts by Joining the Domain

To create a computer account by joining a domain, first log on to the computer you want to join to the domain with the credentials of a user with administrative privileges on that computer. Choose the System applet from Control Panel, change the workgroup membership information to reference the domain the computer is to join, and click OK. The system will ask you for the credentials of a user object that has the necessary rights and, after a short pause, will show a dialog box to welcome the computer to the domain. The computer must be rebooted so that it can come up as a member of the domain.

Once the computer is a member of the domain, a user logging on to the domain has the logon request passed by the workstation through a secure channel to the domain controller. The computer must have a domain computer account for the secure channel to be created.

Guided Practice Exercise 3.2

You are the administrator of a network for a manufacturing company that has multiple Windows Server 2003 servers used for applications and file and print services. The Research and Development Department has received a massive increase in funding this fiscal year, and it is purchasing all new desktop computers.

You plan to delegate the desktop replacements to the desktop support group. However, because Windows XP Professional computers are being installed, a computer account will need to be added for each computer. You do not want to grant the desktop support group the necessary access to add the computer accounts, but you cringe at the idea of adding 500 computer accounts manually.

You must find a way to automate this process.

What is the best way to solve this issue in Windows Server 2003? On your own, try to develop a solution that would involve the least amount of downtime and expense.

If you would like to see a possible solution, follow these steps:

Estimated Time: 30 minutes

This is a fairly easy solution. You can use the dsadd utility with the computer option to add a computer account to the domain. The dsadd utility allows you to accept the computer account name from standard input (stdin) so that you can redirect the contents of a text file that contains a list of the computer names to be used in creating the accounts.

  1. From the Start menu, select Run.

  2. From the Run dialog box, enter CMD to open a command window.

  3. On the command line, enter the following command, where names.txt is a text file that contains a listing of the computer names:

  4. dsadd computer <names.txt>

By default, dsadd computer uses the user context of the currently logged on user to connect a domain controller in the logon domain. Administrative access is required.

Troubleshooting Computer Accounts

Because computers need to authenticate to one another, they need accounts and passwords. In addition to the two methods described previously, a computer account is also created when a Windows Server 2003 server is promoted to a domain controller with dcpromo.

Like user accounts, each computer account has a password. Passwords are created by the process that creates a computer account. On a defined interval, a process running on the local computer changes the password automatically, and the new password is communicated securely to a domain controller in the computer's domain.

What happens if a server running Windows Server 2003 changes its password, but there is no domain controller available for the new password to be written to? The next time the two computers are able to communicate, the server with the changed password, on finding that the new password is not accepted, uses the previous one instead. Once authentication is complete with the old password, the new password is stored on the domain controller and is subsequently replicated to all domain controllers in the domain.

Troubleshooting Issues Related to Computer Accounts by Using the Active Directory Users and Computers Console

When a computer account is operating incorrectly, it may be impossible to log on to the domain from the computer. You can see how, if the computer cannot authenticate to the domain controller, it will be impossible for the user to log on. In this case it is necessary to reset the computer's account and rejoin the computer to the domain. This process reestablishes the secure relationship between the computer and the domain it is a member of.

To reset a computer's account using Active Directory Users and Computers, select the folder containing the computer account and right-click the computer object. Choose Reset Account from the context menu, and click Yes from the confirmation dialog box. Reboot the workstation and then rejoin the domain as described earlier.

To reset a computer's account from the command line, you use the dsmod command with the -reset switch:

dsmod computer <dn of computer> -reset

As in the case where the computer account was reset using Active Directory Users and Computers, you will have to rejoin the computer to the domain.

Case Study: T Foster

Essence of the Case

Here are the essential elements in this case:

  • Export the Harshaw user accounts.

  • -Change the Harshaw accounts to reflect that they are now T Foster employees.

  • -Import the Harshaw data into the T Foster AD.


T Foster is a wholesaler for farm equipment based in the Midwest. T Foster has decided to merge with Harshaw, Inc., one of its biggest rivals, located in the Upper Midwest. The mission of this newly formed conglomerate is to dominate the wholesale farm implement business in the plains states.

T Foster now wants to merge the information technology systems of the two companies as quickly as possible. Fortunately, the two companies run the same order-entry and inventory software, so there won't be any end-user training required.

T Foster has decided to give the former Harshaw employees access to resources on the T Foster network, while slowly migrating the Harshaw data over.


The features in Windows Server 2003 enable T Foster to merge the two companies with the least amount of difficulty. The first step is to export the user list from the Harshaw Active Directory using ldifde. This extracts the existing user accounts to a file.

The next step is to change the distinguished name in all the user records because the users are now part of T Foster. All the information about the accounts will be the same, but the Active Directory paths will be different in all the distinguished names. This can be accomplished by using ldifde with –c <old string> <new string> to cause the replacement of any occurrences of <old string> with <new string>.

Here's an overview of the requirements and solutions in this case study:


Solution Provided By

Export the Harshaw user accounts.

Exporting the user list from the Harshaw Active Directory using ldifde.

Change the Harshaw accounts to reflect that they are now T Foster employees.

Using ldifde with the –c switch to change the distinguished names.

Import the Harshaw data into the T Foster AD.

Importing the user list from the Harshaw AD into the T Foster AD using ldifde.

  • + Share This
  • 🔖 Save To Your Account