Showing posts with label windows 2003. Show all posts
Showing posts with label windows 2003. Show all posts

Sunday, March 1, 2009

Change SOA Record

The following illustrates on how to change SOA record.

1. Assume the domain is "myrootdns2003.com" and dns server is "dnssserver2003".
2. Open dns using the command dnsmgmt.msc.
3. In the console tree, browse to dns zone "myrootdns2003.com", right click on it and select properties.
4. In dns zone properties dialog, go to "Start Of Authority(SOA)" tab, enter the FQDN of primary dns server "dnsserver2003", responsible person and serial number as shown below.
5. Thus changes the SOA record on domain controller.

Create SRV record

Service (SRV) record. Allows administrators to use several servers for a single DNS domain, to easily move a TCP/IP service from one host to another host with administration, and to designate some service provider hosts as primary servers for a service and other hosts as backups. DNS clients that use a SRV-type query ask for a specific TCP/IP service and protocol mapped to a specific DNS domain and receive the names of any available servers.

The following shows on how to create SRV record

1. Assume the dns server is "dnsserver2003" and dns zone to which the srv record to be added is "myrootdns2003.com"
2. Open dns management snap-in console using the command dnsmgmt.msc.
3. In the console tree, go to the dns zone "myrootdns2003.com", right click on it and select "other new records"
4. Select "Service Location (SRV)" in new resource record type dialog and click "Create Record" button.
5. Enter the SRV server details in new resource record dialog, and select "Allow any authenticated user to update all dns records with the same name" check box and click ok.
6. Thus creates new srv record.

Netdom - Verify Trust

It is often needed to verify a trust relationship, particularly external trust relationship, is working properly before using any cross domain network resources. To verify a trust on command line. do the following.



1. Assume the trusting and trusted domains are "myrootdns2003.com" and "myforesttest.com" respectively and passwords are "Mydns123" and "Myforest123".
2. Now run the below command to verify the external trust.



netdom trust myrootdns2003.com /domain:myforesttest.com
/userd:myforesttest\Administrator /Passwordd:Myforest123 /usero:myrootdns2003\Administrator /passwordo:Mydns123 /verify




3. To verify trust relationship between Active Directory based windows domain and non-windows realm kerberos domain (Assume the kerberos realm password is "Mytrust123"), run

netdom trust myrootdns2003.com /domain:myforesttest.com
/userd:myforesttest\Administrator /Passwordd:Myforest123 /usero:myrootdns2003\Administrator /passwordo:Mydns123 /verify /Passwordt:Mytrust123

reset trust relationship

When a trust relationship is broken, then it is necessary to reset the trust relationship. The following illustrates on how to reset a broken domain trust relationship.

1. Assume the trusting domain name is "myrootdns2003.com" and trusted domain is "myforesttest.com".
2. Open "Active Directory domains and trusts" Console diagram using the command "domain.msc".
3. Right click on domain node "myrootdns2003.com" and select properties.

4. In "myrootdns2003.com" properties dialog, select the domain "myforesttest.com" and click properties.
5. Click validate button in "myforesttest.com" properties dialog.
6. If validation fails, a dialog box comes to reset the trust relationship. Then follow up with the dialog box and complete the resetting.

netdom - reset trust

If a trust relationship between two domain is broken, then it is necessary to reset the trust. netdom.exe is a command tool which can be used to reset the trust. Follow the steps below to reset the trust.

1. Assume the trust exists between the domains "myrootdns2003.com" and "myforesttest.com". Passwords of both the domains are "Mydns123" and "Myforest123" respectively.
2. Now run the below command to reset trust.


netdom trust myrootdns2003.com /domain:myforesttest.com /userd:myforesttest\Administrator /passwordd:Myforest123 /usero:myrootdns2003\Administrator /passwordo:Mydns123 /reset


3. If the trust is between windows domain and non-windows realm (kerberos) , then run the below command to reset the trust,

