ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Machine Guid/Uuid that is unique to each operating system that never changes?

    IT Discussion
    1
    1
    978
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • black3dynamiteB
      black3dynamite
      last edited by

      Salt uses your computer hostname as the minion id but that can be annoying if you ever end up changing your hostname after. You would end up having to change the minion id and on the salt master, you will need to accept the new minion id and remove the old minion id. You could create a script that makes the changes to the minion id file, restart the service and have salt master automatically accept the new minion and remove the old minion. If you were to use a unique Guid or UUID as the minion id then you can avoid this.

      From a Windows systems, which value is unique that never changes?

      # This won't change unless you reinstall
      Get-ItemProperty -Path Registry::HKLM\SOFTWARE\Microsoft\Cryptography | Select-Object -ExpandProperty MachineGuid
      

      OR

      # Both command shows the same the UUID value
      Get-WmiObject -Class Win32_ComputerSystemProduct | Select-Object -ExpandProperty UUID
      
      - OR -
      
      (Get-CimInstance -Class Win32_ComputerSystemProduct).UUID
      

      From a Linux systems, which value is unique that never changes?

      # This won't change unless you reinstall or use the systemd-machine-id-setup command
      cat /etc/machine-id
      

      OR

      # Both command shows the same the UUID value
      sudo dmidecode -s system-uuid
      
      - OR -
      
      sudo cat /sys/class/dmi/id/product_uuid
      
      1 Reply Last reply Reply Quote 4
      • 1 / 1
      • First post
        Last post