The Sysadmin Notebook  

Sitemap

Accounts

Account Management in Windows 2003

Contents

Accounts

Top Bottom

Authentication; verification of identity. AD authenticates username and password, security subsystem builds the security access token that represents the user. Token contains users SID and group SIDs. Token used to verify user rights and access to secured resources. User object in AD includes

create account

Top Bottom

Create users using AD Users and Computers (dsa.msc). Select appropriate container, click Action, New, User. Must be a member of Enterprise admins, domain admins or account operators to create new accounts, or you must have delegated permissions to create users in that container: 'New User' command will be unavailable if you do not have the required permissions. First page of 'New User' dialog requires the following information:

Second page of 'New User' dialog allows you to seet password and password flags:

Default Domain Policy GPO requires 'complex passwords'. At least seven characters long and must contain three of the following four character groups: [A-Z}, [a-z], [0-9], [non-alphanumeric]. User account properties override Domain GPOs, for example 'max password age' in GPO overridden by 'password never expires' in user properties. The user object contains many more properties, accessible after account creation. Some notable properties:

You can modify several users at once in dsa.msc, using CTRL or SHIFT to select multiple accounts, but omly a subset of properties are available: some properties can only be set on a per-user basis. Available prpoerties:

Move an object from one container to another using action menu, right-click context menu, or simply drag'n'drop. Templates can be used to create user objects: create a user, set its properties and group membership then copy the template to create a new user. With a template, the following properties are copied:

Permissions or rights assigned directly to the template object are not copied to the new account: permissions applied to group memberships are as a consequence of group memberships being copied.

CSVDE

Top Bottom

CSV Directory Exchange: command-line tool to import/export objects from/to AD. switches (see helpctr for more details):

General

Export

Import

Credentials

LDIFDE

Top Bottom

LDIF Directory Exchange: same as CSVDE. Both LDIFDE and CSVDE require you to manually set password and to enable account. Supports same switches, plus:

LDIF (LDAP Directory Interchange Format) is a draft internet standard for file format for batch operations on LDAP directories. LDIFDE can be copied to Win2K and XP workstations. Facilitates bulk manipulation of directory objects. For example, when migrating from NT4 to AD, use addusers utility to extract account information from NT4, then LDIFDE to import them to AD.

DSTOOLS

Top Bottom

Set of commands to manipulate AD objects

dsquery object_type startNode [options]

criteria:

credentials:

options:

use special token $username$ to use the username instead of samid in value of -email, -hmdir, -profile, and -webpg

dsadd group groupDn

options

dsmod user UserDN..... parameters. Same parameters as dsadd, except cannot modify SAM account name (-samid) or group membership (-memberof). You can however use dsmod group to change group membership. -c option puts DSMOD into continuous operation mode (report errors but continue)

dsmod group groupDN

same switches as dsadd, plus

dsget user UserDN... parameters

get properties for one or more objects. Use same parameter list as for dsadd to specify attributes returned (does not allow use of -password). Also has -dn and -sid parameters. Note distinction between dsquery (returns a result set) and dsget (returns specified attributes)

dsmove objectDN [-newname NewName] [-newparent ParentDN]. Also supports -s, -d, -u and -p authentication parameters

dsrm objectDN

options

User Profiles

Top Bottom

'My Documents' should be redirected to a network share through group policy, so that they can be backed-up, scanned for viruses and remain available as users roam. They can also be made availabel as 'offline files'. Local user profiles are created by copying the 'Default User' profile folder. The copy is named after the user's logon name and combined with the 'All Users' profile to create user's local environment. By default only users can modify the 'All Users' profile. Roaming user profiles (RUPs) allow for backup, virus scanning and centralised control. To use RUPs, create server share, giving 'Everyone' full control share permissions and edit the user's profile property to \\server\share\%username%. The policy 'Only allow local user profiles' if linked to an OU containing computer accounts, will disable the use of roaming profiles on these machines. Windows XP/2000/2003 use synchronisation to load user profiles: only changes need to traverse the network. This is far more efficient than it was with NT4 which uploaded and downloaded the whole profile at logoff and logon. Create a preconfigured profile:

  1. create a local profile as required
  2. logon as administrator
  3. use sysdm.cpl to copy profile to UNC (\\server\share\username)
  4. change permissions
  5. set profile path for user