netdom trust myrootdns2003.com /domain:myforesttest.com /userd:myforesttest\Administrator /passwordd:Myforest123 /usero:myrootdns2003\Administrator /passwordo:Mydns123 /reset /Passwordt:Mytrust123

Note, the passwordt has to be provided to reset the trust with Kerber0s realm.

Saturday, February 28, 2009

Register SRV Record

By Default, SRV records are automatically created one the domain controller is installed.
If srv records not found or invalid, try the following mitigation to manually register dns srv records.

1. Restart NetLogon server on domain controller (DC).
2. If step 1 fails, then run dcdiag /fix and check srv records are registered.
3. if both 1 and 2 fails, run netdiag /fix on domain controller.
4. if , 2 and 3 fails, then try manually editing netlogon.dns. i.e add srv record to netlogin.dns as shown below.
After editing the netlogon.dns file, reload the dns zone as shown below.

If none of the above works, still one can register srv records, by recreating dns zone. Follow the instructions shown below to recreate dns zone.

1. Assume the dns zone is "myrootdns2003.com"
2. Open dns management console using dnsmgmt.msc command.
3. In the dns console tree, go to forward lookup zones, right click on dns zone. "myrootdns2003.com" and click delete.

4.After deleting dns zone, right click on "forward lookup zones" and select "newzone" and follow the steps to recreate same dns zone. i.e dns zone with name "myrootdns2003.com"
5. while re creating new zone, “Allow Secure and Non Secure Dynamic updates" option in dynamic updates dialog.
6.Now restart netlogon service.

Thursday, February 26, 2009

Domain trust

A domain trust is a relationship between domains which allows users of one domain to access services of other domain.


By default, users of a domain can have access to resources contained in that domain. i.e domain users can use domain resources like network printer, fax service and any network share. However, users of one domain cannot access resources of other domain. By this way, a domain can provide its users with secured access to all resources in that domain. If all users accounts and services can be managed in a single large domain, then there is no problem. However, there are needs to have multiple separate domains. This is because having multiple domains is a useful way to separate the scope of each domain administrator from other domain administrators. i.e Each domain administrator is responsible for setting up scope of security policy and account policy settings on domain users and domain resources. Thus both multiple domain and trusts between domains are needed.


Trust mechanism in windows

A domain trust(trust relationship) is a relationship between two domains to allow authentication and authorization to shared resources. In authentication process, verifies the user identity and in authorization process determines what the authenticated user is allowed to do on shared network resource on target computer. i.e Once the user is authenticated by the domain containing shared network resource, the target computer compares the user’s credentials to the permissions assigned within its security descriptor table to help determine the user’s level of authorization to the shared resource. A security descriptor table contains access control lists (ACLs) that identify the users and groups that are assigned or denied access permissions on shared resource.

Trusts in Active Directory:

Domains that have domain controllers running Windows 2000 Server or Windows Server 2003 used Active Directory service. Windows NT and earlier windows versions doesn't have active directory service support.


Trust Relationship types:

The direction that a trust is assigned determines the trust path used for authentication. A trust path is defined by the series of trust relationships that authentication requests must follow between domains.

The following are the domain trust relationship types characterized by the trust path used for authentication.

One-Way Trust
A one-way trust is a unidirectional trust between two domains. i.e in one-way trust between a trusted domain and a trusting domain, trusted domain users or computers can access resources in the trusting domain. However, the trusting domain users cannot access resources in the trusted domain. Some one-way trusts can be either nontransitive or transitive, depending on the type of trust being created.
Two-Way Trust
A two-way trust is a bidirectional trust between two domains. i.e users of either domain can send authentication requests to other domain. Some two-way relationships can be either nontransitive or transitive depending on the type of trust being created.

All domain trusts in an Active Directory integrated forest are two-way, transitive trusts. When a new child domain is created, a two-way, transitive trust is automatically created between the new child domain and the parent domain. This is not true with domains not integrated with active directory service(windows NT and earlier versions).


