#86049 - 2002-06-13 05:33 PM
Synchronise Domain
|
Anonymous
Anonymous
Unregistered
|
Anyone know how to programmatically synchronise a domain? (Not ADs)
|
Top
|
|
|
|
#86050 - 2002-06-13 08:34 PM
Re: Synchronise Domain
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
Yep.. From the DC:
NET ACCOUNTS /SYNC /DOMAIN
That should work to sychronize the user accounts database.
Brian
|
Top
|
|
|
|
#86052 - 2002-06-14 09:52 AM
Re: Synchronise Domain
|
Anonymous
Anonymous
Unregistered
|
Actually it is just NET ACCOUNTS /SYNC. Besides, Les was right, I am looking for a COM solution - and I need to be able to run this from a Member Server.
|
Top
|
|
|
|
#86054 - 2002-06-14 01:47 PM
Re: Synchronise Domain
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
I can do this with the Lanman module in Perl but have come up empty searching MSDN for an WMI or ADSI interfaces related to Netlogon Control or SAM replication for NT4 Lanman server. [ 14 June 2002, 13:48: Message edited by: Howard Bullock ]
|
Top
|
|
|
|
#86055 - 2002-06-14 02:00 PM
Re: Synchronise Domain
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
I haven't seen a way to do it through ADSI as of yet, but I really haven't had time to look too much, lately, so I'll work on it.
Brian
|
Top
|
|
|
|
#86056 - 2002-06-14 04:06 PM
Re: Synchronise Domain
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
I've gotten stuck on this. You said you did NOT want to use ADSI? You DO want to sync the user accounts database?
I was trying to do it WITH ADSI (WINNT:) and keep getting problems with the error "IDispatch pointers not allowed in expressions" When trying to use OpenDSObject with KiXtart... so I'm pretty sure that's not going to work unless I'm missing something simple (where is Shawn??)...
Back to the drawing board..
Brian
|
Top
|
|
|
|
#86059 - 2002-06-14 04:26 PM
Re: Synchronise Domain
|
Anonymous
Anonymous
Unregistered
|
I have ADSI installed, but no Active Directory so I am limited to the WinNT: provider. Go Brian Go
Michael.
|
Top
|
|
|
|
#86061 - 2002-06-14 04:38 PM
Re: Synchronise Domain
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
Yeah.. I've been looking at DSBIND and DSREPLICASYNC...
But (maybe I'm wrong) I thought I had to use OpenDSObject to use those functions.
So, if that is the case, this is a dead end unless I can get that to work. As for WMI... I didn't see anything related to sychronizing the SAM database... but I'll look again.
Brian
|
Top
|
|
|
|
#86062 - 2002-06-14 04:42 PM
Re: Synchronise Domain
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
Another thing.... does this have to be done "programmatically"? I mean.. it's possible to execute a remote command "NET ACCOUNTS /SYNC".... without all that much work involved.
Brian
|
Top
|
|
|
|
#86063 - 2002-06-14 04:50 PM
Re: Synchronise Domain
|
Anonymous
Anonymous
Unregistered
|
Brian - yes I COULD use RCMD or similar and run NET ACCOUNTS /SYNC on a DC, but where is the fun in that, besides that answer shouldn't be allowed in a COM forum
|
Top
|
|
|
|
#86064 - 2002-06-14 05:03 PM
Re: Synchronise Domain
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
I sure am gettin razzed a lot today for trying to help out!
Brian
|
Top
|
|
|
|
#86066 - 2002-06-14 05:29 PM
Re: Synchronise Domain
|
Anonymous
Anonymous
Unregistered
|
Sorry Brian.
I assume you are doing something like:
code:
$dso = GetObject("WinNT:") $dom = $dso.OpenDSObject("WinNT://@LDOMAIN", "Administrator", "password" , 0)
@ERROR ? @SERROR ?
When I replace the password with something valid I get:
quote:
1 COM exception error "OpenDSObject" (Active Directory - Unspecified error ) [1/1]
hmm, really useful. (I get the same error when password is incorrect as well)
|
Top
|
|
|
|
#86067 - 2002-06-14 05:37 PM
Re: Synchronise Domain
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
Yeah.. that's something like I was doing, however mine was more like:
$obj = GetObject("WinNT:")
$dom = $obj.OpenDSObject("WinNT://@LDOMAIN","administrator","password",&1) I was getting type mismatches for awhile... when I didn't define username and password..then i was getting "IDispatch Pointers not allowed in expression" ... so not sure what I'm doing wrong.
Brian
|
Top
|
|
|
|
Moderator: Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart
|
1 registered
(Allen)
and 466 anonymous users online.
|
|
|