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!

How to find out the first login time for users

Status
Not open for further replies.

Sina

Technical User
Jan 2, 2001
309
CA
Hi all,

Using win32 modules on perl, How can I find out the very first time the users login to the server (nt domain) in the morning?

Thank you
 
Is there a log file that you can look it up in (wherever NT logs stuff)?
"If you think you're too small to make a difference, try spending a night in a closed tent with a mosquito."
 
Hi stillflame,

Not sure about any logfiles in place. But managment wants to know what is the time users login to the system?

Not sure how to go about it?

the systems are NT workstations and users login to an nt server 4.0.

Any Idea?
 
There is an event log on NT that I think can
log all login/logout events. I have done something
similar getting RAS connection times out of
the event log. There is an event viewer on NT
that will let you look at the event log to check
that logins are being logged.

If logins are not being logged I am fairly sure
you can start logging them using some server
administration program (sorry this is vague, but
I don't have NT or docs here)

The Win32::EventLog module provides an interface
to the NT event log. It comes with the ActiveState
version, or you could grab it from CPAN.
 
I know linux servers can easily be set to log information exactly like that on their own. Try asking the NT forum here for the procedure for doing so with it. Once the system is logging those things, it'll be a sinch to regexp out the users and times for html viewing or what suits your fancy. Sorry i'm not NT savvy, but i'm sure someone, somewhere is.
If there isn't an already set up system in place (which there really should be), you could create a perl script that runs everytime automatically when any user logs on that would append their username and the time to a file.
Hope this helps.
:-Q "If you think you're too small to make a difference, try spending a night in a closed tent with a mosquito."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top