Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is it possible to generate a unique ID based on server hardware/OS? I want to generate license keys for my PHP web app based on customer server, just like Atlassian JIRA does.

Thanks for your help.

share|improve this question
2  
I think your licensing model is Ass. Just sayin' –  Tom O'Connor Mar 17 '12 at 10:43
add comment

1 Answer

I don't know the final solution but if it's Linux I think you can use lshw tool to read serial numbers of disks, processor, motherboard and other hardware devices and make hash (checksum) from combination of these info.

share|improve this answer
    
And then someone who wants to get around your licence check puts in a customised version of lvhw that returns whatever values are necessary to pass the key check. –  womble Mar 17 '12 at 9:19
    
@womble - this is my checksum (You don't know how i made it), "09a366cc2ef30136d84804239d9b2875b68fd368", tell me what lshw should return... –  jamzed Mar 17 '12 at 9:26
1  
I rather think you miss womble's point, which is that once you've cut one legitimate license for a given lshw output, that license can be used on any number of other machines by suborning their lshw system calls. The same trick applies to using MAC addresses. –  MadHatter Mar 17 '12 at 9:31
    
lshw is only one part of the solution... I thought about something like that en.wikipedia.org/wiki/Windows_Genuine_Advantage#Data_collected –  jamzed Mar 17 '12 at 9:39
1  
Jamzed, in a closed-source operating system like Windows you can do that, and given trusted hardware, you can even rely on it. In a free operating system like Linux, you can't; free software is about doing what the platform owner wants, not what the software vendor wants, and it's usually quite good at it. –  MadHatter Mar 17 '12 at 11:09
show 1 more comment

Your Answer

 
discard

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.