Showing posts with label PCNS. Show all posts
Showing posts with label PCNS. Show all posts

Saturday, September 21, 2013

Password Synchronization with PCNS using a one way external/forest trust with Selective Authentication



I haven't posted for a while as I try to stick to my mantra of only posting things that I have not yet been able to find on the internet. With that in mind I have been receiving a lot of requests from clients who want to use PCNS to synchronize passwords between two forests using selective authentication. I searched the internet for days trying to find any indication that this was possible, but without any luck.  I decided to see if it was possible. I spent quite a bit of time working through the permissions needed and how best they could be implemented.
The good news is ... it is possible, reasonably simple and below I will show you how it's done.

First let me explain what the difference is between domain-wide and selective authentication.
·         With Domain-wide authentication users from the trusted domains will automatically have access to the resources in the trusting domain.
·         With Selective authentication users from the trusted domain need to be granted the specific rights to access resources in the trusting domain. This means that Selective Authentication is much more secure than domain-wide authentication, but also needs permissions to be explicitly granted to the relevant resources that access is required for.

What you will need:
  1. A one way external/forest trust with the forest/domain running PCNS needs to be trusted by the forest/domain running, My setup it looks as follows:

     
  2. PCNS Installed and configured on the domain controllers running in the trusted domain. 
  3.  Relevant frewall rules in place to allow PCNS traffic between the trusted and trusting domain.
  4. On Windows 2012 you will need to initially setup the trust as domain-wide in order to setup the permissions. Once they are configured you can change the trust back to selective authentication. On Windows 2008 it will prompt you to authenticate in order to assign the permissions.
  5. Name resolution working between the two forests. This can either be via conditional forwarders or by creating a secondary zone for each forest on the opposing forest. I would suggest that you limit the amount of DC’s that can be resolved for the trusting domain as you will need to grant permissions to each domain controller that can be resolved in the trusted domain via DNS.
  6. Domain Admin access to the trusting domain in order to assign the permissions and change the required group policies.
  7. Domain Admin access to the trusted domain to lookup user and computer object in the trusted domain and change the required group policies.
  8. You will notice that I use the domain controllers group in place of the machine accounts of the domain controllers for obvious reasons.



How it is done:
1.      Trust
a.       Setup the trust as specified.



2.      Trusting Domain
Active Directory Users and computers tasks
a.       Setup Allowed to Authenticate Permission on the domain controllers
(This will need to be completed on all domain controllers that are resolvable for the domain in DNS. This can also be scripted for larger environments. You can also limit the dns records resolvable to reduce the servers the permission needs to be applied to   )
·         Open ADUC by running DSA.msc
·         Navigate to the domain controllers that need the permission applied.
·         Setup the permission as below

(This is required for the trusted domain controllers to authenticate to the trusting domain controllers to query SPN’s and permission).

·         Navigate to the FIM Synchronization Server and repeat the same permission
(This is required for the trusted domain controllers to authenticate to the FIM Synchronization Server).

