Resyncing a domain 
Author Message
 Resyncing a domain

Does anyone know the API call to force the PDC to resync the domain?  I need
to create a account and use it right away for assigning permissions in a
resource domain.  Since the account doesn't exist on all BDCs the resource
server fails to authenticate the new account.

Patrick A. Dant
CSC



Sun, 15 Apr 2001 03:00:00 GMT  
 Resyncing a domain
Hello Patrick!

I have the same challenge except  I want to synchronize a given BDc with the
PDC

I havn't got a complete solution yet. However, there is some info in the
lmaccess.h file

It refers to a I_NetLogonControl api call in the Netapi32.dll

This appears to let you do various things including synching am exntire
domain as well as synching an individual BDC with the PDC

I have managed to declare the API in VB5 but do not have enough info on all
the parameters that are passed to the API - The main one being the "Query
Value"  parameter.

I am working on the problem and hope to have an answer soon.

Apparantly the synching of domain controllers API is not one that microsoft
have documented very well!

From Stuart Grace

Quote:

>Does anyone know the API call to force the PDC to resync the domain?  I
need
>to create a account and use it right away for assigning permissions in a
>resource domain.  Since the account doesn't exist on all BDCs the resource
>server fails to authenticate the new account.

>Patrick A. Dant
>CSC



Tue, 24 Apr 2001 03:00:00 GMT  
 Resyncing a domain
Have you had any luck with resyncing a specific bdc?

Any information is greatly appreciated.

Thanks,
Noramn Menz



Quote:
> Hello Patrick!

> I have the same challenge except  I want to synchronize a given BDc with the
> PDC

> I havn't got a complete solution yet. However, there is some info in the
> lmaccess.h file

> It refers to a I_NetLogonControl api call in the Netapi32.dll

> This appears to let you do various things including synching am exntire
> domain as well as synching an individual BDC with the PDC

> I have managed to declare the API in VB5 but do not have enough info on all
> the parameters that are passed to the API - The main one being the "Query
> Value"  parameter.

> I am working on the problem and hope to have an answer soon.

> Apparantly the synching of domain controllers API is not one that microsoft
> have documented very well!

> From Stuart Grace


> >Does anyone know the API call to force the PDC to resync the domain?  I
> need
> >to create a account and use it right away for assigning permissions in a
> >resource domain.  Since the account doesn't exist on all BDCs the resource
> >server fails to authenticate the new account.

> >Patrick A. Dant
> >CSC



Tue, 01 May 2001 03:00:00 GMT  
 Resyncing a domain
The API call that syncs the entire domain also syncs individual BDC with the
PDC

A "control" parameter is passed to the API which determines what type of
synchronization.

However, havn't got it working yet, but I soon will! (It's part of a major
project that I'm working on and a solution has to be found)

However, a temporary fix is to get your VB code to execute the following:

NET ACCOUNTS /SYNC

However, this has to be executed on the BDC (or PDC) and it probably syncs
the entire domain.

So a piece of code that reads the LOGONSERVER environment variable and reads
the time on the LOGONSERVER and then schedules a job to run in say 10
seconds time on this server, that executed the above command, would probably
work. However, the person who is logged in, would have to be an
administrator because only administrators can schedule jobs to run.( The
soon command from the NT4 resource kit could be used to schedule the job if
you can't get an API call to do the job)

I know it's a bit clumsy but it would probably work!

Also there is someone on the Windows Scripting Host (WSH) newsgroup who has
wrote a dll (that was released yestaday) that can be called using a
getobject command in your code. However, this syncs the entire domain.

Here's the message from Ian on wsh newsgroup:

**********
You can download this from http://wsh.glazier.co.nz/frame.htm in the
download page.

Sample code...

Set oSer = CreateObject("ServerTools.Tools")
Dim srvname
Dim success
srvname = oSer.GetPDCName("Domain_Name")
Wscript.echo srvname
success = oSer.SyncPDC("Domain_Name")
Wscript.echo success

The control is FreeWare. Use it at YOUR own risk not mine.
New versions will be posted on http://wsh.glazier.co.nz
Subscribe to the newsletter if you want to be kept informed
of any updates and other cool WSH stuff.
Regards,
Ian
****************************************************

From Stuart

Quote:
>Have you had any luck with resyncing a specific bdc?

>Any information is greatly appreciated.

>Thanks,
>Noramn Menz



>> Hello Patrick!

>> I have the same challenge except  I want to synchronize a given BDc with
the
>> PDC

>> I havn't got a complete solution yet. However, there is some info in the
>> lmaccess.h file

>> It refers to a I_NetLogonControl api call in the Netapi32.dll

>> This appears to let you do various things including synching am exntire
>> domain as well as synching an individual BDC with the PDC

>> I have managed to declare the API in VB5 but do not have enough info on
all
>> the parameters that are passed to the API - The main one being the "Query
>> Value"  parameter.

>> I am working on the problem and hope to have an answer soon.

>> Apparantly the synching of domain controllers API is not one that
microsoft
>> have documented very well!

>> From Stuart Grace


>> >Does anyone know the API call to force the PDC to resync the domain?  I
>> need
>> >to create a account and use it right away for assigning permissions in a
>> >resource domain.  Since the account doesn't exist on all BDCs the
resource
>> >server fails to authenticate the new account.

>> >Patrick A. Dant
>> >CSC



Wed, 02 May 2001 03:00:00 GMT  
 Resyncing a domain


Quote:
> the time on the LOGONSERVER and then schedules a job to run in say 10

Stuart - thank you for all your information.  Both here and on the ADSI
group.  If I am able to get a resonable solution, I will surely forward
it on to you.

Thank You,

Norman Menz



Sat, 05 May 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. domain pruefen domain provider es domain registrieren domain angebot no domain

2. domaene sichern de tc domain domain registrieren preisvergleich kostenlose toplevel domain de domain preis

3. plesk domain anmeldung domaene langsam anmeldung an domain de domain kaufen domain suchen

4. Add a user in domain 2 from domain 1 using the classes in the DirectoryServices

5. finding all domains under the root domain

6. authentication problems from domain to domain

7. How to List Domain Controllers in domain

8. Getting domain name of parent domain

9. NT Domain Group Assignments Retrieved Across Domains

10. Determine whether or not a domain user is a member of a domain group

11. HELP: Listing domains and computers in the domains

12. How to move workstations from one domain to another domain ?

 

 
Powered by phpBB® Forum Software