Trust Transitivity
Transitivity determines whether a trust between two domains can be extended beyond the two domains. A transitive trust extends trust relationships to other domains. Every time a domain created in a forest, a two-way transitive trust is created between the new domain and its parent domain automatically. The trust path flows upward through the domain hierarchy, extending the initial trust path created between the new domain and its parent.


Transitive trust relationships thus flow upward through a domain tree. Therefore a domain tree can be defined as a hierarchical structure of one or more domains, connected by transitive, bidirectional trusts, that forms a contiguous namespace.


So with transitive trusts, user accounts of any domain in the forest can be authenticated by any other domain in the forest. Consequently, with a single logon process, accounts with the proper permissions can access resources in any domain in the forest happens.


Nontransitive trust
In this, The flow is restricted to the two domains in the trust relationship and nontransitive trust does not extend trust relationships to other domains in the forest. A nontransitive trust can be either a two-way trust or a one-way trust. By default, Nontranstive Trusts are not created. On must explicitly create those.


Various Trust Deployment methodologies

There are three trust deployment strategies that are used to accommodate the resource sharing needs of an enterprise. These are intra-forest, inter-forest and Kerberos realms based trusts.

Intra Forest Trusts

Intra-forest trusts are transitive trusts that can be used only within a single forest. i.e trust can't be created across multiple forests. Intra-forest trusts includes tree-root, parent-child, and shortcut trust relationships.

Tree-root trusts

By default, two-way, transitive trusts are automatically created when a new domain is added to a domain tree or forest root domain. But when a new domain tree is created in an existing forest, then a new tree-root trust is established. tree-root trusts are two-way and transitive.

Parent-child trusts

A new parent and child trust is established when ever a new child domain is created in a domain tree. Trust flows from child domain to parent domain and goes upwards till domain tree.

Shortcut trusts

Shortcut trusts are the trusts established between two domain trees within the same forest. By Default, Authentication requests must first travel a trust path between domain trees, and in a complex forest this can take time. Using shortcut trusts can create trust with domains in other domain trees. Thus authentication requests goes through shortcut trust which increases overall speed.

Inter Forest Trusts

Inter-forest trusts can be created between domains contained in different forests. Inter-forest trusts can be nontransitive or transitive. Inter-forest trusts include external trusts and forest trusts and both these trust types should be created explicitly.

External trusts

External trusts are nontransitive which can be created between domains in different forests or between an Active Directory domain and a Windows NT 4.0 domain.

Forest trusts

Forest trust is a trust relationship between two forests. Forest trusts can be a one-way or two-way transitive. A two-way forest trust is used to form a transitive trust relationship between every domain in both forests. Forest trusts can be created only between two Windows Server 2003 forests and cannot be implicitly extended to a third forest.

Kerberos Realm Trusts

A realm trust can be established between any non-Windows-based operating system Kerberos version 5 realm and a Windows 2000 or Windows 2003 domain. This trust relationship allows cross-platform interoperability with security services based on other Kerberos version 5 implementations. Realm trusts can be either one-way or two-way.

Wednesday, February 25, 2009

import reverselookup zone from file

To import a reverselookzone from a file, follow the instructions shown below.

1. Assume the dns server is "dnsserver2003" and reverse lookup zone is "1.168.192.in-addr.arpa"
2. Open dns manger snap-in using the command dnsmgmt.msc.

3. In the console tree, browse to reverse lookup zone, right click on it and select "newzone" and click next
4. Click next in zone wizard

3. Select "primary" if one wishes to create Primary zone or else select secondary zone or stub zone and then click next.

