Page 1 of 1

user name on windows 2000

Posted: Thu May 27, 2004 7:10 am
by pelegk2
how do i get the user name that the user have logged with on windopws 2000?
iknow it possible to retriview it with asp with server variables!
how can i do it in php?
thnaks in advance
peleg

Posted: Thu May 27, 2004 7:30 am
by dave420
The username of the remote person? I do this on our corporate network using http://www.sysinternals.com 's psloggedon, part of the pstools suite. The suite is cool, as it can tell you lots of info about the remote computer (and I mean LOTS). It's 100% command-line-based, so it fits into PHP really well.

To get the remote user, I just run "psloggedon -l \\".$_SERVER["REMOTE_ADDR"] and grep the output.

Posted: Fri May 28, 2004 12:52 am
by pelegk2
ok i will check it thanks alot:)