Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Any script gurus out there?

Status
Not open for further replies.

JGillespie

Instructor
Jul 3, 2001
174
GB
Need a simple script that accepts a network machine name (netbios name) and from that can tell me who is logged onto that workstation.

I know you can find out this information from management tools within NT but a script like this would help me a great deal.

Any thoughts greatly appreciated!!!

Jamie Gillespie
 
Maybe this idea would help..

I'm not sure if you mean that you want this data real-time of what. Your question is very vague..this is probably why no one has responded to it. In the future, provide more details.

One thing you could do is write a script that will simply note the profile folders. Every time a user logs onto the machine, a new profile is created. You could create a script to gather the root names of root folders under C:\Document and Settings

c:CD documents and setting
dir > \\server\share\profile.txt

I would use a kixtart logon script to facilitate this..

-just an idea... Joseph L. Poandl
MCSE 2000

If your company is in need of experts to examine technical problems/solutions, please check out
 
Will try to elaborate some more:

I work in an educational eastablishment with appox 700 workstations. We have a remote control utility that allows us to view (and take control if necessary) any workstation on the network.

When viewing a desktop remotely our utility only tells us the workstation name, it does not tell us who is logged on at that moment. Sometimes we need to very quickly find out which student is logged in at that time (if they are viewing unsuitable material on the internet for example). At present we have to use NT server manager (we have 8 servers that a student could be logged on to) to find which student is logged on. Alternatively we have to take control of their desktop and run a utility on their machine to find out their username, by which time they know we are watching them and they disappear.

So what we need to be able to do is have a script that we can pass a machine name and will return to us the username ofthe student who is CURRENTLY logged in to that station.

Hope this clarifies the situation!!

Jamie Gillespie
 
What is the OS of the client workstations?

Instead of script, would you consider enabling NT AUDITING? This way you could set up, LOGON/LOGOFF auditing on the domain. Every time a users logs on/off, a record would be recorded in the domain eventviewer.

Then, if you know that the user is visiting a porn site or something, you could look to the log (filter by username)and be able to record that they were logged onto the network and browsing material that was inappropriate.

This coupled with the firewall or proxy violation log should be proof enough to address the problem with the end user.

Depending on the OS, might be alternatives..

For example, NBTSTAT:

You can use NBTSTAT -A with IP address to find out who is logged onto the machine...but I'm not sure if this is the BEST option.

C:\>nbtstat -A 10.190.2.12

ISP Connection to the internet:
Node IpAddress: [10.190.2.12] Scope Id: []

NetBIOS Remote Machine Name Table

Name Type Status
-------------------------------------------
RUSH <00> UNIQUE Registered
RUSH <20> UNIQUE Registered
WORKGROUP <00> GROUP Registered
RUSH <03> UNIQUE Registered
WORKGROUP <1E> GROUP Registered
WORKGROUP <1D> UNIQUE Registered
..__MSBROWSE__.<01> GROUP Registered
billybob <03> UNIQUE Registered <---username


-hope some of this helps. Joseph L. Poandl
MCSE 2000

If your company is in need of experts to examine technical problems/solutions, please check out
 
Thanks the nbtstat option will do just what i need. I don't need a very refined solution just a quick one.
Jamie Gillespie
j-gillespie@s-cheshire.ac.uk
 
This should do the job then.. Joseph L. Poandl
MCSE 2000

If your company is in need of experts to examine technical problems/solutions, please check out
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top