site_archiver@lists.apple.com Delivered-To: cocoa-dev@lists.apple.com User-agent: Microsoft-Entourage/11.1.0.040913
Message: 1 Date: Thu, 31 Mar 2005 14:57:01 +0200 From: Klaus Wik <k.w.f.wik@usit.uio.no> Subject: Re: Uniquely identify a computer To: Douglas Norton <devlists@2point5fish.com> Cc: cocoa-dev@lists.apple.com Message-ID: <ehmpsxgvuqq.fsf@urk.uio.no> Content-Type: text/plain; charset=us-ascii
We used to make use of the UNIX "hostid" for machine ID purposes, but unfortunately it has not been reliable in Mac OS X -- many machines report a hostid of zero. Others work with older revs of the OS, but not newer ones. The best alternative I have found is to use the MAC address of the on-board ethernet interface that all Macs ship with. An easy way to get at it is: ifconfig en0 | grep ether | awk '{print $2;}' If there is an airport card or other ethernet cards in the machine, they will be at en1, en2... etc, but en0 is always the motherboard ethernet. Craig -- Dr. Craig Hunter NASA Langley Research Center AAAC/Configuration Aerodynamics Branch craig.hunter@nasa.gov (new!!) (757) 864-3020 (Dual G4 - OS X) _______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/site_archiver%40lists.apple... This email sent to site_archiver@lists.apple.com