<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.jayscafe.net/index.php?action=history&amp;feed=atom&amp;title=Change_Machine-ID</id>
	<title>Change Machine-ID - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.jayscafe.net/index.php?action=history&amp;feed=atom&amp;title=Change_Machine-ID"/>
	<link rel="alternate" type="text/html" href="https://wiki.jayscafe.net/index.php?title=Change_Machine-ID&amp;action=history"/>
	<updated>2026-04-08T12:37:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.2</generator>
	<entry>
		<id>https://wiki.jayscafe.net/index.php?title=Change_Machine-ID&amp;diff=595&amp;oldid=prev</id>
		<title>Jayctheriot: Created page with &quot;Snipped from: https://unix.stackexchange.com/questions/402999/is-it-ok-to-change-etc-machine-id  Although &lt;code&gt;systemd-machine-id-setup&lt;/code&gt; and &lt;code&gt;systemd-firstboot&lt;/code&gt; are great for systems using systemd, &lt;code&gt;/etc/machine-id&lt;/code&gt; is not a systemd file, despite the tag. It is also used on systems that do not use systemd. So as an alternative, you can use the &lt;code&gt;dbus-uuidgen&lt;/code&gt; tool:  &lt;code&gt;rm -f /etc/machine-id&lt;/code&gt; and then  &lt;code&gt;dbus-uuidgen --e...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.jayscafe.net/index.php?title=Change_Machine-ID&amp;diff=595&amp;oldid=prev"/>
		<updated>2025-05-05T12:11:42Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Snipped from: https://unix.stackexchange.com/questions/402999/is-it-ok-to-change-etc-machine-id  Although &amp;lt;code&amp;gt;systemd-machine-id-setup&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;systemd-firstboot&amp;lt;/code&amp;gt; are great for systems using systemd, &amp;lt;code&amp;gt;/etc/machine-id&amp;lt;/code&amp;gt; is not a systemd file, despite the tag. It is also used on systems that do not use systemd. So as an alternative, you can use the &amp;lt;code&amp;gt;dbus-uuidgen&amp;lt;/code&amp;gt; tool:  &amp;lt;code&amp;gt;rm -f /etc/machine-id&amp;lt;/code&amp;gt; and then  &amp;lt;code&amp;gt;dbus-uuidgen --e...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Snipped from: https://unix.stackexchange.com/questions/402999/is-it-ok-to-change-etc-machine-id&lt;br /&gt;
&lt;br /&gt;
Although &amp;lt;code&amp;gt;systemd-machine-id-setup&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;systemd-firstboot&amp;lt;/code&amp;gt; are great for systems using systemd, &amp;lt;code&amp;gt;/etc/machine-id&amp;lt;/code&amp;gt; is not a systemd file, despite the tag. It is also used on systems that do not use systemd. So as an alternative, you can use the &amp;lt;code&amp;gt;dbus-uuidgen&amp;lt;/code&amp;gt; tool:&lt;br /&gt;
 &amp;lt;code&amp;gt;rm -f /etc/machine-id&amp;lt;/code&amp;gt;&lt;br /&gt;
and then&lt;br /&gt;
 &amp;lt;code&amp;gt;dbus-uuidgen --ensure=/etc/machine-id&amp;lt;/code&amp;gt;&lt;br /&gt;
As mentioned by Stephen Kitt, Debian systems may have both a &amp;lt;code&amp;gt;/etc/machine-id&amp;lt;/code&amp;gt; and a &amp;lt;code&amp;gt;/var/lib/dbus/machine-id&amp;lt;/code&amp;gt; file. If both exist as regular files, their contents should match, so there, also remove &amp;lt;code&amp;gt;/var/lib/dbus/machine-id&amp;lt;/code&amp;gt;:&lt;br /&gt;
 &amp;lt;code&amp;gt;rm /var/lib/dbus/machine-id&amp;lt;/code&amp;gt;&lt;br /&gt;
and re-create it:&lt;br /&gt;
 &amp;lt;code&amp;gt;dbus-uuidgen --ensure&amp;lt;/code&amp;gt;&lt;br /&gt;
This last command implicitly uses &amp;lt;code&amp;gt;/var/lib/dbus/machine-id&amp;lt;/code&amp;gt; as the file name and will copy the machine ID from the already-newly-generated &amp;lt;code&amp;gt;/etc/machine-id&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;dbus-uuidgen&amp;lt;/code&amp;gt; invocation may or may not already be part of the regular boot sequence. If it is part of the boot sequence, then removing the file and rebooting should be enough. If you need to run &amp;lt;code&amp;gt;dbus-uuidgen&amp;lt;/code&amp;gt; yourself, pay attention to the warning in the man page:&amp;lt;blockquote&amp;gt;If you try to change an existing machine-id on a running system, it will probably result in bad things happening. Don't try to change this file. Also, don't make it the same on two different systems; it needs to be different anytime there are two different kernels running.&amp;lt;/blockquote&amp;gt;So after doing this, definitely don't continue using the system without rebooting. As an extra precaution, you may instead reboot first into rescue mode (or as you suggested, boot from a live USB stick), but from my experience, that is not necessary. Bad things may happen, but the bad things that do happen are fixed by the reboot anyway.&lt;/div&gt;</summary>
		<author><name>Jayctheriot</name></author>
	</entry>
</feed>