Re: Uniquely identify a computer
Re: Uniquely identify a computer
- Subject: Re: Uniquely identify a computer
- From: Klaus Wik <email@hidden>
- Date: Thu, 31 Mar 2005 14:57:01 +0200
Douglas Norton <email@hidden> writes:
> Klaus,
>
>> I was browsing through old todo notes and found one on how I should
>> identify a computer no matter if it was reinstalled or got a new name.
>>
>> Using system_profiler you get a Serial Number entry.
>>
>> What I haven't been able to find out is how does system_profiler find
>> that? As far as I can see, there is no sysctl entry for this...
>>
>> Anyone know how to get this info?
>>
>
> Why do you want this information ?
>
> I know this is answering a question with a question but experience
> shows that knowing this will help concentrate the inevitable ensuing
> discussion.
We have 700 macs at the University of Oslo for which my department has
the task of surveilance, patching and such. However it is not our
department that owns them. There are about 20 institutes that handle
them, pass them around their employees and do the day to day
management.
When a computer is (re)installed it has to be 'assimilated into the
collective' so to speak, which means we register it, place some files
in /var/root/ , run some daily and hourly cron jobs on it and log
everything to a dedicated loghost. of course there is a financial
aspect as well.
So we need to be able to identify any computer being registered,
making sure it isn't registered twice. While two computers registered
means more money for my department it also means we have one
responsive and one irresponsive client.
We can create this machine unique ID out on the fly the first time its
registered and store a file in /etc/something/ but format the disk and
its gone.
If each machine now has a serial number in (P)ROM or similar
(according to a 1998 technote Lisa was the only one to have one
before) it's a relatively tamper free way of making sure which
computer this is.
We could run system_profiler | awk '/Serial Number: / {print $3}' but
that takes a while and even crashes for some old G4 with flaky modems.
As I haven't found any sysctl hw.serialnumber, I'm now looking for a
simple function call and make a small command to print that
information to stdout. I tried looking for a helper tool or function
by ktracing system_profiler but didnt find any.
I hope that answers the technical, if not the moral 'why'.
--
Klaus Wik
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden