Generate New Machine-ID on Linux

Laugh all you like at idiot “Microsofty lusers” being globally tracked by the NSA because their GUID is hardcoded inside their TPM, but then you suddenly remember Linux also has /etc/machine-id.

And you can be sure Chrome is reading it and sending it to Google as harmless “user telemetry analytics” so you can be tracked.

Now I should just say at this point that not every Linux distro uses Machine-ID. And also this isn’t just a requirement to avoid tracking. If you wish to setup say a Linux virtual machine as a template (in order to use for automation, for say Kestra based workflows) then resetting the machine-id could be considered as “best  practice.”

To generate a new machine ID, you can run the following commands: remove the existing machine ID files with:

rm -f /etc/machine-id /var/lib/dbus/machine-id and then use dbus-uuidgen --ensure=/etc/machine-id to create a new one

Steps to Generate a New Machine ID

To create a new machine ID on a Linux system, follow these steps:

1. Remove Existing Machine ID Files

First, you need to delete the current machine ID files. Open your terminal and run the following command:

bash
rm -f /etc/machine-id /var/lib/dbus/machine-id

2. Generate a New Machine ID

Next, generate a new machine ID using the dbus-uuidgen command:

bash
dbus-uuidgen --ensure=/etc/machine-id

3. Verify the New Machine ID

To confirm that the new machine ID has been created, you can check the contents of the /etc/machine-id file:

bash
cat /etc/machine-id

Important Notes

  • Ensure that you have the necessary permissions to execute these commands, typically requiring root access.
  • After generating a new machine ID, it is advisable to reboot the system to ensure all services recognize the new ID.

There are risks with changing your machine-id on Linux. Mostly software licence (if applicable). Which may require new licencing due to invalidation.

If you feel this is a risk then maybe a disposable Linux VM maybe a solution, preferably a distribution that is free of systemd slop. There are quite a few now (Alpine, Void-Linux, Chimera-Linux). There is also *BSD of course.

Leave a Reply

Your email address will not be published. Required fields are marked *