Re: Extracting system UUID...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 20.04.10 15:49, Darryl L. Pierce (dpierce@xxxxxxxxxx) 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
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux