CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2008
    Posts
    10

    Prevent multiple user login from one machine

    Hi All,

    I have two user id and i want to access a website with both the user id from one machine. This i can achieve with two different browsers say IE and Mozilla.

    Is there any way to restrict this, i mean there should be one user for one system only.

    Thanks,
    Binayak

  2. #2
    Join Date
    Jul 2008
    Posts
    5

    Cool Re: Prevent multiple user login from one machine

    you'd better use remote ip address!
    if two broswers have the same ip addres,this means the same machine!

  3. #3
    Join Date
    Jul 2005
    Location
    Currently in Mexico City
    Posts
    568

    Re: Prevent multiple user login from one machine

    Depending on what do you want exactly to do:

    If you want to block both users if one enters globally just use an extra field in your database and change it when a user enters and set back the value when it exits or session dies.

    If you're talking about just one machine so you could access the system from some other computer simultaneously while blocking both users on your comp - there is no secure method to do this. Depending on some specific cases (closed LAN for ex.) you could detect ip and block users as described above for each ip separatelly.
    Wanna install linux on a vacuum cleaner. Could anyone tell me which distro sucks better?

    I had a nightmare last night. I was dreaming that I’m 64-bit and my blanket is 32-bit and I couldn’t cover myself with it, so I’ve spent the whole night freezing. And in the morning I find that my blanket just had fallen off the bed. =S (from: bash.org.ru)

    //always looking for job opportunities in AU/NZ/US/CA/Europe :P
    willCodeForFood(Arrays.asList("Java","PHP","C++","bash","Assembler","XML","XHTML","CSS","JS","PL/SQL"));

    USE [code] TAGS! Read this FAQ if you are new here. If this post was helpful, please rate it!

  4. #4
    Join Date
    Jun 2008
    Posts
    10

    Re: Prevent multiple user login from one machine

    In case of gateway there will be multiple user with same ip with NAT then how u will check the IP address in this case the IP will be same for the users even though they are using different machines.

    thanks

  5. #5
    Join Date
    Jul 2005
    Location
    Currently in Mexico City
    Posts
    568

    Re: Prevent multiple user login from one machine

    The only way to be able to build your system depending on user ip is inside a LAN where all users are connected through one gateway and your system located on one of computers inside this network. You would be filtering by local ips then. Could use MAC address as well. Outside of this there is no way to do it: ppl use proxies, virtual ips, dynamic ips, etc. Actually there is no way to know user's ip for sure at the moment the user connects to your system, not always at least. And what you want is even more static.

    The first question you post is not very clear of what exactly do you want.
    Please let me know about the whole idea of how you want your system to behave, what type of system is that, what do you want to block, how would you like to manage user access, etc. We may offer some solutions then...
    Last edited by Xeel; August 1st, 2008 at 11:38 AM.
    Wanna install linux on a vacuum cleaner. Could anyone tell me which distro sucks better?

    I had a nightmare last night. I was dreaming that I’m 64-bit and my blanket is 32-bit and I couldn’t cover myself with it, so I’ve spent the whole night freezing. And in the morning I find that my blanket just had fallen off the bed. =S (from: bash.org.ru)

    //always looking for job opportunities in AU/NZ/US/CA/Europe :P
    willCodeForFood(Arrays.asList("Java","PHP","C++","bash","Assembler","XML","XHTML","CSS","JS","PL/SQL"));

    USE [code] TAGS! Read this FAQ if you are new here. If this post was helpful, please rate it!

  6. #6
    Join Date
    Jun 2008
    Posts
    10

    Re: Prevent multiple user login from one machine

    Hi,

    actually i am running a game server where different user will play online games.

    problem is that some user having more then one user id are playing with themselves.
    for example i am having two user id AAA and BBB and i will login to the server through two different browsers from my PC and i will play with myself that is AAA will play with BBB and the winner may be AAA or BBB, but it is me only.

    When there are let us say 32 players playing and i am playing with 3 different user id from my PC, then there are actually 30 players playing.

    So i want to restrict that user to be able to login with his different ids from the same PC.

    He can login to the server through three different machine with his different ids, there is no issue with this.

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured