Get Remote Computer Username


Sorry if this is a bit long winded...

I am writing a forum for a comprehensive school.
But a few pupils will probably try to abuse it.

I want to make it posible to ban certain pupils from posting.
But, it would take too long to go through and manualy add each pupil to the database every year when new pupils come up from primary school. But if they are allowed to signup then we will never know who is who because they wont use their school username.

Although we will be able to ban them, they could just sign up again. and we wouldnt be able to speak to them about it because we wouldn't know who it was.

So, I want to know if it is possible, and if so, how to get the username that they used to log into the computer. I.e. the windows username that they are using.

Thanks in advance
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


Hmm this makes me think about "The Identification Protocol", heavily used on IRC chat networks and unix, but I could never see a server implementation for windows. But I bet there is a loadable service for windows NT/2000/XP.

From a quick search the following PHP implementation of RFC 413 came up this:

so assuming it is well coded, you only need the windows daemon. This is the first result i've got:

but unfortunately it's for old win95-based windows.

Could you not get the username from Netbios? Not sure if that will be construed as hacking, but I know client-side scripts which get username are definetly considered hacking in EE's policy. The username of the currenlty logged in Windows users is suppose to be kept secret, information disclosure of such sort could lead to attacks against the user.

Marcus BointonCommented:
I don't think you can get that info - it's protected - exposing the username would represent a fair security risk. See here:

I'd suggest that you allow sign-ups, but make them require approval, and authenticate them by something unique to each pupil, like their mobile phone number or their login name), and only allow one username per identifier (so they can't share accounts of existing users).

OTOH, because it is a closed system, you may be able to co-ordinate with your local directory server to find out which login an IP is associated with, and similarly, you might be able to give your forum sufficient privileges to find out the local login name through Javascript or ActiveX component. Alternatively, make your login/password request page a Windows HTA, signed appropriately, which can give you much higher security clearance. Read more about them here:
mms_masterAuthor Commented:
Me and a friend come accross an object which is used for RM's status reporter on comunity connect 3.

This object can be used to get the windows username for the person that is currently logged in (using VBscript). Then a form is automatically submitted by javascript, which passes the username on to php.
Closed, 50 points refunded.
Community Support Moderator (Graveyard shift)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.