Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2006-11-09
5
Medium Priority
?
302 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 2000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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.   …
This may not be a text book method to resolve VSS backup issues but it seemed to have worked on few of the Windows 2003 servers we had issues while performing a Volume Shadow Copy backup. If you have issues while performing a shadow copy backup usin…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

670 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