Lately I ran into an issue identifying the uniqueness of machines across platforms. Suffice to say, it’s a lot complicate than what I initially thought it would be.
The traditional method of using Mac Address as the computer’s unique identifier isn’t working anymore. Simply, that is because a machine can easily have multiple Mac Address from multiple network adapter. For example, almost all laptops you found on the market all come with one wired and one wireless network adapters The Mac Address quickly changes every time when your computer connects from a wired network to a wireless network. Moreover,it even changes when you are on or off from a VPN connection. Not even mention when you are running on virtual machines. So simply to say, the days using Mac Address as unique identifier to a computer has gone.
Use UUID as the Identifier When You Can
We covered in the past that you can use wmic command to find all the system info from your machine. And we can use the same too here.
wmic csproduct get UUID
That UUID is the best way to ID a machine, it exists in Windows, Mac and many other platforms. It is a 32 characters in length, universally unique identifier. You can run the above wmic command to get it.
But wait, that’s not always the case. Some of motherboard vendors might not include this UUID in their motherboard, which is quite common on those non-OEM machines. In that case, when you use wmic trying to retrieve it you will get all FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF as the ID back.
In Windows, there are couple of alternatives that you can use if UUID idea failed.
The first one is to use your Windows product ID. This is the ID you can retrieve easily from Control Panel > System and Security > System
But that doesn’t always guarantee the uniqueness of the machine. For example, on those Windows volume activated or none genuine Windows machines, the Product ID will always be the same. Also keep in mind that if you re-install Windows, this ID might change as well.
The second option is to use the hard drive’s serial number as the unique identifier. That’s almost the better approach if UUID fails, meaning that you can rely on the HDD’s serial number.
wmic DISKDRIVE get SerialNumber
The above command will do the trick. It even returns all of the numbers if you have multiple hard drives physically connected to your machine.
If you want to ID a machine, the old way of using Mac Address isn’t going to reliable anymore. There are better ways around. We only listed two options here and if you know any others, feel free to share them in the comment below.
- How to Find Out BIOS, Motherboard and CPU info from Command Line
- 4 Ways to Find out What’s The Motherboard Model Inside Your Windows 7 Machine
- How To Change MAC Address on A Network Adapter on Windows 7
- Cookie Cadger to Identify Cookie Leakage from Applications over An Insecure HTTP Request
- How To Tell What Caused A Sleeping Machine to wake?