Page 1 of 2 12>
Topic Options
#86049 - 2002-06-13 05:33 PM Synchronise Domain
Anonymous
Unregistered


Anyone know how to programmatically synchronise a domain? (Not ADs)
Top
#86050 - 2002-06-13 08:34 PM Re: Synchronise Domain
BrianTX Offline
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
#86051 - 2002-06-13 09:29 PM Re: Synchronise Domain
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
But it's not COM... this is the COM forum...
No fair... I could have come up with that one too.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#86052 - 2002-06-14 09:52 AM Re: Synchronise Domain
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
#86053 - 2002-06-14 10:27 AM Re: Synchronise Domain
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22302
Loc: OK
com but not ad?
so no ldap objects present...
Shawn????
_________________________
!

download KiXnet

Top
#86054 - 2002-06-14 01:47 PM Re: Synchronise Domain
Howard Bullock Offline
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 ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#86055 - 2002-06-14 02:00 PM Re: Synchronise Domain
BrianTX Offline
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 Offline
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
#86057 - 2002-06-14 04:21 PM Re: Synchronise Domain
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
If I may speak for comjf, I believe he just said he's not running AD and not that he was excluding ADSI.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#86058 - 2002-06-14 04:25 PM Re: Synchronise Domain
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11162
Loc: Boston, MA, USA
I have not yet been able to get OpenDSObject to work either.
_________________________
There are two types of vessels, submarines and targets.

Top
#86059 - 2002-06-14 04:26 PM Re: Synchronise Domain
Anonymous
Unregistered


I have ADSI installed, but no Active Directory so I am limited to the WinNT: provider. Go Brian Go [Smile]

Michael.

Top
#86060 - 2002-06-14 04:32 PM Re: Synchronise Domain
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Ahh, young apprentice, I sense that the force is strong with you. And that you have abided by the the Jedi motto: There is no "try" - there is only do, or not do. But, one must learn to pick their battles with much care - and to engage where one might win. I sense this is a hopeless battle - frought with much danger ... pain ...

rofl ...

Brian, have you checked the domain object in the ADSI SDK (no have) ... but me thinx WMI might be more evolved for this. Like Howard (and you) I searched the "Weeb" too and turned-up nothing (other than the usual lanman stuff) ...

Top
#86061 - 2002-06-14 04:38 PM Re: Synchronise Domain
BrianTX Offline
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 Offline
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
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 [Wink]
Top
#86064 - 2002-06-14 05:03 PM Re: Synchronise Domain
BrianTX Offline
Korg Regular

Registered: 2002-04-01
Posts: 895
I sure am gettin razzed a lot today for trying to help out! [Razz]

Brian

Top
#86065 - 2002-06-14 05:07 PM Re: Synchronise Domain
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
DSREPLICASYNC - good catch - now the trick is to find a SCRIPTABLE version of this, somewhere, and thats usually the mind killer.
Top
#86066 - 2002-06-14 05:29 PM Re: Synchronise Domain
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 Offline
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
#86068 - 2002-06-14 05:41 PM Re: Synchronise Domain
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11162
Loc: Boston, MA, USA
There was something about AdsSecurity.dll to be installed in order to use OpenDSObject but even after registering that DLL both on the PDC and a local workstaion used to run the script I still couldn't get it to work.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 2 12>


Moderator:  Shawn, ShaneEP, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 138 anonymous users online.
Newest Members
Steff, phanhuyen, Jeroen_Ruijter, Tienn, tmvngocdung42
17545 Registered Users

Generated in 0.086 seconds in which 0.058 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org