Create a preconfigured group profile:

  1. copy desired profile to unc
  2. change permitted to use to required group
  3. multiselect all users of group and set their profile path (do not try to set profile for group account)
  4. make profile mandatory (rename ntuser.dat to ntuser.man)

Authentication Policies

Top Bottom

Authentication process should be both secure and user friendly: two contradictory requirements. Policy can be seet through Local Security Policy or at domain level, preferably through the Default Domain Policy.

Password Policies (computer\windows settings\security settings):

Policy explanation
Enforce Password History max value of 24, 6 to 12 a normal setting
Maximum Password Age default 42 days
Minimum Password Age prevents users continuously changing password to bypass password history and re-using the same password
Minimum Password Length defaults to 7 on Windows 2003
Password Must Meet Complexity Requirements default password filter is passfilt.dll. Password must:
  • not resemble username
  • be 6 or more characters
  • contain 3 of the 4 character types
Account Lockout Threshold 0 to 999. 0 means never. Counter not affected by logons to locked workstations
Account Lockout Duration 0 to 99,999 minutes (10 weeks). 0 means stayed locked out. 5 to 15 minutes should be sufficient to deter hackers
Reset Account Lockout Counter After 1 to 99,999 minutes. Value must be less than or equal to lockout duration

Configuring complexity and length policies will not affect existing passwords.

Auditing Policies

Top Bottom

Auditing Policies (computer\windows settings\security settings\local policies\audit policy):

Policy explanation
Audit Account Logon Events account logon events involve a domain user account authenticating to a domain controller (interactive and network logons). Logged to DC event log
Audit Account Management includes creation, deletion, modification and password resets
Audit Logon Events logon events involve a local account authenticating to a local machine (interactive and network logons). Logged to local event log
Audit Directory Service Access audit access to AD objects that have their own SACL
Audit Object Access audit access to object (file, folder, printer) that has its own sacl
Audit Policy changes
Audit privilege use
Audit Process Tracking
Audit System Events restarts, shutdowns or events that affect the system security or security logs

Account logon events must be monitored across all domain controllers: logon events must be monitored across all PCs.

Cross-Platform Issues

Top Bottom

Windows 2000/2003/XP support 127-character passwords. Windows 95/98/Me support only 14. Active Directory client available for downlevel clients to enable:

AD client does not enable:

Group Accounts

Top Bottom

Group accounts are containers for user and computer objects. Two types of group: security (to assign permissions to resources) and distribution (email distribution lists and query containers). Security groups can be used as distribution groups but not vice versa. Proper use of groups eases manageability and scalability of network. In Windows 2003, four domain functional levels are available:

Group scope (applies to security and distribution groups) defines how permissions are assigned to group members. Windows 2003 groups are classified into three group scopes (Local groups are used primarily for backward compatibility, but are not included in discussions of group scope. Local groups exist on Windows 2003 member servers, not found on Windows 2003 DCs. Local groups can have members from any domain within the forest, from trusted domains in other forests or from trusted down-level domains. Local groups have only machine-wide scope: grants permissions to resources on local machine only):

Domain Local: used primarily to assign permissions to global groups for local domain resources. Exists in all functional levels. Available domain-wide only in the two native functional levels. Domain local groups function as local groups while the domain is in either mixed functional level. Can include members from any domain in the forest, from a trusted domain in other forest and from trusted down-level domains. Have domain-wide scope in the native functional levels: grants permissions to resources within the domain.

Global: used primarily to provide categorised membership in domain local groups or for direct permission assignment (particularly in mixed functional levels). Exists in all domain functional levels. Can only include members from within the same domain. Can be a member of local or domain local group. Can be granted permission within any domain. In native functional levels, can contain other global groups

Universal: exists as a security principal in native functional levels only. Are used primarily to grant access to resources in all trusted domains. Can include members from any domain in the forest. In native functional levels, can be granted permissions in any domain, including other trusted forests.

