Page 1 of 2 12>
Topic Options
#104206 - 2003-08-30 11:24 PM hoby - admin.dll doc suggestion listing
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
first:
quote:

UserGetInfo($Server, $Account)
$Server (string) computer on which to add share.
$Account (string) name of share on $Server to share remove.

now, is that mistake?
I want to get userinfo, not remove shares [Wink]
_________________________
!

download KiXnet

Top
#104207 - 2003-08-30 11:28 PM Re: hoby - admin.dll doc suggestion listing
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
what info are you looking for?
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#104208 - 2003-08-30 11:31 PM Re: hoby - admin.dll doc suggestion listing
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
user info.
_________________________
!

download KiXnet

Top
#104209 - 2003-08-31 12:06 AM Re: hoby - admin.dll doc suggestion listing
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
documentation fixed. [Embarrassed]

[ 31. August 2003, 00:07: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#104210 - 2003-08-31 12:10 AM Re: hoby - admin.dll doc suggestion listing
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
btw, was looking at it purely for the remote-user stuff.
saw that it hadn't it.

quess it's rather simple to see who is logged on remotely without api-calls, but would be neat to see who's logged with simple admin-com-call [Wink]

what you think?
_________________________
!

download KiXnet

Top
#104211 - 2003-08-31 12:18 AM Re: hoby - admin.dll doc suggestion listing
Howard Bullock Offline
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 ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#104212 - 2003-08-31 12:23 AM Re: hoby - admin.dll doc suggestion listing
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
only logged on.
to the console.
with NET it seems to show all accounts connected but indeed...
well, someone might want to see all connected but also the connection type needs to be shown then.
_________________________
!

download KiXnet

Top
#104213 - 2003-08-31 01:24 AM Re: hoby - admin.dll doc suggestion listing
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
what comes to the documentation.
it's rather silly to say about the .txt as this hasn't the txt-extension.

also, what are the legal notes?
about redist and using in commercial product etc..
_________________________
!

download KiXnet

Top
#104214 - 2003-08-31 01:34 AM Re: hoby - admin.dll doc suggestion listing
Howard Bullock Offline
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"?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#104215 - 2003-08-31 01:41 AM Re: hoby - admin.dll doc suggestion listing
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
copyright stuff...
like, what are your dll's
if they are kinda freeware, do everyone have permission to freely distrib them and to what extend.
damn, surely you know what tha heck I mean [Wink]

I remember that txt stuff and seen referenced to that stuff lately somewhere else too...
so thought you might wanna update it.
_________________________
!

download KiXnet

Top
#104216 - 2003-09-01 08:21 PM Re: hoby - admin.dll doc suggestion listing
Mordac85 Offline
Fresh Scripter

Registered: 2000-02-16
Posts: 34
Loc: Urbana, OH, USA
First I wanted to say I love the DLL and wish I could've found it much earlier.

I may have missed it but is there a way to distinguish who's logged on to the console on a remote system? I hate to rely on other, roundabout methods, but didn't see any answer to this in the thread.
_________________________
~Glenn

==============================
Deadlines take their toll.
Please have exact change.

Top
#104217 - 2003-09-01 09:11 PM Re: hoby - admin.dll doc suggestion listing
Saleem Offline
Hey THIS is FUN
*

Registered: 2001-04-11
Posts: 280
Loc: UAE
There is a freeware utility to know who is logged on which console NTNAME.EXE

NTname

try it out.

c:\> NTNAME userid (returns)
c:\> wrkstationname
_________________________
“I’ll not change you unless you don’t have intention to change yourself” --H:Quran

Top
#104218 - 2003-09-01 09:48 PM Re: hoby - admin.dll doc suggestion listing
Howard Bullock Offline
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.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#104219 - 2003-09-01 10:01 PM Re: hoby - admin.dll doc suggestion listing
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
There are WMI methods to query the logged on user name but I have better results from NETUSERS from www.systemtools.com
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#104220 - 2003-09-02 08:48 PM Re: hoby - admin.dll doc suggestion listing
Mordac85 Offline
Fresh Scripter

Registered: 2000-02-16
Posts: 34
Loc: Urbana, OH, USA
I know we could use that kind of functionality during preps for AD migrations! We have so many issues w/users logging in before we finished security translations that it would be nice to run a quick check and kick them off. Of course there are other ways to do it, but I haven't had time to crank something out and the other people running the migrations haven't had time either.

NETUSERS works and WMI is slow, but I think this would be faster. If you do get it added, I'll have to run some benchmarks. [Wink]
_________________________
~Glenn

==============================
Deadlines take their toll.
Please have exact change.

Top
#104221 - 2003-09-04 04:41 PM Re: hoby - admin.dll doc suggestion listing
Howard Bullock Offline
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 ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#104222 - 2003-09-04 11:59 PM Re: hoby - admin.dll doc suggestion listing
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Howard,

I tried to send you e-mail from the account you have listed on MSN but couldn't get through.

I have a proggy that automatically generates a helpfile for DLL's and the like. I wanted to float it by you to see what the interest was in further development.

Let me know if there is another e-mail address I can use to send you the CHM I have documented so far.

[ 05. September 2003, 00:00: Message edited by: Chris S. ]

Top
#104223 - 2003-09-05 12:39 AM Re: hoby - admin.dll doc suggestion listing
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
need to try that email little later.
the problems with his site might influence also his e-mail.
_________________________
!

download KiXnet

Top
#104224 - 2003-09-05 12:50 AM Re: hoby - admin.dll doc suggestion listing
Howard Bullock Offline
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.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#104225 - 2003-09-05 12:55 AM Re: hoby - admin.dll doc suggestion listing
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
check my profile for an alternate address.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
Page 1 of 2 12>


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 837 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.072 seconds in which 0.027 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