Page 1 of 1 1
Topic Options
#33422 - 2002-11-25 04:35 PM where is the user ?
Bruno Offline
Fresh Scripter

Registered: 2001-08-08
Posts: 37
Loc: France (Europe)
Hello,

I want to know which computer a user in logged on.
I was trying "ntname" but it refuse to cross the routers and it display juste one computer in the result list (I'm sure the user have 2 computer open with his account). The network is tcpip and windows nt4.

Thank you.

[ 25. November 2002, 16:48: Message edited by: Bruno ]
_________________________
There is no stupid question. Whoever seeks is never stupid because he will know ...
Bruno

Top
#33423 - 2002-11-25 05:07 PM Re: where is the user ?
Vig Offline
Starting to like KiXtart

Registered: 2001-11-14
Posts: 166
Loc: Saudi Arabia
There's four different ways I've done this... but none of them are scripting.

1. a. At the cmd prompt type net send username "". Replace username with the user you are trying to locate.
b. Regardless of whether you receive an error message or not type "nbtstat -c" at the command prompt.
c. Look for the username and corresponding IP.
d. If you need the computername and not just IP do a ping -a IPaddress.

2. If your using an NT4 Wins server you can search for a username.

3. If you have auditing successful logons enabled you can check the PDC and BDC's security event log.

4. As a last resort you can use a tool such as psloggedon which will connect to each computer in your domain looking to see if the user is logged on there. This is very time consuming and my least favorite.

Top
#33424 - 2002-11-25 05:15 PM Re: where is the user ?
Bruno Offline
Fresh Scripter

Registered: 2001-08-08
Posts: 37
Loc: France (Europe)
Oups !
Netsend don't cross the routers.
psloggedon will take so long time for the lot of computer i have on the domain.
_________________________
There is no stupid question. Whoever seeks is never stupid because he will know ...
Bruno

Top
#33425 - 2002-11-25 05:19 PM Re: where is the user ?
Darren_W Offline
Hey THIS is FUN
*****

Registered: 2001-10-10
Posts: 208
Loc: Bristol, England
Hi,

You could write a script that writes a log of where and who has logged in.

This could be a simple text file or an ini which is updated as the user moves around.

Darren
_________________________
I want to share something with you - the three sentences that will get you through life.
Number 1, 'cover for me.'
Number 2, 'oh, good idea, boss.'
Number 3, 'it was like that when I got here'.

Top
#33426 - 2002-11-25 05:32 PM Re: where is the user ?
Bruno Offline
Fresh Scripter

Registered: 2001-08-08
Posts: 37
Loc: France (Europe)
well it's a possibility... but a user could be connected on different computers in a same time and be log off since the day. The log file will neither update. If I create a new log file each time the user is logon I could'nt see if he is on different computer in the same time.
Not easy ... There's a tool in the ntreskit of w2k call "cconnect" is a way to download it ?
_________________________
There is no stupid question. Whoever seeks is never stupid because he will know ...
Bruno

Top
#33427 - 2002-11-25 05:37 PM Re: where is the user ?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
CCONNECT is a concurrent connection limiter if that is what you want to acheive. It is fairly involved.

If you want to mine from INI files, then the way to do it is to have sections for every @WKSTA and @UserID within each section. Then search for the @UserID.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#33428 - 2002-11-25 05:41 PM Re: where is the user ?
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
I found it is easier to query each PC and return the logged on user name...
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#33429 - 2002-11-26 09:08 AM Re: where is the user ?
Bruno Offline
Fresh Scripter

Registered: 2001-08-08
Posts: 37
Loc: France (Europe)
well...
I will use a log file named by the the user id.
Query the file, get the computers names and check if the user is logged on.

Thank you at all.
_________________________
There is no stupid question. Whoever seeks is never stupid because he will know ...
Bruno

Top
#33430 - 2002-11-26 10:44 AM Re: where is the user ?
Darren_W Offline
Hey THIS is FUN
*****

Registered: 2001-10-10
Posts: 208
Loc: Bristol, England
Hi,

I suppose you could set a scheduled service on the workstations that interrogates who is logged on every 15min (when someone is logged on)and appends to a file?

Darren

[ 26. November 2002, 10:44: Message edited by: Darren ]
_________________________
I want to share something with you - the three sentences that will get you through life.
Number 1, 'cover for me.'
Number 2, 'oh, good idea, boss.'
Number 3, 'it was like that when I got here'.

Top
#33431 - 2002-11-26 02:36 PM Re: where is the user ?
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
actually, use writeprofilestring("filename","loggedon","@wksta","@userid")

and put it in their logonscript.

Then you can open it and search for the username...
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#33432 - 2002-11-26 02:39 PM Re: where is the user ?
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
As I remember, there is a utility that does this from http://www.jsiinc.com and I will have to dig it up when I get into work.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#33433 - 2002-11-26 02:49 PM Re: where is the user ?
Waltz Offline
Seasoned Scripter

Registered: 2002-08-01
Posts: 485
Loc: Waterloo, Ontario, Canada
this would be it --> Loggedon utility from SysInternals
_________________________
We all live in a Yellow Subroutine...

Top
#33434 - 2002-11-27 11:41 AM Re: where is the user ?
Bruno Offline
Fresh Scripter

Registered: 2001-08-08
Posts: 37
Loc: France (Europe)
Hello,
what's I'm doing is:

The genneral login script make a logfile named [@Wksta].txt in a common folder on a server.
In this logfile there is the login name of the user.
Each time a user login the logfile is rewrited.
So I have a lot of files (one for each computer)
This is the logfiles I have since the beginning.(nothing to change)
My new admin script find in each logfile if a user is listed. I get the name of the logfile (it's the computer name). To be sure if the user is already in use I query the registry of this computer (this one only). I put this in a loop to get all the computers the user is logged on (if it's the case). I add also some tests if the username and computer exists of course.
This working well and fast.I query 2 distant networks across the routers.
Thank you, have a nice day.
_________________________
There is no stupid question. Whoever seeks is never stupid because he will know ...
Bruno

Top
Page 1 of 1 1


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

Who's Online
0 registered and 1046 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.063 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

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