Solved

find out who logged in last to a windows server then generate back drop with the details

Posted on 2006-11-09
5
300 Views
Last Modified: 2010-08-05
Is there a any freeware program that when i log into a server it tells me
what server i am on
IP address
login time
The last person to login

Then generate the backdrop

i was looking at whoiam which does most things but doesn't tell me who logged in last.
0
Comment
Question by:KK1762
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 10

Expert Comment

by:victornegri
ID: 17907662
Don't think y ou can get last logged on user from anything since once you log on,  you will overwrite the reg key that held that information  (HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultUserName).

You can generate the background pic using this utility for all the other things you wanted: http://www.microsoft.com/technet/sysinternals/Miscellaneous/BgInfo.mspx
0
 
LVL 43

Accepted Solution

by:
Steve Knight earned 500 total points
ID: 17909079
bginfo is good stuff.  I assume you are after the user before you.  You could look in the profiles directory and pull out the second last one used with a batch file:

@echo off
pushd %userprofile%
cd ..
for /f "skip=1 tokens=1,2,3,*" %%a in ('dir /o-d ^| find "DIR"') do set lastuser=%%d & set lastdate=%%a & set lasttime=%%b & goto end
:end
echo Last user was %lastuser% logged off at %lasttime% on %lastdate%
popd

As to what you want to do with that then.... perhaps bginfo could look at the environment string %lastuser% as one of it's display fields and you could set the script to run as part of your login process to fill the environment variable?
0
 
LVL 48

Expert Comment

by:Jay_Jay70
ID: 17909782
just reading over that, what an awesome bit of work from the two of you......Well done, thats why EE is awesome to be a part of
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 17910378
Cheers, I like scripting as you may have guessed :-)  Lets hope the asker with 3 deletions out 8 questions, several of which were forced accepts and a dodgy choice of answer on the other and grades A B C B thinks so too!

KK1762: You may want to read the help here:  http://www.experts-exchange.com/help.jsp#hs5 for how to deal with questions here best and get the most out of EE.

thanks

Steve
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 17930750
Thanks, hope it helped

Steve
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Organizations create, modify, and maintain huge amounts of data to help their businesses earn money and generally function.  Typically every network user within an organization has a bit of disk space to store in process items and personal files.   …
Learn about cloud computing and its benefits for small business owners.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

636 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