0

I am trying to identify computers with a unique code based on their machine. However, I can't find any way to do this. I've tried to use mac addresses, but you can only the server's mac address when you're using a linux server. I would use the clients ip address, but it can change if they're using a proxy or vpn, or even if they just unplug their router for a bit. Can anyone recommend something that would be good for this?

Thanks.

Josh
  • 29
  • 3
  • on Windows you can easily get the hard-disk (Volume)'s serial number through command line "wmic diskdrive get serialnumber" - I suppose it can be done with Linux as well – Stavm Mar 12 '17 at 19:01
  • @Stavm — The question is tagged [tag:web] and there's no way to do that through the browser. – Quentin Mar 12 '17 at 19:03
  • 2
    Possible duplicate of [How do I uniquely identify computers visiting my web site?](http://stackoverflow.com/questions/216542/how-do-i-uniquely-identify-computers-visiting-my-web-site) – Quentin Mar 12 '17 at 19:03
  • @Quentin I've viewed that one too, but I couldn't find anything useful. – Josh Mar 12 '17 at 19:06
  • @Josh — That doesn't mean it isn't a duplicate question. – Quentin Mar 12 '17 at 19:07

1 Answers1

-1

There is no secure way to uniquely identify computers based on hardware, and why should you? The better practice would be to use an artificial key.

If you want to identify a person - you give it an ID (passport, driving license...), do the same here: Use the session (apache generates automatically a session ID), or generate a UUID (there are many ways to do this). Or if you need to go beyond - use ssh key pairs, save them somewhere on the PC.

Now to the problem: 1. A client could lie about his hardware, his mac address, VIN/PID, serial number of the SATA cable. You can (and must) never trust such info! 2. Clients hardware could change, and then?