Solved

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

Posted on 2006-11-09
5
294 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
  • 3
5 Comments
 
LVL 10

Expert Comment

by:victornegri
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks, hope it helped

Steve
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

I have never ceased to be amazed how many problems you can encounter on a fresh install of a Windows operating system.  This is certainly case in point& Unable to complete ANY MSI installation.  This means Windows Updates are failing and I can't …
Numerous times I have been asked this questions that what is it that makes my machine log on so slow, there have been cases where computers took 23 minute exactly after taking password and getting to the desktop. Interesting thing was the fact th…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

762 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

7 Experts available now in Live!

Get 1:1 Help Now