Solved

logging users what computer they login on to a text file

Posted on 2007-03-19
7
186 Views
Last Modified: 2010-04-16
I want to add something in the login batch file that will create a text file by either computer name or username that will tell me when they logged in and who is logged into that computer.  I would like to set it up for each individual user as a text file.

Does anyone know how to do this?
0
Comment
Question by:cknoderer
  • 5
7 Comments
 
LVL 22

Accepted Solution

by:
Bartender_1 earned 400 total points
ID: 18750655
What I've done to accomplish this is add this to the logon script:

echo %username% logged onto %computername% on %date% %time% >> \\<server>\<share>\%username%.txt

Hope this helps!

:o)

Bartender_1
0
 
LVL 22

Expert Comment

by:Bartender_1
ID: 18750688
change the items to match your environment: <server> and <share>
the items using % around them are environment variables and will change, reflecting the users and such into the username's profile.

:o)

Bartender_1
0
 
LVL 22

Expert Comment

by:Bartender_1
ID: 18750701
sorry, that should be "..reflecting the users and such into the usernames's text file."
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 1

Author Comment

by:cknoderer
ID: 18751195
I got it working.  How would you overwrite the file so that the information is more correct?  
0
 
LVL 22

Assisted Solution

by:Bartender_1
Bartender_1 earned 400 total points
ID: 18751308
If you want to overwrite the file, you could change the command to this:
echo %username% logged onto %computername% on %date% %time% >\\<server>\<share>\%username%.txt
0
 
LVL 74

Assisted Solution

by:Jeffrey Kane - TechSoEasy
Jeffrey Kane - TechSoEasy earned 100 total points
ID: 18751768
This data is already collected by your server, and you only need to cull the data in order to review it.  I use a 3rd party application for this, which is free in the SBS Environment. (because it's a Single Domain):
http://manageengine.adventnet.com/products/ad-manager/windows-active-directory-logon-reports.html

There may be other ways, there may be other tools, but this one works and it's free.

Jeff
TechSoEasy
0
 
LVL 22

Expert Comment

by:Bartender_1
ID: 18756961
Thanks for the points.

I'm glad we were able to be of some assistance. If you could spare a few minutes, could you tell me how I would have been able to help you better? (What could I have done to earn an "A" grade, rather than a "B" grade?) This will enable me to better assist others in the future.

:o)

Bartender_1
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now