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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting A List Of Inactive NT Accounts.

Status
Not open for further replies.

LeeSalter

Technical User
Nov 1, 2001
20
GB
Please can somebody tell me if there is a way in VB or API to get the date that an NT account was last accessed. I need to create a list of accounts that have not been used for the last 30 or so days.

I already have used the NetSessionEnum API to test for whether or not a user is logged onto the network and onto which client they are logged on to. Does this API cater for a LastLogin flag??

Any help would be brill....thanks in advance.
 
Login should make a log ion the event logs, those might help. I know it's short of $.02 but better than nothing... MaybeX-)?

Wil Mead
wmead@optonline.net

 
Thanks. But I need to query the data in VB or API, I did manage to get a promising API (NetGetUserInfo) but when it began to read the LastLogin flag on a user ID, Dr Watson decided to pay me a visit!!! :(

Anybody know a way round this Access Violation error??
 
Yup, NetGetUserInfo is the one to go for, with a USER_INF0_3 structure.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top