5. Select "all dns servers in the active directory domain myrootdns2003.com" in zone replication scope dialog and click next.
6. Enter the network id "192.168.1" in reverse lookup zone name dialog and click next.
7. Select "Use the existing file" option and enter "1.168.192.in-addr.arpa.dns" in zone file dialog and click next. Make sure the file "1.168.192.in-addr.arpa.dns" exists at %windir%\system32\dns
7. Select "Do Not allow dynamic updates" in dynamic updates dialog and click next.
8. Verify the settings in summary dialog and click next.

Export reverse lookup zone using dnscmd

Do the following to export reverse lookup zone on command line. 1. Assume the primary dns server for the dns (domain controller) is "dnsserver2003" and the reverselookupzone file to be created is "reverselookupzone.dns"
2. Now run the below command to export reverselookup zone on command prompt.

dnscmd dnsserver2003 /zoneexport 1.168.192.in-addr.arpa reverselookupzone.dns.

Output: DNS Server . exported zone 1.168.192.in-addr.arpa to file C:\WINDOWS\system32\dns\reverselookupzone.dns Command completed successfully.


3. To export the zone from current cache, then run
dnscmd /zoneexport 1.168.192.in-addr.arpa /cache

output:DNS Server . exported zone
1.168.192.in-addr.arpa to file C:\WINDOWS\system32\dns\/cache
Command completed successfully.

Export reverse lookup zone

The following illustrates exporting reverselookup zone to a file,
1. Assume the dns server for domain "myrootdns2003.com" is "dnsserver2003"
2. Open dns manger snap-in using the command dnsmgmt.msc.

3. in the console tree, browse to the reverse lookup zone, right click on it and select "export list".
3. Enter the file name to which the zone to be exported in save dialog box.
Relevant Posts:
Export reverse lookup zone on command line
Create Reverse Lookup zone from file

How to Join a domain

To join a machine to a domain, follow the instructions shown below.
1. Assume the domain to which this machine going to be joined is "myrootdns2003.com".
2. Open mycomputer, right click on it and select properties.
3. In mycomputer properties, go to Computer Name tab, click on "change" button.
4. Enter domain name "myrootdns2003.com" in to which this machine will join in Compute Name Changes dialog and click ok.

5. Enter user name and password which has privileges to join in target domain and click ok.

6. Thus domain join success pop up dialog comes up.
Relevant Posts:
Join a target domain on command line

Tuesday, February 24, 2009

Enable Secure and NonSecure updates on a zone

To enable both the secure and non secure updates on a zone follow the instructions below.

1. Assume dns server which is acting as a domain controller(DC) for a dns say "myrootdns2003.com" is "dnsserver2003", zone name on which to enable secure/nonsecure updates in "myrootdns2003.com".
2. Open dns management console using the command dnsmgmt.msc
3. In the console tree, browse to the dns zone "myrootdns2003.com", right click on it and select "properties".
4. In the dns zone properties dialog, go to general tab, select "nonSecure and Secure" option in the dynamic updates drop down box.

Enable Secure DynamicUpdates on reverselookup zone

Follow the instruction below to enable secureupdates on a reverselookup zone.

1. Assume the dns server on which the DNS (DomainController) is installed is "dnsserver2003" and reverse lookup zone is "1.168.192.in-addr.arpa".
2. open the dns management console snapin using the command dnsmgmt.msc.


3. In the console tree, browse to the reverse lookup zone, right click on it and click "properties"
tr>
3. In the reverse lookup zone properties dialog, go to the general tab and select "secure only" option from Dynamic updates drop down box, click apply and then click ok button.

reload reverselookup zone

To reload or update a reverselookup zone, follow the instructions below.

1 Assume the dns server (DC) is "dnsserver2003" and reverse lookupzone is which is going to be updated is "1.168.192.in-addr.arpa".
2. Open dns management console using the command dnsmgmt.msc.
3. In the dns manager snap-in, go to the reverse lookup zone "1.168.192.in-addr.arpa", right click on it and select "reload" menu item.
4. Click yes button is reload dialog box.
5. Thus reloads the reverselookup zone.
Relevant Posts:
Reload Reverselookup on command line

