I need to identify computers uniquely and repeatably, even after a long period and several reboots, without root permissions (can have root on docker).
What I found so far:
- Windows:
wmic csproduct get uuid
orwmic bios get serialnumber
in shell - MacOS:
ioreg -rd1 -c IOPlatformExpertDevice | awk '/IOPlatformUUID/ { print $3; }'
in shell - Linux (Ubuntu):
cat /sys/class/dmi/id/modalias
in shell - Ubuntu on Docker on Linux: the modalias returns the same as on the host, that's great
- Ubuntu on Docker on Mac: ???
- Ubuntu on Docker on Windows: ???
I'm looking for a solution specifically for Ubuntu on Docker on Mac. Things I've tried so far:
from uuid import getnode
is unreliable on both host and container, it gets an ID based on the MAC addressesdmidecode --string system-uuid
fails with/dev/mem: No such file or directory
- the path
/sys/class/dmi
does not exist