·         Navigate to the FIM Synchronization Server service account and repeat the same permission.
(This is required for PCNS on the trusted domain DC's complete to request a context change once the initial RPC bind is established which took me a while and a whole lot on netmon packets to figure out)

Group Policy Management Tasks
Open GPMC.msc on the domain controller
a.       Open GPMC.MSC
b.      Navigate to the “Default Domain Controllers Policy “ and right click and select edit.
c.       Navigate to Computer Configuration,
d.      Navigate to Windows Settings
e.       Navigate to Security Settings
f.       Navigate to User Rights Assignment
g.      Navigate to the “Access this computer from the Network” Policy”


h.      Add the Trusted domain Domain Controllers group to the list of accounts

            Local Policy Tasks
a.       Log into the FIM Synchronization Server as an Administrator
b.      Open local computer group policy by running “gpedit.msc”
c.       Navigate to Computer Configuration,
d.      Navigate to Windows Settings
e.       Navigate to Security Settings
f.       Navigate to User Rights Assignment
g.      Navigate to the “Access this computer from the Network” Policy”


h.      Add the Trusted domain Domain Controllers group to the list of accounts



3.      Trusted Domain
Group Policy Management Tasks
Open GPMC.msc on the domain controller
a.       Open GPMC.MSC
b.      Navigate to the “Default Domain Controllers Policy “ and right click and select edit.
c.       Navigate to Computer Configuration,
d.      Navigate to Administrative Templates
e.       Navigate to System
f.       Navigate to Kerberos
g.      Navigate to the “Use forest search order” Policy”
h.      Add the Trusting Domain to the list of Forests to Search for SPN’s. (This is needed for the trusted domain to be able to resolve SPN’s in the Trusting domain where the SPN for the FIM synchronization server service account is located– thanks Jorge for this one .. http://jorgequestforknowledge.wordpress.com/2011/09/14/kerberos-authentication-over-an-external-trust-is-it-possible-part-6).

And there we are ..ready to test… 
Check the Service Configuration

Reset the user password


Verify that the password was successfully delivered


Check this against AD ... and voila  

All working!!

Friday, October 1, 2010

PCNS Event 6023,6025 Firewall Issue running on Windows 2008

When Running the PCNS (Password Change Notification service) with both Windows 2008 Domain Controller and ILM/FIM Synchronization Service server, allways remember to add a rule on the ILMFIM Synchronization Service server to allow inbound PCNS connections in (recommended) or disable the Firewall on the "Domain" Profile (not recommended.

If this is not in place, you will typically get the following event log errors on your DC's
Event ID 6023
(click on Image to enlarge)
Event ID 6025

(click on Image to enlarge)
On eventlog 6025 the typical eventlog data will look as follows

Log Name:      Application
Source:        PCNSSVC
Date:          2010/09/30 03:09:55 PM
Event ID:      6025
Task Category: (4)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      DCname.domain.com
Description:
Password Change Notification Service received an RPC exception attempting to deliver a notification.
The password change notification target could not be contacted.
User Action:
The target server may not be running. Verify that the target server is running.
Additional Details:
Thread ID: 2804
Tracking ID: 9dd78d30-cda7-4163-96ec-04cb1312823b
User GUID: 82ed51a7-5c1c-4e9d-ac22-296db6190f5d
User: Domain\TestUser
Target: miisPCNS
Delivery Attempts: 42
Queued Notifications: 3
0x000006BA - The RPC server is unavailable.
ProcessID is 2764
System Time is: 9/30/2010 13:9:55:89
Generating component is 2
Status is 1722 - The RPC server is unavailable.
Detection location is 1710
Flags is 0
NumberOfParameters is 1
Long val: 0
ProcessID is 2764
System Time is: 9/30/2010 13:9:55:89
Generating component is 18
Status is 1722 - The RPC server is unavailable.
Detection location is 1442
Flags is 0
NumberOfParameters is 1
Unicode string: ilmserver.domain.com
ProcessID is 2764
System Time is: 9/30/2010 13:9:55:89
Generating component is 18
Status is 1722 - The RPC server is unavailable.
Detection location is 323
Flags is 0
NumberOfParameters is 0
ProcessID is 2764
System Time is: 9/30/2010 13:9:55:89
Generating component is 18
Status is 1237 - The operation could not be completed. A retry should be performed.
Detection location is 313
Flags is 0
NumberOfParameters is 0
ProcessID is 2764
System Time is: 9/30/2010 13:9:55:89
Generating component is 18
Status is 10060 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Detection location is 311
Flags is 0
NumberOfParameters is 3
Long val: 49201
Pointer val: 0
Pointer val: 0
ProcessID is 2764
System Time is: 9/30/2010 13:9:55:89
Generating component is 18
Status is 10060 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Detection location is 318
Flags is 0
NumberOfParameters is 0
ProcessID is 2764
System Time is: 9/30/2010 13:9:34:54
Generating component is 18
Status is 1237 - The operation could not be completed. A retry should be performed.
Detection location is 313
Flags is 0
NumberOfParameters is 0
ProcessID is 2764
System Time is: 9/30/2010 13:9:34:54
Generating component is 18
Status is 10060 - A connection attempt failed because the connected party did not properly respond after a period of time, or established con
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="PCNSSVC" />
    <EventID Qualifiers="49152">6025</EventID>
    <Level>2</Level>
    <Task>4</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2010-09-30T13:09:55.000Z" />
    <EventRecordID>224531</EventRecordID>
    <Channel>Application</Channel>
    <Computer>DCname.domain.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data>2804</Data>
    <Data>9dd78d30-cda7-4163-96ec-04cb1312823b</Data>
    <Data>82ed51a7-5c1c-4e9d-ac22-296db6190f5d</Data>
    <Data>domain\TestUser</Data>
    <Data>miisPCNS</Data>
    <Data>42</Data>
    <Data>3</Data>
    <Data>0x000006BA</Data>
    <Data>The RPC server is unavailable.
</Data>
    <Data>ProcessID is 2764
System Time is: 9/30/2010 13:9:55:89
Generating component is 2
Status is 1722 - The RPC server is unavailable.
Detection location is 1710
Flags is 0
NumberOfParameters is 1
Long val: 0
ProcessID is 2764
System Time is: 9/30/2010 13:9:55:89
Generating component is 18
Status is 1722 - The RPC server is unavailable.
Detection location is 1442
Flags is 0
NumberOfParameters is 1
Unicode string: ilmserver.domain.com
ProcessID is 2764
System Time is: 9/30/2010 13:9:55:89
Generating component is 18
Status is 1722 - The RPC server is unavailable.
Detection location is 323
Flags is 0
NumberOfParameters is 0
ProcessID is 2764
System Time is: 9/30/2010 13:9:55:89
Generating component is 18
Status is 1237 - The operation could not be completed. A retry should be performed.
Detection location is 313
Flags is 0
NumberOfParameters is 0
ProcessID is 2764
System Time is: 9/30/2010 13:9:55:89
Generating component is 18
Status is 10060 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Detection location is 311
Flags is 0
NumberOfParameters is 3
Long val: 49201
Pointer val: 0
Pointer val: 0
ProcessID is 2764
System Time is: 9/30/2010 13:9:55:89
Generating component is 18
Status is 10060 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Detection location is 318
Flags is 0
NumberOfParameters is 0
ProcessID is 2764
System Time is: 9/30/2010 13:9:34:54
Generating component is 18
Status is 1237 - The operation could not be completed. A retry should be performed.
Detection location is 313
Flags is 0
NumberOfParameters is 0
ProcessID is 2764
System Time is: 9/30/2010 13:9:34:54
Generating component is 18
Status is 10060 - A connection attempt failed because the connected party did not properly respond after a period of time, or established con</Data>
<Data>
The password change notification target could not be contacted.
User Action:
The target server may not be running. Verify that the target server is running.
Additional Details:
</Data>
  </EventData>
</Event>