Failed to reload the zone

The Failed to reload the zone zone is locked for zone trasfer or update error occures when trying to update a zone on which dynamic updates is disable.
To enable dynamic updates on a zone, follow the instruction at Enable Updates on a zone.

remove machine from domain using netdom

To unjoin a dns client machine from it's domain on command line, do the following

1. Assume the domain to be joined is "myrootdns2003.com", machine name which is going to join domain "myrootdns2003.com" is "dnsclient", domain user account name is "Administrator" and password is "Mydns123", dnsclient machine user account and password is "Administrator" and "dnsclient123".
2. Now run the following command to remove machine from the domain,

netdom remove dnsclient /domain:myrootdns.com /userd:Administrator /passwordd:Mydns123 /usero:Administrator /passwordo:dnsclient123


3. To un-join machine with reboot option (say 100secs restart time), run

netdom remove dnsclient /domain:myrootdns.com /userd:Administrator /passwordd:Mydns123 /usero:Administrator /passwordo:dnsclient123 /REboot:100

reload reverse lookup zone using dnscmd

To reload reverselookup zone on command line using dnscmd command, follow the instructions below.

1. Assume the dns server on which to reload the zone is "dnsserver2003" and reverselookup zone name is "1.168.192.in-addr.arpa".
2. Now run the below command to update the reverse lookupzone.
dnscmd dnsserver2003 /zonereload 1.168.192.in-addr.arpa

Join domain using netdom

The following illustrates on how to join a domain on command line.

1. Assume the domain to be joined is "myrootdns2003.com", machine name which is going to join domain "myrootdns2003.com" is "dnsclient", domain user account name is "Administrator" and password is "Mydns123", dnsclient machine user account and password is "Administrator" and "dnsclient123"

2. Now run the following command to add the machine "dnsclient" to the domain "myrootdns2003.com"

netdom join dnsclient /domain:myrootdns.com /userd:Administrator /passwordd:Mydns123 /usero:Administrator /passwordo:dnsclient123

To specify the reboot time (say 100 secs) after joining domain, run

netdom join dnsclient /domain:myrootdns.com /userd:Administrator /Passwordd:Mydns123 /usero:Administrator /passwordo:dnsclient123 /REBoot:100
The reboot message box comes up

Notes:
1. Check the domain "myrootdns2003.com" and FQDN dnsserver2003.myrootdns2003.com is pingable from dnsclient machine.
2. Sometimes firewall blocks from joining domain. So Check the firewall is disabled before joining.

3.
NetDom needs access to ports 135 and 139 for joining domain. Check that the target domain machine listens on these ports.
4. Check the reg key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system\EnableLUA to 1
Relevant Posts:
Un-join client from domain on command line

Monday, February 23, 2009

Create external trust

The following illustrates on how to create trust between two domains.

1. Assume the local domain is "myrootdns2003.com" and target domain to which the trust to be created is "mydnsroot2.com".
2. Open the active directory domains and trust snapin using the command domain.msc.
3. In the left pane, right click on the domain "myrootdns2003.com" and select properties.
4. In the domain properties dialog, go to trusts tab and click "new trust" button.
5. Type the NetBIOS name of the NT domain or the DNS name of the AD domain( here "dnsserver2") in the trust name dialog and click next.
6. Select "Two-way " option in direction of the trust dialog and click next.
7. Select "Both this domain and specified domain" option in sides of trust dialog and click next.
8. Enter administrative user name and password for target domain "mydnsroot2.com" and click next.
6. Verify the summary and click next.
7. Thus creation of new trust completion dialog comes up. now click click next.

8. Select "No, do not confirm outgoing trust" option and click next.
9. Thus completes creation of new trust.
10. Thus verify trust created in "trusts" tab of domain properties dialog.


Design by infinityskins.blogspot