IT tutorials
 
Technology
 

Active Directory 2008 : Creating Computers and Joining the Domain (part 2) - Joining a Computer to the Domain, Secure Computer Creation and Joins

8/15/2013 11:19:54 AM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

Joining a Computer to the Domain

By prestaging the computer object, you fulfill the first two requirements for joining a computer to a domain: the computer object exists, and you have specified who has permissions to join a computer with the given name to the domain. Now, a local administrator of the computer can change the computer’s domain membership and enter the specified domain credentials to successfully complete the process.

To join a computer to the domain, follow these steps:

  1. Log on to the computer with credentials that belong to the local Administrators group on the computer.

    Only local administrators can alter the domain or workgroup membership of a computer.

  2. Open the System Properties dialog box using one of the following methods:

    On earlier versions of Windows (Windows XP or Windows Server 2003), open the System properties dialog box by doing one of the following:

    • Right-click My Computer and click Properties.

    • Press Windows Logo+Pause.

    On newer versions of Windows (Windows Vista, Windows 7, Windows Server 2008, or Windows Server 2008 R2), perform the following steps:

    1. Open the System properties dialog box. You can right-click Computer, and then click Properties, or press Windows Logo+Pause.

    2. In the Computer Name, Domain, And Workgroup Settings section, click Change Settings.

    3. If prompted by User Account Control, click Continue or enter administrative credentials as appropriate.

  3. On the Computer Name tab, click Change.

  4. Under Member Of, select Domain.

  5. Type the name of the domain you want to join and click OK.

    Note

    USE THE FULL DNS NAME OF THE DOMAIN

    Use the full DNS name of the Active Directory domain. Not only is this more accurate and more likely to succeed, but if it does not succeed, it indicates that there could be a problem with DNS name resolution that should be rectified before joining the computer to the domain.

  6. Windows prompts for the credentials of your user account in the domain.

    The domain checks to see whether a computer object already exists with the name of the computer. One of the following three things happens:

    • If the object exists and a computer with that name has already joined the domain, an error is returned, and you cannot join the computer to the domain.

    • If the object exists and it is prestaged—a computer with the same name has not joined the domain—the domain confirms that the domain credentials you entered have permission to join the domain using that account.

    • If the computer account is not prestaged, Windows verifies whether you have permissions to create a new computer object in the default computer container. If you do have permissions, the object is created with the name of the computer. This method of joining a domain is supported for backward compatibility but is not recommended. 

    The computer then joins the domain by assuming the identity of its Active Directory object. It configures its SID to match the domain computer account’s SID and sets an initial password with the domain. The computer then performs other tasks related to joining the domain. It adds the Domain Admins group to the local Administrators group and the Domain Users group to the local Users group.

  7. You are prompted to restart the computer. Click OK to close this message.

  8. Click Close (in newer versions of Windows) or OK (in earlier versions of Windows) to close the System Properties dialog box.

  9. You are prompted, again, to restart the computer, after which the system is fully a member of the domain and you can log on using domain credentials.

The Netdom.exe command allows you to join a computer to the domain in Command Prompt. The basic syntax of the command is:

netdom join MachineName /Domain:DomainName [/OU:"DN of OU"]
    [/UserO:LocalUsername] [/PasswordO:{LocalPassword|*} ]
    [/UserD:DomainUsername] [/PasswordD:{DomainPassword|*} ]
    [/SecurePasswordPrompt] [/REBoot[:TimeInSeconds]]

It can be useful to join a computer to a domain from the Command Prompt. The first reason this is useful is because the join can be included in a script that performs other actions. For example, you could create a batch file that creates the computer account using NetDom or DSAdd—the latter of which allows you to specify other attributes, including description—and then joins the machine to that account using NetDom. Second, NetDom can be used to remotely join a computer to the domain. Third, NetDom lets you specify the OU for the computer object. The command’s parameters are, for the most part, self-explanatory. UserO and PasswordO are credentials that are members of the workgroup computer’s local Administrators group. Specifying * for the password causes NetDom to prompt for the password at the command prompt. UserD and PasswordD are domain credentials with permission to create a computer object, if the account is not prestaged, or with permission to join a computer to a prestaged account. The REBoot parameter causes the system to reboot after joining the domain. The default timeout is 30 seconds. The SecurePasswordPrompt parameter displays a popup for credentials when * is specified for either PasswordO or PasswordD.

Note

USING NETDOM REMOTELY REQUIRES FIREWALL CONFIGURATION

If you want to use NetDom remotely, the Windows Firewall configuration on the computer that will be joined to the domain must allow Network Discovery and Remote Administration.

Secure Computer Creation and Joins

It is important to secure your enterprise so that only appropriate users can create computer accounts and join computers to the domain. The following sections outline best practices for managing computer account creation and domain joins.

Prestaging Computer Objects

The best practice is to prestage a computer account prior to joining the computer to the domain. Unfortunately, Windows allows you to join a computer to a domain without following best practices. You can log on to a workgroup computer as a local administrator and change the computer’s membership to the domain. Then, on demand, Windows creates a computer object in the default computer container, gives you permission to join a computer to that object, and then proceeds to join the system to the domain.

There are three problems with this behavior of Windows:

  • First, the computer account created automatically by Windows is placed in the default computer container, which is not where the computer object belongs in most enterprises.

  • Second, you must move the computer from the default computer container into the correct OU, which is an extra step that is often forgotten.

  • Third, any user can do this—no domain-level administrative permissions are required. Any user can join any computer to the domain if you don’t manage and secure the process. Because a computer object is a security principal, and because the creator of a computer object owns the object and can change its attributes, this exposes a potential security vulnerability. The next sections detail these disadvantages.

