Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to permanently change Unraid's machine-id?

Featured Replies

I have deployed two Unraid servers on my local network, but I discovered that their machine-id are identical. This is causing a WSD (wsdd) discovery conflict for network sharing, and as a result, I cannot see both servers at the same time. How can I properly change the machine-id on one of the Unraid servers?

 Even when I use a brand new 7.2.0 system in a VMWare VM, I still get the same result. Can anyone else please check and see if their cat /etc/machine-id result is also identical?

root@Tower:~# cat /etc/machine-id 
1f9334b9b3ea.....eb7d57469028723


Edited by neoherozzz

Solved by JorgeB

  • Community Expert

Beyond changing under settings > identification, I read somewhere needing to log out and back in to unraid connect based on this thread.

You could go directly to the USB > config > ident.cfg file and mess around there. Highly recommend backing it up beforehand just in case.

  • Author

I searched previous posts and found mentions that earlier versions had a machine-id file under /boot/config/ used for Samba sharing

I tried to fix this on server by generating a new ID with

dbus-uuidgen > /boot/config/machine-id 

and rebooting, but the system still boots with the old, conflicting machine-id and ignores the file on the flash drive.
https://forums.unraid.net/topic/164386-deleted-br0/#findComment-1415260

  • Community Expert

Interesting, my two main servers have a different machine-id from yours, but both have the same one, I've reported the issue to LT

  • Author
16 minutes ago, JorgeB said:

Interesting, my two main servers have a different machine-id from yours, but both have the same one, I've reported the issue to LT

Thanks for your testing❤️

1 hour ago, neoherozzz said:

I have deployed two Unraid servers on my local network, but I discovered that their machine-id are identical. This is causing a WSD (wsdd) discovery conflict for network sharing, and as a result, I cannot see both servers at the same time. How can I properly change the machine-id on one of the Unraid servers?

 Even when I use a brand new 7.2.0 system in a VMWare VM, I still get the same result. Can anyone else please check and see if their cat /etc/machine-id result is also identical?

root@Tower:~# cat /etc/machine-id 
1f9334b9b3ea.....eb7d57469028723


I have the same machine-id like yours if this is needed for some throubleshoot.

Let's wait for JorgeB :)

  • Community Expert

did you manul edit smb?
the netbios and machin id can be over wrtten and not used if you replaces samba...

  • Community Expert

this could asl be issues within the avahi mdns system...

heres a script you can try to purge the machine ID form the system...

on Unraid (Slackware-based, no systemd), the “machine-id” that a bunch of stuff (dbus, wsdd/wsdd2, sometimes Samba helpers) keys off of can live in /etc/machine-id and/or /var/lib/dbus/machine-id. On Unraid the rootfs is RAM, so you’ll want to regenerate once and persist it on the flash drive, then symlink both locations to that single persistent file.

image.png

User script plugin:

Below is a safe, copy-paste script that:

  • stops Samba/WSD/Avahi if present,

  • backs up any existing IDs,

  • deletes all machine-id copies,

  • creates a fresh ID (persisted at /boot/config/machine-id),

  • symlinks /etc/machine-id and /var/lib/dbus/machine-id to it,

  • clears common wsdd/wsdd2 state files,

  • (optionally) clears Samba’s server GUID cache if you’re not domain-joined,

  • restarts services,

  • shows you the new ID.

One-shot fix (run as root in the Unraid console/SSH)

#!/bin/bash
set -Eeuo pipefail
export PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/sbin:/usr/local/bin"

# ===== Settings you can tweak =====
PERSIST_FILE="/boot/config/machine-id"    # where the stable ID will live
RESET_SAMBA_GUID="auto"                   # "yes" | "no" | "auto" (auto = only if not domain-joined)
# ===================================

echo "[*] Resetting OS machine-id & WSD state cleanly…"

# Discover current ID (if any)
OLD_ID="$( (cat /etc/machine-id 2>/dev/null || cat /var/lib/dbus/machine-id 2>/dev/null || true) \
          | head -n1 | tr -d '[:space:]' || true )"
[[ -n "${OLD_ID:-}" ]] && echo "[i] Old machine-id: $OLD_ID" || echo "[i] No existing machine-id detected."

# Stop network announce bits if present
[[ -x /etc/rc.d/rc.samba ]] && /etc/rc.d/rc.samba stop || true
pkill -f 'wsdd2' 2>/dev/null || true
pkill -f 'wsdd'  2>/dev/null || true
[[ -x /etc/rc.d/rc.avahidaemon ]] && /etc/rc.d/rc.avahidaemon stop || true
[[ -x /etc/rc.d/rc.avahi-daemon ]] && /etc/rc.d/rc.avahi-daemon stop || true

# Backups (to flash so they survive reboot)
ts="$(date +%F_%H%M%S)"
for f in /etc/machine-id /var/lib/dbus/machine-id; do
  [[ -s "$f" ]] && cp -a "$f" "/boot/config/$(basename "$f").bak.$ts" || true
done

# Remove all copies/symlinks of machine-id
rm -f /etc/machine-id /var/lib/dbus/machine-id

# Create a fresh, persistent ID on the flash and link both locations to it
mkdir -p /boot/config
dbus-uuidgen > "$PERSIST_FILE"
chmod 0644 "$PERSIST_FILE"
mkdir -p /var/lib/dbus
ln -sf "$PERSIST_FILE" /etc/machine-id
ln -sf "$PERSIST_FILE" /var/lib/dbus/machine-id
NEW_ID="$(cat "$PERSIST_FILE")"
echo "[+] New machine-id: $NEW_ID (persisted at $PERSIST_FILE)"

