0

What parameters can I retrieve to generate a globally static unique id of system under non-root?

Can I use date of install in /var/log/wtmp file(last | tail) or it is unstable?

Can I use for it result of ls /dev/disk/by-uuid/?

I don't believe that MAC addresses are unique.

nyaapa
  • 95
  • 7

1 Answers1

0

uuidgen

It's usually found in /usr/bin/

nyancat ~ # uuidgen
488bc393-a4f5-4a83-8df8-8c15e737dcc5
nyancat ~ #
Deestan
  • 16,738
  • 4
  • 32
  • 48
  • [nyaapa@nyaapa-nb-nx ~]$ uuidgen fe2eee97-502a-4706-b2ad-ff1608ba7b35 [nyaapa@nyaapa-nb-nx ~]$ uuidgen 8f270ae0-9e22-472d-93e3-d5883f24397c unstable – nyaapa Feb 23 '12 at 10:09
  • Yes, the "unstability" is what guarantees the uniqueness. You will have to store it in a file somewhere. – Deestan Feb 23 '12 at 10:34
  • What you seem to want is a unique hash for the system. That's impossible unless you define which components are the "system". If you see the system as the CPU, HDD, Motherboard, RAM, then you will by definition get a *different* system when you upgrade the RAM or change the HDD. – Deestan Feb 23 '12 at 10:37
  • it's ok, i'd like to use HDD/Motherboard/CPU sn and pn, but i don't know how to get them. – nyaapa Feb 23 '12 at 10:55
  • I see! I suggest you open a new question asking specifically about how to access HDD, motherboard and CPU serial numbers. If you have them, then you can apply a cryptographic 128-bit hash over all the values to get a unique system id. – Deestan Feb 23 '12 at 11:17