Chapter 12
IN THIS CHAPTER
Understanding user accounts
Creating user accounts
Setting account options
Working with groups
Creating a login script
Every user who accesses a network must have a user account. User accounts allow you — as network administrator — to control who can access the network and who can’t. In addition, user accounts let you specify what network resources each user can use. Without user accounts, all your resources would be open to anyone who casually dropped by your network.
User accounts are among the basic tools for managing a Windows server. As a network administrator, you’ll spend a large percentage of your time dealing with user accounts — creating new ones, deleting expired ones, resetting passwords for forgetful users, granting new access rights, and so on. Before I get into the specific procedures of creating and managing user accounts, this section presents an overview of user accounts and how they work.
A local account is a user account stored on a particular computer, applicable to that computer only. Typically, each computer on your network has a local account for each person who uses that computer.
By contrast, a domain account is a user account that’s stored by Active Directory (AD) and can be accessed from any computer that’s a part of the domain. Domain accounts are centrally managed. This chapter deals primarily with setting up and maintaining domain accounts.
Every user account has several important account properties that specify the characteristics of the account. The three most important account properties are
Many other account properties record information about the user, such as the user’s contact information, whether the user is allowed to access the system only at certain times or from certain computers, and so on.
To create a new domain user account in Windows Server 2016, follow these steps:
Choose Start ⇒ Administrative Tools ⇒ Active Directory Users and Computers.
This command fires up the Active Directory Users and Computers management console, as shown in Figure 12-1.
Right-click the domain that you want to add the user to and then choose New ⇒ User from the contextual menu.
This command summons the New Object – User Wizard, as shown in Figure 12-2.
Enter the user’s first name, middle initial, and last name.
As you fill in these fields, the New Object Wizard automatically fills in the Full Name field.
Change the Full Name field if you want it to appear different from what the wizard proposes.
You may want to reverse the first and last names so the last name appears first, for example.
Enter the user logon name.
This name must be unique within the domain. (Don’t worry, if you try to use a name that isn’t unique, you’ll get an error message.)
Pick a naming scheme to follow when creating user logon names. You can use the first letter of the first name followed by the complete last name, the complete first name followed by the first letter of the last name, or any other scheme that suits your fancy.
Click Next.
The second page of the New Object – User Wizard appears, as shown in Figure 12-3.
Enter the password twice.
You’re asked to enter the password and then confirm it, so type it correctly. If you don’t enter it identically in both boxes, you’re asked to correct your mistake.
Specify the password options that you want to apply.
The following password options are available:
For more information about these options, see the section “Setting account options,” later in this chapter.
Click Next.
You’re taken to the final page of the New Object – User Wizard, as shown in Figure 12-4.
Verify that the information is correct and then click Finish to create the account.
If the account information isn’t correct, click the Back button, and correct the error.
FIGURE 12-1: The Active Directory Users and Computers management console.
FIGURE 12-2: Use the wizard to create a new user.
FIGURE 12-3: Set the user’s password.
FIGURE 12-4: Verifying the user account information.
You’re done! Now you can customize the user’s account settings. At minimum, you’ll probably want to add the user to one or more groups. You may also want to add contact information for the user or set up other account options.
After you create a user account, you can set additional properties for the user by right-clicking the new user and choosing Properties from the contextual menu. This command brings up the User Properties dialog box, which has about a million tabs that you can use to set various properties for the user. Figure 12-5 shows the General tab, which lists basic information about the user, such as the user’s name, office location, and phone number.
FIGURE 12-5: The General tab.
The following sections describe some of the administrative tasks that you can perform via the various tabs of the User Properties dialog box.
Several tabs of the User Properties dialog box contain contact information for the user, such as
The Account tab of the User Properties dialog box, shown in Figure 12-6, features a variety of interesting options that you can set for the user. You can change the user’s logon name, change the password options that you set when you created the account, and set an expiration date for the account.
FIGURE 12-6: Set user account info here.
The following account options are available in the Account Options list box:
You can restrict the hours during which the user is allowed to log on to the system. Click the Logon Hours button on the Account tab of the User Properties dialog box to open the Logon Hours for [User] dialog box, as shown in Figure 12-7.
FIGURE 12-7: Restrict a user’s logon hours.
Initially, the Logon Hours dialog box is set to allow the user to log on at any time of day or night. To change the hours that you want the user to have access, click a day and time or a range of days and times, select Logon Permitted or Logon Denied, and then click OK.
Typically, a user can use his user account to log on to any computer that’s part of the user’s domain. You can restrict a user to certain computers, however, by clicking the Log On To button on the Account tab of the User Properties dialog box. This button brings up the Logon Workstations dialog box, as shown in Figure 12-8.
FIGURE 12-8: Restricting the user to certain computers.
To restrict the user to certain computers, select the The Following Computers radio button. Then, for each computer you want to allow the user to log on from, enter the computer’s name in the text box and click Add.
From the Profile tab, as shown in Figure 12-9, you can configure three bits of information about the user’s profile information:
FIGURE 12-9: The Profile tab.
By some estimates, the single most time-consuming task of most network administrators is resetting user passwords. Lest you assume that all users are forgetful idiots, put yourself in their shoes, being made to set their passwords to something incomprehensible (94kD82leL384K) that they have change a week later to something more unmemorable (dJUQ63DWd8331) that they don’t write down. Then network admins get mad when they forget their passwords.
Sooo, when a user calls and says that she forgot her password, the least you can do is (appear to) be cheerful when you reset it. After all, the user probably spent 15 minutes trying to remember it before finally giving up and admitting failure.
Here’s the procedure to reset the password for a user domain account:
Log on as an administrator.
You must have administrator privileges to perform this procedure.
Choose Start ⇒ Administrative Tools ⇒ Active Directory Users and Computers.
The Active Directory Users and Computers management console appears.
In the Active Directory Users and Computers management console, click Users in the console tree.
Refer to Figure 12-1.
In the Details pane, right-click the user who forgot her password and then choose Reset Password from the contextual menu.
A dialog box appears allowing you to change the password.
Enter the new password in both password boxes.
Enter the password twice to ensure that you input it correctly.
(Optional) Select the User Must Change Password at Next Logon option.
If you select this option, the password that you assign will work for only one logon. As soon as the user logs on, she will be required to change the password.
Click OK.
That’s all there is to it! The user’s password is reset.
To temporarily prevent a user from accessing the network, you can disable his account. You can always enable the account later, when you’re ready to restore the user to full access. Here’s the procedure:
Log on as an administrator.
You must have administrator privileges to perform this procedure.
People come, and people go. And when they go, so should their user account. Deleting a user account is surprisingly easy. Just follow these steps:
Log on as an administrator.
You must have administrator privileges to perform this procedure.
In the Details pane, right-click the user that you want to delete and then choose Delete from the contextual menu.
Windows asks whether you really want to delete the user, just in case you’re kidding.
Click Yes.
Poof! The user account is deleted.
A group is a special type of account that represents a set of users who have common network access needs. Groups can dramatically simplify the task of assigning network access rights to users. Rather than assign access rights to each user individually, you can assign rights to the group itself. Then those rights automatically extend to any user you add to the group.
The following sections describe some of the key concepts that you need to understand to use groups, along with some of the most common procedures you’ll employ when setting up groups for your server.
Here’s how to create a group:
Log on as an administrator.
You must have administrator privileges to perform this procedure.
From Server Manager, choose Tools ⇒ Active Directory Users and Computers.
The Active Directory Users and Computers management console appears.
In the New Object – Group dialog box that appears, as shown in Figure 12-10, enter the name for the new group.
Enter the name in both text boxes.
Choose the group scope.
The choices are
Choose the group type.
The choices are Security and Distribution. In most cases, choose Security.
Click OK.
The group is created. However, at this point, it has no members. To remedy that, keep reading.
FIGURE 12-10: Create a new group.
Groups are collections of objects called members. The members of a group can be user accounts or other groups. A newly created group (see the preceding section) has no members. As you can see, a group isn’t useful until you add at least one member.
Follow these steps to add a member to a group:
Log on as an administrator.
You must have administrator privileges to perform this procedure.
Choose Start ⇒ Administrative Tools ⇒ Active Directory Users and Computers.
The Active Directory Users and Computers management console appears.
Open the folder that contains the group to which you want to add members and then double-click the group.
The Group Properties dialog box appears.
Click the Members tab.
The members of the group are displayed, as shown in Figure 12-11.
Click Add, type the name of a user or other group that you want to add to this group, and then click OK.
The member is added to the list.
Repeat Step 5 for each user that you want to add.
Keep going until you add everyone!
FIGURE 12-11: Adding members to a group.
That’s all there is to it.
A logon script is a batch file that’s run automatically whenever a user logs on. The most common reason for using a logon script is to map the network shares that the user needs access to. Here’s a simple logon script that maps three network shares:
echo off
net use m: \\server1\shares\admin
net use n: \\server1\shares\mktg
net use o: \\server2\archives
Here, two shares on server1 are mapped to drives M: and N:, and a share on server2 is mapped as drive O:.
If you want, you can use the special variable %username%
to get the user’s username. This variable is useful if you created a folder for each user, and you want to map a drive to each user’s folder, as follows:
net use u: \\server1\users\%username%
If a user logs on with the username dlowe
, for example, drive U: is mapped to \\server1\users\dlowe
.
c:\Windows\SYSVOL\Sysvol\domainname\Scripts
where domainname
is your domain name. Because you need to access this folder frequently, I suggest creating a shortcut to it on your desktop.
After you create a logon script, you can assign it to a user by using the Profile tab of the User Properties dialog box. For more information, see the section “Setting the user’s profile information,” earlier in this chapter.