# WSD/WSDD/WSDD2: nuke any saved UUID/state files if the plugin left them around
for d in /var/lib/wsdd* /var/run/wsdd* /etc/wsdd* /var/lib/wsdd2* /var/run/wsdd2* /etc/wsdd2*; do
  [[ -d "$d" ]] || continue
  find "$d" -maxdepth 1 -type f -regextype posix-extended \
    -regex '.*(uuid|state|machine).*' -print -delete || true
done

# Optionally clear Samba GUID cache (NOT if domain-joined)
should_reset_guid="no"
if [[ "$RESET_SAMBA_GUID" == "yes" ]]; then
  should_reset_guid="yes"
elif [[ "$RESET_SAMBA_GUID" == "auto" ]]; then
  if ! net ads status >/dev/null 2>&1 && ! net rpc info >/dev/null 2>&1; then
    should_reset_guid="yes"
  fi
fi

if [[ "$should_reset_guid" == "yes" ]]; then
  # These files may or may not exist on Unraid; removing them is safe for standalone workgroups.
  rm -f /var/lib/samba/server_guid.tdb /var/lib/samba/serverid.tdb 2>/dev/null || true
  echo "[i] Samba server GUID cache cleared (standalone mode)."
else
  echo "[i] Skipped Samba server GUID reset (domain-joined or disabled)."
fi

# Bring services back
[[ -x /etc/rc.d/rc.avahidaemon ]] && /etc/rc.d/rc.avahidaemon start || true
[[ -x /etc/rc.d/rc.avahi-daemon ]] && /etc/rc.d/rc.avahi-daemon start || true
[[ -x /etc/rc.d/rc.samba ]] && /etc/rc.d/rc.samba start || true

# If wsdd/wsdd2 doesn’t auto-spawn via the Unraid plugin, try to launch it (best-effort)
command -v wsdd2 >/dev/null 2>&1 && wsdd2 -t >/dev/null 2>&1 || true
command -v wsdd  >/dev/null 2>&1 && wsdd  -t >/dev/null 2>&1 || true

echo "[✓] Done. If Windows still shows duplicates, give Network Discovery ~1–2 minutes or restart the WSD service on your Windows box."


image.png

Make it survive reboots (add to /boot/config/go)

Unraid’s OS reloads in RAM, so make sure the same ID is re-applied early on every boot. Append this snippet to the end of /boot/config/go:

# ---- persist a stable machine-id across boots ----
if [[ ! -s /boot/config/machine-id ]]; then
  dbus-uuidgen > /boot/config/machine-id
fi
ln -sf /boot/config/machine-id /etc/machine-id
mkdir -p /var/lib/dbus
ln -sf /boot/config/machine-id /var/lib/dbus/machine-id
# --------------------------------------------------

(Optional) Hunt down old occurrences of the stale ID

If your /etc/machine-id looked like a “long list” (multiple lines got appended over time), you can purge any places that cached one of those old values:

OLD="$(sed -n '1p' /boot/config/machine-id.bak.* 2>/dev/null | tr -d '[:space:]' | head -n1)"
[[ -n "$OLD" ]] && grep -R --binary-files=without-match -n "$OLD" \
  /etc /var/lib/samba /boot/config /usr/local/emhttp 2>/dev/null | head -n 50

If anything pops up in Samba tdb/registry files and you are not AD-joined, stopping Samba and removing those tdbs (as the script does) is fine—Samba will recreate them.


If you want, tell me what you see for:

ls -l /etc/machine-id /var/lib/dbus/machine-id
pgrep -af 'wsdd|wsdd2'
testparm -s | head -n 1

as you may be fighitng internal samba database and netbios settings... I personly don't like nor use WSD. But I'm also capable of runnign my own smb conf... windwos lately has be disgure in the name of security breaking and destroying how widnows uses samba and conects to shares...

But a mahince ID for the SID and wsd here makes sence if your only clearing on and noth where it can propagte too... Their may be other locations, but this will atleast clear what I know and regen the machien id on a live booted system....

  • Community Expert

for the go file may need to remove files and copy in and set chmod chown comands...

simla to how I edit and replaces unraid shost file for other addons docker hostname ip runs adn general network contorls

#!/bin/bash

sleep 5

rm /etc/hosts

cp /boot/config/hosts /etc/hosts

chmod 644 /etc/hosts

  • Community Expert

LT confirmed this is a bug, and should be fixed for the next release, thanks for reporting.

  • Community Expert
  • Solution

7.2.1-rc.1 is out, and it should resolve this issue, please be sure to remove any customizations you made to your go script related to this and then retest.

  • Author

Tested on unraid 7.2.1-rc1, the machine-id conflict issue in wsd has been perfectly resolved. To generate a new machine-id, you can run

dbus-uuidgen > /boot/config/machine-id

or just delete /boot/config/machine-id and reboot.

Thanks to the unraid team for their efforts!

  • Community Expert
11 hours ago, neoherozzz said:

Tested on unraid 7.2.1-rc1, the machine-id conflict issue in wsd has been perfectly resolved. To generate a new machine-id, you can run

dbus-uuidgen > /boot/config/machine-id

or just delete /boot/config/machine-id and reboot.

Thanks to the unraid team for their efforts!

Are you saying that if we have identical Machine-id's on two servers, we have to run this command on one (or both??) to resolve the issue? It does not happen automatically after installing 7.2.1...

  • Author
56 minutes ago, Frank1940 said:

Are you saying that if we have identical Machine-id's on two servers, we have to run this command on one (or both??) to resolve the issue? It does not happen automatically after installing 7.2.1...

If you have two Unraid servers with the same machine-id, you can resolve the conflict by running the above command on one of the servers to change its machine-id.

Alternatively, a simpler method is to delete the /boot/config/machine-id file; Reboot, a brand new machine-id will be generated automatically.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.