From: Lennart Poettering <lennart@poettering.net>
To: linux-hotplug@vger.kernel.org
Subject: Re: Extracting system UUID...
Date: Tue, 20 Apr 2010 20:16:55 +0000 [thread overview]
Message-ID: <20100420201655.GA23009@tango.0pointer.de> (raw)
In-Reply-To: <20100420185205.GA5138@mcpierce-desktop.usersys.redhat.com>
On Tue, 20.04.10 15:49, Darryl L. Pierce (dpierce@redhat.com) wrote:
> On Tue, Apr 20, 2010 at 12:39:13PM -0700, Greg KH wrote:
> > Ah, as Lennart just pointed out, you really don't want to use that, it
> > can't be trusted on a lot of platforms. Unless you don't mind having
> > the same value for lots of different machines :)
> >
> > What do you want to use this value for?
>
> It's going to be used to persistently and uniquely identify systems in a
> network. The hostname can't be used since it's possible for a system to
> come up with a different hostname within DHCP.
You really should use the D-Bus machine ID for stuff like this (as
mentioned). In fact, it was invented just for use cases like that. It is
reliably available everywhere, accessible without libdbus, has clearly
defined semantics and actually identifies the installation (in contrast
to the machine), which more often than not is the actual thing you want
to identify (especially in a VM environment, where multiple VMs might
end up with the same UUID otherwise if you really read it from the hw,
since after all you run multiple VMs on the same physical hw).
See the man page for more information about the D-Bus machine id:
http://linux.die.net/man/1/dbus-uuidgen
Lennart
--
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
prev parent reply other threads:[~2010-04-20 20:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-20 18:52 Extracting system UUID Darryl L. Pierce
2010-04-20 19:10 ` Lennart Poettering
2010-04-20 19:11 ` Greg KH
2010-04-20 19:30 ` Darryl L. Pierce
2010-04-20 19:39 ` Greg KH
2010-04-20 19:49 ` Darryl L. Pierce
2010-04-20 20:11 ` Greg KH
2010-04-20 20:16 ` Lennart Poettering [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100420201655.GA23009@tango.0pointer.de \
--to=lennart@poettering.net \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).