Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

At the current I am using ethernet mac address to generate license for my program, but sometimes there is more than one ethernet card (wireless, modem, etc.). So I would like to use something else: maybe there is an motherboard identificator or something else?!

I need to get this id using Python...

share|improve this question
up vote 1 down vote accepted

Other serial numbers (through dmidecode) seem rather inconsistent to me. On my media centre they pour out but on my desktop I can't see anything.

I would have said if you wanted to do this, you just use eth0. Almost every computer has at least one ethernet port and that will always render a MAC address. There are some problems though:

  • MAC addresses can be changed. Easily.
  • MAC addresses duplicate. Considering half the address is vendor/model ID, lots of vendors only get a few million unique keys and clearly make many millions more devices - so there are duplicates in the wild.
  • Some devices don't have ethernet port, it's disabled, or it's only occasionally on. This is a problem if you try to dynamically change which port you're IDing from. If you start on wlan0 because it's the only one available at the time and then eth0 comes on line the next time you check, you might annoy the customer.

You might do best to take an amalgum of hardware information (motherboard name, processor ID, number of CPUs, graphics name, amount/configuration of RAM etc).

Just make sure you're not stupid about how paying customers go through the re-authentication process. As soon as you make this process harder to work through than just pirating it, you've lost the game. Oh and don't forget you'll need to advertise the fact you're collecting and storing this identifiable up-front, ideally before purchase.

share|improve this answer
And here I thought that the whole point of a MAC address was that it is unique... – James Jan 26 '12 at 13:42

As our Self-Appointed Benevolent Dictator for Life would say: Note to content owners: DRM doesn’t work.

Essentially, there is no reliable way of doing DRM (including the license key technique you are probably using). Instead it might be a much better approach to provide an easy way to buy the product to a reasonable price. This will probably result in a much easier code base for you, an easier distribution process, upgrade process and in the end happier users.

A good example is OSMOS: you can buy the game online, and download it from then on for as many computers, architectures as you need and want. And they have a lot of happy users with this solution.

Another example is the Ubuntu One Music store (which I love) and where it is so easy to buy and sync music that I never again had the feeling that it might be easier to download a song from an illegal source.

share|improve this answer

I think You should ask this question on forum. I'm sure someone there will help You. :)

And how about creating a software key dependent on the hardware configuration? For example:

if one has a nVidia VGA then add to key 'x' if ATI 'y' If har drive is HDD then add 'h'

and so on you could possibly create a quite long letter or number combination that could be used as a key.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.