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

Obtain Net User Logged-on From Computer Name

Status
Not open for further replies.

hcash

IS-IT--Management
Oct 17, 2002
4
0
0
US
I obtain a list of users and computer names from the .LDB file of a Jet (Access) database. All of the users log on as "Admin." However, the computer names are unique. I want to get detailed user info using GetUserNetworkInfo from the Net API.

Is it possible to find out what user is actually logged onto each computer name?

If so, how do you suggest that I do this?
 
When people open your database, write to a table that you can query using some code, that inserts their NTlogin. Query the last updated row for the details. When they log out youd probably mark this recoird inactive. But what happens if access crashed (as it does - a lot!)?? The ldb file is not reliable enough to query....

API call NetGetUserInfo will help a lot!

 
If you have the computer name you can get the Current user of that workstation via the dos command "nbtstat -a Hostname"


Everybody body is somebodys Nutter.
 
I found a tool named LDB Viewer at this URL, I adapted the code to my situation and added a feature to the "fIsJet4DB" function and to the "sUseUserRoster" procedure to accommodate a password protected database. I have several applications in VB that have Jet database as the back-end.

The application is freeware. So, I'm not going to list the code here because anyone may download it without restraint from the site, above, for their own use.

Thanks to you all for your kind assistance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top