#104207 - 2003-08-30 11:28 PM
Re: hoby - admin.dll doc suggestion listing
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
what info are you looking for?
|
|
Top
|
|
|
|
#104209 - 2003-08-31 12:06 AM
Re: hoby - admin.dll doc suggestion listing
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
documentation fixed. ![[Embarrassed]](images/icons/blush.gif) [ 31. August 2003, 00:07: Message edited by: Howard Bullock ]
|
|
Top
|
|
|
|
#104211 - 2003-08-31 12:18 AM
Re: hoby - admin.dll doc suggestion listing
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
so you want to query a remote computer for ALL accounts that are logged on and/or remotely connected? [ 31. August 2003, 00:18: Message edited by: Howard Bullock ]
|
|
Top
|
|
|
|
#104214 - 2003-08-31 01:34 AM
Re: hoby - admin.dll doc suggestion listing
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
I used to have the ".txt" extensions until my new FrontPage would FTP them as ASCII and corrupt the files. I have yet to revise the rest of the pages to make them consistent.
What are you referring to "what are the legal notes"?
|
|
Top
|
|
|
|
#104218 - 2003-09-01 09:48 PM
Re: hoby - admin.dll doc suggestion listing
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
If I am correct, NTNAME most likely queries WINs for the username<03> entry and returns the computername<03> or <00> for the same IP address. This may work but I would not depend it.
The best way to determine who is logged is to check the HKEY_USERS registry hive on the remote computer and resolve the Sid to a user account. The problem with the SidToName() function in that it can only resolve Sids from perspective of the computer executing the command looking at trusted SAM databases. Therefore, it will fail on a local computer account if it is logged on because the Sid resides in the remote computer SAM database.
See my description of the process and code at: http://mywebpages.comcast.net/habullock/kix_solutions.htm
If you need to resolve local sids then I will need to augment Win32Admin.dll so that it can resolve remote and local sids. This is something I have wanted to add for some time. It would enable you to have the remote computer resolve the Sids and would return Domain\account.
Let me know how many would like that ability.
|
|
Top
|
|
|
|
#104221 - 2003-09-04 04:41 PM
Re: hoby - admin.dll doc suggestion listing
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Mordac85, I have been updating the DLL and have changed the way some methods return data. I no longer use the interleaved arrays. Instead I return an array of objects (dictionary objects in VBS) where you can specify which property value you want.
I have also implemented LsaLookupSids that can resolve sids from the perspective of a remote computer. code:
$Win32Admin = createobject("Win32Admin") if vartypename($Win32Admin) <> "Object" ? "@serror" endif
$Version = $Win32Admin.Version if @error <> 0 ? "@serror" endif ? "DLL Version = " + $Version ? ; Method LsaLookupSids($Server, $sids) ; Returns an array of dictionary objects ; One or more text sids can be input into the method. Separate sids with 'white ; space'. ; ComputerName must be NT4 or higher. $sids = "S-1-5-21-24129212-1235812195-1543859470-1416 S-1-5-21-24129212-1235812195-1543859470-500" $Info = $Win32Admin.LsaLookupSids ("computername", $sids) if @error = 0 for each $item in $Info $keys = $item.keys ? "keys: @error @serror" for each $key in $keys $Value = $item.get($key) ? $key + " = " + $Value next ? next else ? "Error: @error @serror" endif
yields: quote: DLL Version = 2.0.1.0
keys: 0 The operation completed successfully. use = 1 domain = AMP domainsid = S-1-5-21-24129212-1235812195-1543859470 name = userHAB
keys: 0 The operation completed successfully. use = 1 domain = AMP domainsid = S-1-5-21-24129212-1235812195-1543859470 name = administrator
If you are interested in doing some prelimary testing, send me an email and I will email you the DLL and some code. My ISP is having some problems at the moment and the web site is not useable. [ 04. September 2003, 16:48: Message edited by: Howard Bullock ]
|
|
Top
|
|
|
|
#104224 - 2003-09-05 12:50 AM
Re: hoby - admin.dll doc suggestion listing
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
I have received email at habullock@comcast.net today. I would be interested in looking at your program.
|
|
Top
|
|
|
|
#104225 - 2003-09-05 12:55 AM
Re: hoby - admin.dll doc suggestion listing
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
check my profile for an alternate address.
|
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 1077 anonymous users online.
|
|
|