From owner-freebsd-questions@FreeBSD.ORG Wed Aug 9 19:30:50 2006 Return-Path: X-Original-To: freebsd-questions@FreeBSD.org Delivered-To: freebsd-questions@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4B7A716A4E2; Wed, 9 Aug 2006 19:30:50 +0000 (UTC) (envelope-from gad@FreeBSD.org) Received: from smtp5.server.rpi.edu (smtp5.server.rpi.edu [128.113.2.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id D8EBE43D6E; Wed, 9 Aug 2006 19:30:45 +0000 (GMT) (envelope-from gad@FreeBSD.org) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp5.server.rpi.edu (8.13.1/8.13.1) with ESMTP id k79JUeaS021537; Wed, 9 Aug 2006 15:30:41 -0400 Mime-Version: 1.0 Message-Id: In-Reply-To: <44D91F02.90107@mawer.org> References: <20060807003815.C7522@ganymede.hub.org> <20060808102819.GB64879@augusta.de> <20060808153921.V7522@ganymede.hub.org> <44D8EC98.8020801@utdallas.edu> <20060808201359.S7522@ganymede.hub.org> <44D91F02.90107@mawer.org> Date: Wed, 9 Aug 2006 15:30:40 -0400 To: Antony Mawer , "Marc G. Fournier" From: Garance A Drosehn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-CanItPRO-Stream: default X-RPI-SA-Score: undef - spam-scanning disabled X-Scanned-By: CanIt (www . canit . ca) Cc: freebsd-questions@FreeBSD.org Subject: Re: BSDstats Project v2.0 ... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Aug 2006 19:30:50 -0000 At 9:32 AM +1000 8/9/06, Antony Mawer wrote: > >What if we improved upon this - if instead of storing >the hostname and IP address, we stored a one-way hash >of this information? OpenSSH in recent versions takes >the same approach with its authorized_keys files... A scattered list of ideas: It might be useful to keep part of the domain-name in plain-text. Just a minimal part, such as '.edu' or '.co.uk'. So that would be one value sent/saved. Then have an MD5 hash of `hostname` (hashing the full hostname, including full domain), or maybe a hash of the output from: hostname ; ifconfig | grep ether Eg: hostname ; ifconfig | grep ether freefour.acs.rpi.edu ether 00:09:5b:01:02:03 ether 00:11:09:09:08:07 (this machine has two ethernet cards in it, and no, those are not the real MAC addresses of the cards... :-) ==> (hostname ; ifconfig | grep ether) | md5 0670be39b40dc52d996e1a6dcee6cca7 Maybe combine that with the partial-domain, to get 0670be39b40dc52d996e1a6dcee6cca7.edu Further, whatever value you decide to use to create a unique value, you could just save that value away in some file under /var/db . If the file does not exist, then create it and store the probably-unique value. That way you can pick some algorithm which should produce a unique result, and not worry if the value of that algorithm might change (on a single machine) over time. You'll only calculate it once, and then keep using that result. -- Garance Alistair Drosehn = drosehn@rpi.edu Senior Systems Programmer or gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA