Solved

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

Posted on 2006-11-09
5
295 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
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

by Batuhan Cetin Within the dynamic life of an IT administrator, we hold many information in our minds like user names, passwords, IDs, phone numbers, incomes, service tags, bills and the order from our wives to buy milk when coming back to home.…
Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

947 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

22 Experts available now in Live!

Get 1:1 Help Now