Scope of group determined at time of creation. In native functional levels, domain local and global groups can be converted to universal groups, if the groups are not members of groups of the same scope (You can change the scope of a group only in native functional levels). You cannot create universal security groups in either mixed functional levels, but you can create universal distribution groups. Domain local groups can be nested in other domain local groups. Universal groups can be nested in other universal or domain local groups. Global groups can be nested in global, universal or domain local groups. To find a users group membership use dsget user UserDN -memberof -expand. Use dsa.msc to raise functional level.

Special Identities

Top Bottom
Everyone All current network users including guests and users from other domains. Whenever a user logs on to the network, they become members of the everyone group
Network any user accessing a resource over the network automatically becomes a member of the network group
Interactive whenever a user accesses a resource on the computer they are logged-in to, they automatically become members of the interactive group
Anonymous Logon user of network resource that did not go through authentication process
Authenticated User all users authenticated into network by using a valid user account
Creator Owner creator or owner of a resource
Dialup anyone connected to the network through a dialup connection

Computer Accounts

Top Bottom

Computer accounts have name, SID and passwod to maintain secure relationship between computer and domain. Two steps necessary to join a computer to a domain: create an account for the PC; join the PC to the domain with the account. To create computer account you must have the same privileges required to create a user account. (Domain users can also create computer objects: when a computer is joined to a domain and an account does not exist, AD creates a computer object automatically in the Computers container, by default. Each user in authenticated users can join 10 computers to the domain in this fashion.) Creating a Computer Object:

Once account created join computer to domain from sysdm.cpl (you must be a local administrator to do this). When selecting domain prefer DNS name to NETBIOS name: proves DNS is working (essential for AD). You'll be prompted for credentials dialogue: supply account with privileges to join domain. Once account located (or created if it didn't already exist), computer establishes a trust relation with domain, changes its SID to match domain account, and modifies group memberships. 'netdom join' can also be used to join domain, allows you to specify OU to create account in. Besides being the default OU for computers joining the domain, Computers container will also contain machine accounts for computers migrated from an NT4 domain. 2003 Resource Kit includes REDIRCMP tool, which allows you to redirect auto creation of computer objects to an OU of your choice (requires domain at 2003 functional level). Computers container, like Users and Builtin, cannot be linked to group policy objects. For this reason it is not a good choice as a location for machine accounts and pre-creating the machine account in desired OU is the recommended practice to ensure GPOs can be applied to new machines. Use OUs to organise groups of computers, users, etc. Move computer objects by Action, Move or with 'dsmove computerDN [-newname NewName] [-newparent ParentDN]' or simply by drag'n'drop. Account Operators can move objects between containers and any OU, except domain Controllers OU. Domain Admins and Enterprise Admins can move objects between any containers. When creating a computer object in AD, you can specify the group with permission to join a computer to a domain computer account. You can also set the property Assign this computer as a pre-Windows 2000 Computer or Assign this Computer Account as a Backup Domain Controller for NT4 domain controllers. Pre-Windows 2000 Computer effectively means Windows NT4, as 95/98/Me cannot join a domain. Computer Object properties:

Click 'Find Objects in AD' toolbar button in dsa.msc to locate a computer account (or any other object). Context menu for found objects includes the 'Manage' command. Deleteing a computer account deletes its SID and group memberships. Recreating the account creates a new SID: all permissions, privileges, and group memberships of original account are lost. Use dsa.msc, Action, Delete or 'dsrm objectDn' to delete a computer account. When a computer is dis-joined from a domain it attempts to delete its account from AD. If it fails, you'll need to delete the account manually. Disable an account if it is not going to be used for some time (in keeping with good security practice of granting resource access only where required). In dsa.msc a disabled account appears with a red cross. A disabled computer cannot create a secure channel with the domain. Only users with cached credentials will be able to logon to the domain. Disable an account with 'dsmod computer ComputerDN -disabled [yes | no]'. Resetting a computers account resets its password, but maintains all of its properties. If you replace a machine, the new machine can join the domain using the reset account, inheriting old machines poperties and permissions. Use Action or context menus to reset machine accounts or 'dsmod computer ComputerDN -reset'. Netdom can also be used. Computer account problems generally display errors such as:

Step-By-Step Computer Account Troubleshooting