#61421 - 2001-12-18 01:52 AM
Shawn - Ou function
|
Alex.H
Seasoned Scripter
Registered: 2001-04-10
Posts: 406
Loc: France
|
Shawn, As i rebuild my test server, I've ran your Ou function, and it's not working as is. In fact, The method you use is working when using WinNT:// (with some little tweaks), but not for LDAP:// (better for 9x support) LDAP use a different name context I'm looking on it, but for now i need to sleepOn the other hand, i'm finishing the little gift package 
_________________________
? getobject(Kixtart.org.Signature)
|
|
Top
|
|
|
|
#61423 - 2001-12-18 09:05 PM
Re: Shawn - Ou function
|
Alex.H
Seasoned Scripter
Registered: 2001-04-10
Posts: 406
Loc: France
|
you know what ? : username=CN=Administrator,CN=Users,DC=Reseau,DC=Popov,DC=org (tested on w2k syst)Ok, after changing the admin location (and logoff/logon needed), here's the JACKPOT!!!!! username=CN=Administrator,OU=Permanent Users,OU=Local,DC=Reseau,DC=Popov,DC=org I let you finish this one  for information, the current AD tree is :
code:
Reseau.Popov.org | |--Local (OU) | | | '---Permanent Users (OU) | | | '---Temporary Users (OU) | '--all the stuff, as Users directory
Oh, I've changed my profile, as i'm doing some cleaning and get rid of this old nickname (but i don't want to reinstall 2k server ) [ 18 December 2001: Message edited by: Alex.H ]
_________________________
? getobject(Kixtart.org.Signature)
|
|
Top
|
|
|
|
#61425 - 2001-12-18 10:01 PM
Re: Shawn - Ou function
|
Alex.H
Seasoned Scripter
Registered: 2001-04-10
Posts: 406
Loc: France
|
Well, depends We could add an optional $IsComputerName by default, it's always equal to 0 If different, you got the point.nah, damn smileys Something else: I can't get anything from this : $root=Getobject("LDAP://CN="+"$Variable"+","+GetObject("LDAP://rootDSE").Get("defaultNamingContext")) always return in @serror : "There is no such object on the server.", whatever i put in $variable (existing or not user, complete name or partial) weird! I'm looking in this way as i don't know if AdSystemInfo is 9x compatable (currently looking for) [ 18 December 2001: Message edited by: Alex.H ]
_________________________
? getobject(Kixtart.org.Signature)
|
|
Top
|
|
|
|
#61427 - 2001-12-18 10:45 PM
Re: Shawn - Ou function
|
Alex.H
Seasoned Scripter
Registered: 2001-04-10
Posts: 406
Loc: France
|
I search a little and found it, but in fact it's comming from Exchange Server (version with LDAP support). And yes, it's always hidden is some dark area.I've found this in the 9x file : nwapi32.dll, ntdsapi.dll Seems the NT only NW:// and NTDS:// are also available under 9x And after looking in BDR, HKClassRoot\AdSystemInfo is bind to this file : adsldp.dll and yes, it's available in the 9x client part I'm finishing something and i'll reboot to 98 to play with the AD client, [ 18 December 2001: Message edited by: Alex.H ]
_________________________
? getobject(Kixtart.org.Signature)
|
|
Top
|
|
|
|
#61428 - 2001-12-19 12:58 AM
Re: Shawn - Ou function
|
Alex.H
Seasoned Scripter
Registered: 2001-04-10
Posts: 406
Loc: France
|
Finished playing sometimes, i want to take a gun with "Dedicated to Micro$oft" written on it as you guess, it's NOT WORKING for 9x system  If you have the method for NT4 system, i'll take it, as createobject("adsysteminfo") is working, but no more the problem is to retreive returned object properties, as username return ""Edit Shawn, nothing to do with the current thread, but you should get a look here http://winservices.web.cern.ch/winservices/docs/ActiveDirectory/ /edit [ 19 December 2001: Message edited by: Alex.H ]
_________________________
? getobject(Kixtart.org.Signature)
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 1110 anonymous users online.
|
|
|