index int64 0 4.08k | text stringlengths 34 4.9k ⌀ | url stringclasses 38
values |
|---|---|---|
496 | Discussion
Depending on your environment, your DNS implementation may require that you cre‐
ate secondary zones to allow for load balancing for busy DNS servers or remote sites
connected by slow links. In this situation, you want to allow zone transfers to occur
between your AD integrated DNS servers and your secondary... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
497 | Solution
Using a graphical user interface
1. Open the DNS Management snap-in (dnsmgmt.msc).
2. Connect to the DNS server you want to modify. In the left pane, right-click on DNS
and select Connect to DNS Server. Select “The following computer” and enter the
target server name. Click OK.
3. Right-click on the server and... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
498 | Using PowerShell
By using the –PassThru switch, you can see the object that you are working with and
the values of the properties.
See Also
MS KB 304491 (Conditional Forwarding in Windows Server 2003); MS KB 811118
(Support WebCast: Microsoft Windows Server 2003 DNS: Stub Zones and Conditional
Forwarding)
13.8. Configu... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
499 | Discussion
With conditional forwarding, you can forward unresolved queries for specific domains
to different name servers. The most common use of conditional forwarding is when
you have two or more noncontiguous namespaces. Consider, for example, a merger
between the adatum.com and othercorp.com corporations. Normally,... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
500 | 8. Under Permissions, check the Full Control box.
9. Click OK.
Using a command-line interface
The following command grants full control over managing the resource records in an
AD integrated zone:
> dsacls dc=<ZoneName>,cn=MicrosoftDNS,<DomainOrAppPartitionDN>↵
/G<UserOrGroup>:GA
Using PowerShell
The following script ... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
501 | Solution
Using a graphical user interface
1. Open the DNS Management snap-in (dnsmgmt.msc).
2. If an entry for the DNS server you want to connect to does not exist, right-click on
DNS in the left pane and select Connect to DNS Server. Select “This computer” or
“The following computer,” and then enter the server you wan... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
502 | Using PowerShell
There are several PowerShell cmdlets available to create resource records for DNS zones:
Add-DnsServerResourceRecord
This cmdlet adds an available resource record for a given zone.
Add-DnsServerResourceRecordA
This cmdlet adds an A type record for IPv4 hosts in a given zone.
Add-DnsServerResourceRecord... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
503 | Using a command-line interface
Adding A, CNAME, and PTR resource records is pretty straightforward in terms of the
data you must enter, but other record types, such as SRV, require quite a bit more data.
The help pages for /recordadd and /recorddelete display the required information
for each record type. For example, ... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
504 | Using PowerShell
Get-DnsServerResourceRecord -ZoneName "<ZoneName>" -RRType "A"
Discussion
Using a command-line interface
You can leave off the -type switch, and the command will find any A, PTR, and CNAME
records that match <RecordName>.
You can also run nslookup from interactive mode, which can be entered by typing
n... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
505 | Using a command-line interface
With the following command, replace <Setting> with the name of the setting to modify
and <Value> with the value to set:
> dnscmd <DNSServerName> /config /<Setting> <Value>
The following command enables the EnableDnsSec setting on dns01:
> dnscmd dns01 /config /EnableDnsSec 1
The following... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
506 | Solution
The following solutions will show how to enable automatic scavenging on all AD inte‐
grated zones.
Using a graphical user interface
1. Open the DNS Management snap-in (dnsmgmt.msc).
2. If an entry for the DNS server you want to connect to does not exist, right-click on
DNS in the left pane and select Connect t... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
507 | The first setting you have to configure is the scavenging interval. This is the interval in
which the DNS server will kick off the scavenging process. It is disabled by default so
that scavenging does not take place unless you enable this setting. The default value is
seven days.
The second setting is the default aging... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
508 | information from a server), and the other refers to the cache used by the Microsoft DNS
server software.
Solution
To flush the client resolver cache, use the following command:
> ipconfig /flushdns
To flush the client resolver cache by using PowerShell, use the following cmdlet:
Clear-DnsClientCache
To flush the DNS se... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
509 | With both the client and server cache, records are removed from the cache after the
record’s TTL value expires. The TTL is used to age records so that clients and servers
will request an updated copy of the record at a later point in order to receive any changes
that may have occurred.
13.15. Verifying That a Domain Co... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
510 | The dcdiag command provides a RegisterInDNS switch that allows you to test whether
the DC can register its records. In the solution, we showed the output if the domain
controller passes the test.
Here is the output if an error occurs:
Starting test: RegisterInDNS
This domain controller cannot register domain controlle... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
511 | 2. Connect to the DNS Server you want to modify. In the left pane, right-click on DNS
and select Connect to DNS Server. Select “The following computer” and enter the
target server name. Click OK.
3. Right-click on the server and select Properties.
4. Click on the Debug Logging tab.
5. Select what you want to log and th... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
512 | Table 13-3. DNS debug logging event codes
Hexadecimal value Decimal value Descriptions
0x0 0 No logging. This is the default.
0x1 1 Query transactions.
0x10 16 Notifications transactions.
0x20 32 Update transactions.
0xFE 254 Nonquery transactions.
0x100 256 Question packets.
0x200 512 Answer packets.
0x1000 4096 Send ... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
513 | 13.17. Registering a Domain Controller’s Resource Records
Problem
You want to manually force registration of a domain controller’s resource records. This
may be necessary if you’ve made some configuration changes on your DNS servers to
allow your domain controllers to start dynamically registering resource records.
Sol... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
514 | Discussion
When a domain controller is demoted from a domain, it dynamically deregisters its
resource records. This is a nice feature of the demotion process because it means you
do not have to manually remove all of the resource records or wait for scavenging to
remove them. If, however, you have a domain controller t... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
515 | Using PowerShell
$strRegPath = "HKLM:\System\CurrentControlSet\Services\Netlogon\Parameters"
new-ItemProperty -path $strRegPath -name "UseDynamicDNS" -type DWORD
set-ItemProperty -path $strRegPath -name "UseDynamicDNS" -value "0"
Stop-Service netlogon
$strPath = join-path (get-content env:SystemRoot) system32\config\ne... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
516 | 2. Create a GPO linked to the Domain Controllers OU, or else edit an existing GPO.
3. Select Computer Configuration→Policies→Administrative Templates→Sys‐
tem→Net Logon→DC Locator DNS Records.
4. Enable the “Specify DC Locator DNS records not registered by the DCs” setting,
and list one or more of the following record ... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
517 | New-ItemProperty -Path $strRegPath -Name "DnsAvoidRegisterRecords" -Type↵
MultiString
Set-ItemProperty -Path $strRegPath -Name "DnsAvoidRegisterRecords" -Value↵
$arrValues
Stop-Service netlogon
$strPath = Join-Path (Get-Content env:SystemRoot) system32\config\netlogon.dnb
Remove-Item $strPath
Start-Service netlogon
Dis... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
518 | Registry mnemonic Resource record
type
Resource record name
Dc SRV _ldap._tcp.dc._msdcs.<DnsDomainName>
DcAtSite SRV _ldap._tcp.<SiteName>._sites.dc._msdcs.<DnsDomain
Name>
Rfc1510Kdc SRV _kerberos._tcp.<DnsDomainName>
Rfc1510KdcAtSite SRV _kerberos._tcp.<SiteName>._sites.<DnsDomainName>
GenericGc SRV _gc._tcp.<DnsFore... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
519 | 4. Edit the msDS-AllowedDNSSuffixes attribute and the DNS suffix you want to add.
5. Click OK.
Using a command-line interface
Create an LDIF file called add_dns_suffix.ldf with the following contents:
dn: <DomainDN>
changetype: modify
add: msDS-AllowedDNSSuffixes
msDS-AllowedDNSSuffixes: <DNSSuffix>
-
Then run the foll... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
520 | 13.22. Authorizing a DHCP Server
Problem
You want to permit (i.e., authorize) a DHCP server to process DHCP requests from
clients. This is necessary only if the DHCP server is a member of an Active Directory
domain.
Solution
Using a graphical user interface
1. Open the DHCP snap-in (dhcpmgmt.msc).
2. If necessary, in t... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
521 | However, this still doesn’t prevent someone from plugging in a non-Windows DHCP
server (e.g., a Linksys router with the DHCP server enabled) and causing clients to
receive bad leases. A rogue DHCP server can provide incorrect lease information or
deny lease requests altogether, ultimately causing a denial of service fo... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
522 | 12. Click the Advanced button.
13. Click the Add button.
14. Use the object picker to select the DHCP Administrators group.
15. Check the boxes under Allow for Write All Properties.
16. Click OK until all dialog boxes are closed.
If the DHCP Administrators group does not exist, run the following
command on a DHCP serve... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
523 | Solution
Using a graphical user interface
1. Open the Active Directory Users and Computers MMC snap-in (dsa.msc).
2. In the console tree, click Active Directory Users and Computers→<Domain
Name>→Users.
3. In the Details pane, click DHCP Administrators.
If the DHCP Administrators group does not exist, run the following
... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
524 | Using PowerShell
You can add a user or group to the membership of the DHCP Administrators group
using the Add-ADGroupMember command as follows:
Add-ADGroupMember "DHCP Administrators" "<User/Group>"
Discussion
In Active Directory, most roles can be assigned independently of one another rather
than just by making a user... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
525 | null | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
526 | CHAPTER 14
Security and Authentication
14.0. Introduction
The default Windows 2000 installation of Active Directory was not as secure as it could
have been out of the box. It allowed anonymous queries to be executed, which could
take up valuable processing resources, and it did not place any requirements on en‐
cryptin... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
527 | standards-based system originally developed at MIT that has been widely implemented
at universities. We will also be covering some Kerberos-related tasks in this chapter that
you will likely encounter in an Active Directory environment. For a complete review of
Kerberos, we recommend Kerberos: The Definitive Guide by J... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
528 | 17. The “Specify the type of the private key” screen appears. Click Next to create a new
private key.
18. The Cryptography for CA screen will appear. Click Next.
19. On the CA Name screen, click Next.
20. On the Validity Period screen, click Next.
21. Enter the location for the certificate database and logs, and then c... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
529 | • Active Directory Domains and Trusts
• Active Directory Sites and Services
• Active Directory Schema
• Active Directory Users and Computers
• Active Directory Administrative Center
• ADSI Edit
• Group Policy Management snap-in
• Object Picker
With ADSI Edit, you can also specify the port number to use when browsing a ... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
530 | Solution
Using a graphical user interface
To temporarily disable LDAP encryption or signing for troubleshooting purposes, use
the following steps on a client computer:
1. Create a new GPO. Edit the GPO and select Computer Configuration→Poli‐
cies→Windows Settings→Security Settings→Local Policies, and then highlight Se‐... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
531 | 2. In the Configuration partition, browse to cn=Services→cn=Windows NT→cn=Di
rectory Service.
3. In the left pane, right-click on the Directory Service object and select Properties.
4. Double-click on the dSHeuristics attribute.
5. If the attribute is empty, set it with the value 0000002.
6. If the attribute has an exi... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
532 | "New value of dsHeuristics equal to $upd"
}
Discussion
To enable anonymous access, you have to modify the dSHeuristics attribute of the
cn=Directory Service,cn=Windows NT,cn=Services,ConfigurationDN object. The
dSHeuristics attribute is an interesting attribute used to control certain behavior in
Active Directory. For... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
533 | 3. Right-click on the object and select Delegate Control. Only certain objects support
the Delegation of Control Wizard, so this option will not show up for every type of
object.
4. Click Next.
5. Click the Add button and use the object picker to select the users or groups to which
you want to delegate control.
6. Clic... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
534 | See Also
Recipe 14.6 for customizing the Delegation of Control Wizard; Recipe 14.7 for more on
using dsrevoke
14.6. Customizing the Delegation of Control Wizard
Problem
You want to add or remove new delegation options in the Delegation of Control Wizard.
Solution
Open the Delegation of Control Wizard INF file (%SystemR... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
535 | In the AppliesToClasses line, replace <CommaSeparatedListOfObjectClassesInvo
kedFrom> with a comma-separated list of LDAP display names of the classes that can
be delegated. This delegation action will show up on the classes listed here only when
you select Delegate Control from a snap-in. To make our new template entr... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
536 | To allow the granting of full control over all existing user and inetOrgPerson objects,
we’ll use these entries:
[template14.user]
@=GA
[template14.inetOrgPerson]
@=GA
This is very similar to the previous example, except that here SCOPE is replaced with the
names of the object classes the permissions apply to. The @ sy... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
537 | 14.7. Revoking Delegated Permissions
Problem
You want to remove permissions that you’ve delegated to a domain or an OU.
Solution
Using a graphical user interface
1. Open the Active Directory Users and Computers MMC snap-in (dsa.msc). Rightclick on the object that you wish to modify and select Properties.
2. From the S... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
538 | See Also
“Best Practices for Delegating Active Directory Administration”
14.8. Viewing the ACL for an Object
Problem
You want to view the ACL for an object.
Solution
Using a graphical user interface
1. Open the ACL Editor. You can do this by viewing the properties of an object (rightclick on the object and select Prop... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
539 | including the scope of permissions for ACEs down to the object and even the attribute
level.
See Also
Recipe 14.12 for changing an ACL; Recipe 15.13 for auditing of object access
14.9. Customizing the ACL Editor
Problem
You want to set permissions on attributes that do not show up in the default Active
Directory Users ... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
540 | 2
The Read property is displayed for the attribute.
7
No entries are displayed for the attribute.
If the attribute is not defined, then the default value (specified by @, if present) is
used.
Discussion
Much like the Delegation of Control Wizard, you can customize the attributes that are
shown in the ACL Editor, but yo... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
541 | The results will be shown in the bottom of the window.
The Effective Access tab is the new name for the Effective Permissions
tab since Windows Server 2008.
Using a command-line interface
> acldiag <ObjectDN> /geteffective:<UserOrGroupDN>
Discussion
Viewing the permissions on an object does not tell the whole story as ... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
542 | 3. To turn off inheritance, click the “Disable inheritance” button.
4. You will be given the option to “Convert inherited permissions into explicit per‐
missions on this object”, to “Remove all inherited permissions from this object”, or
to cancel. Click the desired option.
5. To reenable permission inheritance from ob... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
543 | Cert Publishers. In addition, some Active Directory−aware applications depend on in‐
heritance being in place in order to function efficiently.
See Also
“AdminSDHolder—or where did my permissions go?”; “Description and Update of the
Active Directory AdminSDHolder Object”
14.12. Changing the ACL of an Object
Problem
You... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
544 | $Path = [ADSI]"LDAP://<ObjectDN>"
$Group = New-Object System.Security.Principal.NTAccount("<GroupName>")
$IdentityReference = $Group.Translate↵
([System.Security.Principal.SecurityIdentifier])
$Perms = New-Object System.DirectoryServices.ActiveDirectoryAccessRule↵
($IdentityReference,"GenericAll","Allow")
$Path.psbase... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
545 | Discussion
Each instantiated object in Active Directory has an associated structural class that de‐
fines a default security descriptor (the defaultSecurityDescriptor attribute). When
an object is created and a security descriptor isn’t specified, the default security de‐
scriptor is applied to it. This, along with inh... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
546 | 14.15. Resetting an Object’s ACL to the Default Defined in
the Schema
Problem
You want to reset an object’s ACL to the one defined in the schema for the object’s object
class.
Solution
Using a graphical user interface
1. Open the ACL Editor. You can do this by viewing the properties of an object (rightclick on the obj... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
547 | Solution
Using a graphical user interface
1. Open the Group Policy Management snap-in (gpmc.msc).
2. In the left pane, expand the Forest container, expand the Domains container, browse
to the domain you want to administer, and expand the Group Policy Objects
container.
3. Right-click on the GPO that controls the config... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
548 | See Also
“Introducing the Restriction of NTLM Authentication”; “Purging Old NT Security Pro‐
tocols”
14.17. Enabling List Object Access Mode
Problem
You want to prevent any authenticated user from being able to browse the contents of
Active Directory by default. Enabling List Object Access mode means that users will
ne... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
549 | strNewDSH = Left(strDSH,2) & boolEnableListObject
if len(strDSH) > 3 then
strNewDSH = strNewDSH & Right(strDSH, len(strDSH) - 3)
end if
WScript.Echo "Old value: " & strDSH
WScript.Echo "New value: " & strNewDSH
if strDSH <> strNewDSH then
objDS.Put "dSHeuristics", strNewDSH
objDS.SetInfo
WScript.Echo "Successfully ... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
550 | 14.18. Modifying the ACL on Administrator Accounts
Problem
You want to modify the ACL for user accounts that are members of one of the admin‐
istrative groups.
Solution
Using one of the methods described in Recipe 14.12, modify the ACL on the cn=Ad
minSDHolder,cn=Systems,<DomainDN> object in the domain that the adminis... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
551 | • Cert Publishers
• Backup Operators
• Domain Admins
• Enterprise Admins
• Print Operators
• Schema Admins
• Server Operators
The administrator and krbtgt user accounts are also specifically checked during the
Admin SD Holder process.
See Also
“Description and Update of the Active Directory AdminSDHolder Object”; “Five... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
552 | Using a command-line interface
Run the following command to list your current tickets:
> klist tickets
Run the following command to purge your tickets:
> klist purge
Discussion
Active Directory uses Kerberos as its preferred network authentication system. When
you authenticate to a Kerberos Key Distribution Center (KDC... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
553 | 2. In the left pane, expand HKEY_LOCAL_MACHINE→System→CurrentControlSet→Control→Lsa→Kerberos→Parameters.
3. Right-click on Parameters and select New→DWORD value. Enter MaxPacket
Size for the value name.
4. In the right pane, double-click on MaxPacketSize and enter 1.
5. Click OK.
Using a command-line interface
> reg a... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
554 | 14.21. Modifying Kerberos Settings
Problem
You want to modify the default Kerberos settings, such as maximum ticket lifetime.
Solution
Using a graphical user interface
1. Open the Default Domain Group Policy Object, or another domain-linked GPO,
in the Group Policy Management Console.
2. Navigate to Computer Configurat... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
555 | 14.22. Viewing Access Tokens
Problem
You want to view the access tokens that are created for a user account that has authen‐
ticated to Active Directory.
Solution
Using a command-line interface
> tokensz /compute_tokensize /package:negotiate /target_server:host/<DCName>↵
/user:<Username> /domain:<DomainName> /password... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
556 | of, plus any universal security groups in other domains that the user belongs to, plus
any groups represented in the user’s sIDHistory attribute. s refers to the number of
global security groups a representative user belongs to, plus any universal security
groups within the user’s own domain.
See Also
“MaxTokenSize and... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
557 | • User
• Computer
• InetOrgPerson
• msDS-ManagedServiceAccount
• msDS-GroupManagedServiceAccount
See Also
“Dynamic Access Control: Scenario Overview”; New-ADClaimType cmdlet reference;
Active Directory, Fifth Edition, by Brian Desmond et al. (O’Reilly)
14.24. Creating a Resource Property
Problem
You want to create a re... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
558 | • MS-DS-SingleValuedChoice
• MS-DS-YesNo
• MS-DS-Number
• MS-DS-DateTime
• MS-DS-OrderedList
• MS-DS-Text
• MS-DS-MultiValuedText
• MS-DS-MultiValuedChoice
See Also
“Deploy a Central Access Policy (Demonstration Steps)”; New-ADResourceProperty
cmdlet reference; and Active Directory, Fifth Edition, by Brian Desmond et a... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
559 | Discussion
A central access rule assigns permissions to resources under the conditions set on the
target resource. Central access rules are used in central access policies, which are then
applied on a resource, such as a shared folder.
See Also
“Deploy a Central Access Policy (Demonstration Steps)”; New-ADCentralAccess... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
560 | See Also
“Deploy a Central Access Policy (Demonstration Steps)”; Active Directory, Fifth Edi‐
tion, by Brian Desmond et al. (O’Reilly)
14.27. Applying a Central Access Policy
Problem
You want to apply a central access policy by using Group Policy.
Solution
1. Launch the Group Policy Management console.
2. Create and li... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
561 | Solution
1. Launch the Group Policy Management console (gpmc.msc).
2. Select the Default Domain Controllers Policy or another GPO that applies to all
domain controllers. Right-click the GPO and click Edit.
3. Navigate to Computer Configuration→Policies→Administrative Templates→Sys‐
tem→KDC.
4. Right-click KDS Support f... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
562 | 2. Select the Default Domain Policy or another GPO that applies to all domain devices.
Right-click the GPO and click Edit.
3. Navigate to Computer Configuration→Policies→Administrative Templates→Sys‐
tem→Kerberos.
4. Right-click Kerberos Support for claims, compound authentication, and Kerberos
armoring and select Edit... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
563 | null | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
564 | CHAPTER 15
Logging, Monitoring, and Quotas
15.0. Introduction
This chapter deals with tracking the activity and usage of various Active Directory
components. When you need to troubleshoot a problem, often the first place you look
is the logfiles. With Active Directory, there are several different logfiles, and each has... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
565 | associated with the schema NC.) By default, this container is hidden from view within
tools such as Active Directory Users and Computers, but you can see it by selecting
View→Advanced Features from the menu. The quota object container has an object
Class of msDS-QuotaContainer and contains several attributes that defin... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
566 | Solution
Using a graphical user interface
1. Run regedit.exe from the command line or from Start→Run.
2. In the left pane, expand the following Registry key: HKEY_LOCAL_MACHINE
\System\CurrentControlSet\Services\NTDS\Diagnostics.
3. In the right pane, double-click on the diagnostics logging entry you want to increase,
... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
567 | 8 Directory Access
9 Internal Processing
10 Performance Counters
11 Initialization/Termination
12 Service Control
13 Name Resolution
14 Backup
15 Field Engineering
16 LDAP Interface Events
17 Setup
18 Global Catalog
19 Inter-site Messaging
20 Group Caching
21 Linked-Value Replication
22 DS RPC Client
23 DS RPC Server
2... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
568 | process, account password expiration information, account lockout information, and
even Kerberos failures.
The NetLogon logging level is stored in the following Registry value:
HKLM\System\CurrentControlSet\Services\Netlogon\Parameters\DBFlag
If you set that Registry value manually instead of using nltest, you’ll
need ... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
569 | Using PowerShell
Set-ItemProperty -Path "<RegistryKeyPath>" -Name "<ValueName>" -Value "<Value>"
Discussion
If you experience problems with client GPO processing, such as a GPO not getting
applied even though you think it should, there are a number of different Registry keys
that can help you troubleshoot the problem. ... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
570 | 15.4. Enabling Kerberos Logging
Problem
You want to enable Kerberos logging on a domain controller to troubleshoot authenti‐
cation problems.
Solution
Using a graphical user interface
1. Run regedit.exe from the command line or from Start→Run.
2. In the left pane, expand HKEY_LOCAL_MACHINE\System\CurrentControlSet
\Con... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
571 | on logon session user5@adatum
ClientTime
ServerTime 19:34:26.0000 12/17/2012 Z
ErrorCode 0x17
ErrorMessage 0x19 KDC_ERR_PREAUTH_REQUIRED
ExtendedError
ClientRealm
ClientName
ServerRealm ADATUM.COM
ServerName krbtgt/ADATUM.COM
TargetName krbtgt/ADATUM.COM@ADATUM.COM
ErrorText
File e
Line d3a
Error Data is... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
572 | Using PowerShell
Get-EventLog "DNS Server"
Discussion
The Microsoft DNS Server keeps track of dozens of performance metrics. These metrics
include the number of queries, updates, transfers, directory reads, and directory writes
processed by the server. If you can pump these metrics into an enterprise management
system,... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
573 | Update = 2207
TKeyNego = 184
Standard = 12511
A = 1286
NS = 29
SOA = 2263
MX = 0
PTR = 1
SRV = 8909
ALL = 0
IXFR = 0
AXFR = 0
OTHER = 23
Command completed successfully.
See Also
MSDN: MicrosoftDNS_Statistic
15.6. Monitoring the Windows Time Service
Problem
You want to verify the correct functioning of the ... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
574 | See Also
“Configuring a Time Source for the Forest”; “How to configure an authoritative time
server in Windows Server”
15.7. Enabling Inefficient and Expensive LDAP
Query Logging
Problem
You want to log inefficient and expensive LDAP queries to the Directory Services event
log.
Solution
To log a summary report about th... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
575 | Keywords: Classic
User: ANONYMOUS LOGON
Computer: adatum-dc.adatum.com
Description:
Internal event: Active Directory Domain Services performed the following number↵
of search operations within this time interval.
Time interval (hours):
0
Number of search operations:
38529
During this time interval, the following numbe... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
576 | [shortnames]objectSid,sAMAccountName,userAccountControl
Server controls:
Visited entries:
51443
Returned entries:
3513
With the default settings, the query shown in the preceding event is considered both
expensive and inefficient. It is expensive because it visited more than 10,000 entries. It
is inefficient because it... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
577 | Solution
Using a graphical user interface
1. Launch LDP.exe.
2. From the menu, select Connection→Connect.
3. For Server, enter the name of a domain controller.
4. For Port, enter 389.
5. Click OK.
6. From the menu, select Connection→Bind.
7. Enter the credentials of a user to perform the search or accept the default an... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
578 | Discussion
The STATS control is a useful way to obtain statistics about the performance of an LDAP
query. With the STATS control, you can find out information such as the amount of
time it took the server to process the query, how many entries were visited versus re‐
turned, what the search filter expanded to, and whet... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
579 | Result <0>:
Matched DNs:
Stats:
Call Time: 20 (ms)
Entries Returned: 1
Entries Visited: 2
Used Filter: ( | (displayName=Jim Smith*) (givenName=Jim Smith*)
(legacyExchangeDN=Jim Smith) (msDS-AdditionalSamAccountName=Jim Smith*)
(physicalDeliveryOfficeName=Jim Smith*) (proxyAddresses=Jim Smith*) (name=Jim
Smith*) (sA... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
580 | 4. Under “Select counters from computer”, enter the name of the domain controller
you want to target.
5. Select the NTDS performance object.
6. Select the counters that you want to monitor.
7. After you’re done with your selections, click Close.
Using PowerShell
To retrieve a continuous counter for a performance object... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
581 | DRA Outbound Bytes Total/sec
Shows the total number of bytes replicated out. It is the sum of the number of
uncompressed bytes (never compressed) and the number of compressed bytes (after
compression).
DRA Outbound Objects/sec
Shows the number of objects replicated out.
DRA Outbound Values Total/sec
Shows the number of... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
582 | 15.10. Using Perfmon Trace Logs to Monitor
Active Directory
Problem
You want to enable Trace Logs to view system-level calls related to Active Directory.
Solution
Using a graphical user interface
1. Open the Performance Monitor (perfmon.exe).
2. In the left pane, expand Data Collector Sets.
3. Right-click Event Trace S... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
583 | Total Buffers Processed 18
Total Events Processed 720
Total Events Lost 0
Start Time Saturday, December 22, 2012
End Time Saturday, December 22, 2012
Elapsed Time 51 sec
+--------------------------------------------------------------------------------+
|Event Count Event Name Task Opcode Version Guid
+----------------... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
584 | 15.11. Creating an Administrative Alert
Problem
You want to define a threshold for a performance counter that should cause an alert to
be generated.
Solution
Using a graphical user interface
1. Open the Performance Monitor (perfmon.exe).
2. Expand Data Collector Sets. Right-click User-Defined and click New→Data Col‐
le... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
585 | 15.12. Emailing an Administrator on a Performance Alert
Problem
You want to create an alert that will notify an administrator via email if a performance
alert is generated.
Solution
Using PowerShell
You can create a Windows scheduled task that runs the following PowerShell command.
Then, the task can be called from a p... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
586 | See Also
Send-MailMessage cmdlet overview
15.13. Enabling Auditing of Directory Access
Problem
You want to enable auditing of directory access and modifications. Audit events are
logged to the Security event log.
Solution
Using a graphical user interface
1. Open the Group Policy Management snap-in (gpmc.msc) and edit t... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
587 | via the Security Settings section of a GPO that’s linked to the Domain Controllers OU,
using either the “Audit directory service access” setting or the “Advanced Audit Policy
Configuration” settings. Once either is enabled, you need to use the ACL Editor to define
auditing in the SACL of the objects and containers you ... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
588 | Primary Group ID: 513
Allowed To Delegate To: -
Old UAC Value: 0x0
New UAC Value: 0x15
User Account Control:
Account Disabled
'Password Not Required' - Enabled
'Normal Account' - Enabled
User Parameters: -
SID History: -
Logon Hours: <value not set>
Additional Information:
Privileges -
It can also be useful... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
589 | 15.14. Enabling Auditing of Registry Keys
Problem
You want to enable auditing of any changes to one or more Registry keys.
Solution
Using a graphical user interface
To enable auditing of a Registry key on an individual domain controller, do the
following:
1. Create a Group Policy Object (or edit an existing GPO) that e... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
590 | 3. Right-click on Registry and select “Add key.” On the “Select Registry key” screen,
navigate to the key that you want to audit and click OK.
4. Right-click on the key and select Permissions. Click Advanced and select the Au‐
diting tab.
5. Click Add to select a user or group to audit, then click OK. For Apply Onto, s... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
591 | Solution
Using a command-line interface
> dsadd quota -part <PartitionDN> -qlimit <QuotaLimit> -acct <PrincipalName>↵
[-rdn <QuotaName>]
The following command creates a quota specification that allows the ADATUM\rall‐
en user to create only five objects in the dc=adatum,dc=com partition:
> dsadd quota -part dc=adatum,... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
592 | Quotas do not apply to members of the Enterprise Admins and Domain
Admins groups. Even if you’ve configured a default quota for all users,
members of those administrative groups will not have any restrictions.
See Also
Recipe 8.13 for more on the computer object quota; this chapter’s Recipe 15.0 section
for more on the... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
593 | DSQuery. The PowerShell solution lists all quotas, including groups, for the Active
Directory domain. However, it does not show a relation between the user object and
any groups returned.
A more robust solution would entail retrieving the tokenGroups attribute of the user,
which contains a list of SIDs for all expanded... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
594 | Then run the following command:
> ldifde -v -i -f change_tombstone_quota.ldf
You can also make the change using DSMod or AdMod. DSMod takes the following
syntax:
> dsmod partition <PartitionDN> -qtmbstnwt <1-100>
You can make the change with AdMod, as follows:
> admod -b <PartitionDN> msDs-TombstoneQuotaFactor::<0-100>... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
595 | 15.18. Setting the Default Quota for All Security Principals
in a Partition
Problem
You want to set a default quota for all security principals.
Solution
Using a graphical user interface
1. Open ADSI Edit.
2. Connect to the partition you want to modify. (This setting must be changed for
each partition that you want to ... | http://ter40.free.fr/ebooktmp/new/Active%20Directory%20Cookbook,%204th%20Edition.pdf |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.