• Post Reply Bookmark Topic Watch Topic
  • New Topic

Restrict User to Login from one system at a time  RSS feed

 
Sach King
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In My application I want to implement functionality to let user login from only one system at a time. I am searching for something that can Identify the system uniquely (Like IP address or Mac address ). I am using servlet and I don't know how to access Mac in servelt , If anyone has worked on this type of requirement please help me.
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Sach!

There is no such thing. MAC addresses are only visible if the client machine is on the same LAN segment as the server. Once traffic goes through a router, the MAC address is lost.

IP addresses are also not sufficient. Thanks to NAT, every client machine on the mousetech.com LAN appears to be located at 216.199.14.19.

The only way to reliably restrict the use of a login is to check to see if some one has already logged in using that userID and reject further logins until the first user has logged out.
 
Sach King
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim..
Here are the things I have understood from your reply, Let me know if I am wrong.

MAC we can not use. IPs may be different from the original IP of user's machine and also Many systems can have same IP if they are in same LAN.

Thank you so much for another solution, this will be very helpful.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!