Configuring the Default Computer Container

When you join a computer to the domain and the computer object does not already exist in Active Directory, Windows automatically creates a computer account in the default computer container, which is called Computers (CN=Computers,DC=domain, by default). The problem with this relates to the discussion of OU design earlier in the lesson. If you have implemented the best practices described there, you have delegated permissions to administer computer objects in specific OUs for clients and servers. Additionally, you might have linked GPOs to those OUs to manage the configuration of these computer objects. If a new computer object is created outside of those OUs, in the default computer container, the permissions and configuration it inherits from its parent container will be different than what it should have received. You will then need to remember to move the computer from the default container to the correct OU after joining the domain.

Two recommended steps reduce the likelihood of this problem. First, you should endeavor to always prestage computer accounts. If an account is prestaged for a computer in the correct OU, the computer will use the existing account when it joins the domain and will be subject to the correct delegation and configuration.

Second, to reduce the impact of systems being joined to the domain without a prestaged account, you should change the default computer container so that it is not the Computers container itself but, instead, an OU that is subject to appropriate delegation and configuration. For example, if you have an OU called Clients, you can instruct Windows to use that OU as the default computer container, so that if computers are joined to the domain without prestaged accounts, the objects are created in the Clients OU.

The Redircmp.exe command, available on domain controllers, is used to redirect the default computer container with the following syntax:

redircmp "DN of OU for new computer objects"

Now, if a computer joins the domain without a prestaged computer account, Windows creates the computer object in the specified organizational unit.

Redirecting the Default User Container

The same concepts apply to the creation of user accounts. By default, if a user account is created using a legacy practice that does not specify the OU for the account, the object is created in the default user container (CN=Users,DC=domain, by default). The Redirusr.exe command, available on domain controllers, can redirect the default container to an actual OU that is delegated and configured appropriately. RedirUsr, like RedirCmp, takes a single parameter: the distinguished name (DN) of the OU that will become the default user container.

Tip

EXAM TIP

The Redircmp.exe command redirects the default computer container to a specified OU. Redirusr.exe does the same for the default user container. You might see these two commands used as distracters—presented as potential (but incorrect) answers to questions that have nothing to do with the default computer or user containers. As you look at any exam question, evaluate the possible answers to determine whether the answers are proposing to use real commands but in the wrong application of those commands.

Restricting the Ability of Users to Create Computers

When a computer account is prestaged, the permissions on the account determine who is allowed to join that computer to the domain. When an account is not prestaged, Windows will, by default, allow any authenticated user to create a computer object in the default computer container. In fact, Windows will allow any authenticated user to create 10 computer objects in the default computer container. The creator of a computer object, by default, has permission to join that computer to the domain. It is through this mechanism that any authenticated user can join 10 computers to the domain without any explicit permissions to do so.

The 10-computer quota is configured by the ms-DS-MachineAccountQuota attribute of the domain. It allows any authenticated user to join a computer to the domain, no questions asked. This is problematic from a security perspective because computers are security principals. And the creator of a security principal has permission to manage that computer’s properties. In a way, the quota is like allowing any domain user to create 10 user accounts, without any controls.

It is highly recommended that you close this loophole so that non-administrative users cannot join computers to the domain. To change the ms-DS-MachineAccountQuota attribute, follow these steps:

  1. Open ADSI Edit from the Administrative Tools folder.

  2. Right-click ADSI Edit and click Connect To.

  3. In the Connection Point section, click Select A Well Known Naming Context, and then select Default Naming Context from the drop-down list.

  4. Click OK.

  5. In the console tree, expand Default Naming Context.

  6. Right-click the domain folder—“dc=contoso,dc=com”, for example—and then choose Properties.

  7. Select ms-DS-MachineAccountQuota and click Edit.

  8. Type 0 and click OK.

The Authenticated Users group also is assigned the user right to add workstations to the domain, but you do not have to modify this right if you have changed the default value of the ms-DS-MachineAccountQuota attribute.

After you have changed the ms-DS-MachineAccountQuota attribute to 0, you can be assured that the only users who can join computers to the domain are those who have been specifically delegated permission to join prestaged computer objects or create new computer objects.

Quick Check

  • What two things determine whether you can join a computer account to the domain?

Quick Check Answer

  • To join a computer to a prestaged account, you must be given permission on the account to join it to the domain. If the account is not prestaged, the ms-DS-MachineAccountQuota attribute determines the number of computers you can join to the domain in the default computer container without explicit permission.

After you’ve eliminated this loophole, you must make sure you have given appropriate administrators explicit permission to create computer objects in the correct OUs; otherwise, the error message shown in Figure 4 will appear.

The message that appears when a user exceeds the default computer account quota specified by the ms-DS-MachineAccountQuota attribute

Figure 4. The message that appears when a user exceeds the default computer account quota specified by the ms-DS-MachineAccountQuota attribute

 
Others
 
- Active Directory 2008 : Creating Computers and Joining the Domain (part 1) - The Computers Container and OUs
- Exchange Server 2010 : Using the Exchange Management Shell
- Exchange Server 2010 : Using the Exchange Management Shell - Working with Cmdlets
- Exchange Server 2010 : Using the Exchange Management Shell - Using Windows PowerShell
- Administration of Microsoft Lync Server 2010 : Topology Model
- Administration of Microsoft Lync Server 2010 : Role-Based Access Control
- Administration of Microsoft Lync Server 2010 : Lync Server Management Shell
- Administration of Microsoft Lync Server 2010 : Lync Server Control Panel
- Windows 8 : Managing Mobile Networking and Remote Access - Wireless Networking
- Windows 8 : Managing Mobile Networking and Remote Access - Establishing Connections
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us