Discussion Locked

Active Directory Workstation Logon

0 helpful
11 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Is there a way to track down what workstation or server someone is logged on to? We occasionally get someone who will log on to a workstation or server (a tech) that apparently didn't log out. It's possible it could have been a terminal server logonthat was just disconnected, but I can't be sure.

What happens is that when his password expired, the session that is still open keeps using his old password and his account gets locked out.

I'd like to be able to find out all locations a user is logged into a machine if possible. Thanks!

11 replies

by rabbit_runner

Here is a simple batch file program that will search your network. It is set up for a class c network. You will need to change the IP address to fit your particular environment. The information is put into an excel spreadsheet which can be searched. You could also change the file to a text file and do a search from there as well. Note: This batch file works on an NT network, I do not know about other systems. Copy the information to a text editor and then save it with a .bat extension.-------------------------
set /a ip+=0
set /a inc+=1
set /a stop=256

:start
echo _______________>> c:\ip.xls
echo 192.168.1.%ip% >> c:\ip.xls
nbtstat -A 192.168.1.%ip% >> c:\ip.xls

set /a ip+=%inc%
echo 192.168.1.%ip%
if %ip% LSS %stop% goto start

:end
-------------------
There may be simpler methods, but this works for us. Hope it helps you.

by mm212

Thanks for the assistance. While it isn't exactly what I was looking for, it should help.

by bcbvale

There is a problem with Terminal Services in that if you use the X in the top right corner of the screen to close a session it will not completly log you out. The session will remain active. If you have a time limit that requires accounts to be changed after x number of days it will cause the "stuck" account to become locked out. The cure is to use the START button to disconnect versus the X. You can also use Terminal Services Manager to view who is logged into a machine but it works based on the computer not the user. If you do not have many servers running TS it can be easy to find the problem, but if you have a lot of servers running TS it would be best to find another way.

CV

by mm212

I was aware of this and we have quite a large number of terminal servers. Thanks for trying!

by jwilczyn

For Terminal Services
Go to - Terminal Services Configuration - Connections - RDP-TCP Properties and Sessions.
Make a tik for Override user settings and then change Set Idle sessions limit to e.g. 1 hour.

Good luck

by mm212

This doesn't help me track down where someone is currently logged on, but setting this should help keep the lockouts from occuring in the future.

by joseph moore

I use logon scripts for all of my users, and I have the following line at the top of each script"

now.exe %username% -- %computername% >>\\MYPDC\netlogon\login.txt

I use the Windows Resource Kit tool NOW.EXE (which is an ECHO command with a Date and Time thrown in) to display the machine and the user who just logged into that machine. The NOW.EXE file gives me the date and time they logged in. And with the >> before the file name, all records are appended to the file. So, the LOGON.TXT file looks like this:

Tue Feb 25 16:05:48 2003 -- USSER1-- MACHINE1

Tue Feb 25 17:46:21 2003 -- USER2-- MACHINE2

Tue Feb 25 18:35:50 2003 -- USER3-- MACHINE3

etc.

I have found it to be a nice way of telling who is logging into where.Whenever I have a question, I just open up this TXT file and look! I clear it out ever 6 months, so it doesn't get to large.

Now, the path to the file is in the NETLOGON share on my NT4 PDC, but you could write it to ANY shared folder on any machine you want. The only thing you need to remember is that you need to have loose NTFS security permissions on the folder. The individual user account who is logging in in used to write to the LOGON.TXT file. So, all users in your Windows domain wouldneed Read & Write access to the shared folder you want to store the file at. Just a thought.

hope this helps

by mm212

This would help to keep track of where someone logs on, but it doesn't help in telling me where they are currently logged on. Thanks!

by ewgny

This excellent tool will work fast and easy
nbtscan.exe
http://www.unixwiz.net/tools/nbtscan.html
example
nbtscan 10.1.1.1-254 would scan 10.1.1.1 through
10.1.1.254 and list all computers and who is logged on to them.
This works great as longas NetBios over TCP/IP has not been disabled on the client PC

by mm212

Using this along with the batch file listed above in combination should prove very handy. Thanks.

This discussion is closed to new replies.