Live data from Hacker News

Devuan considers machine IDs

distrowatch.com

61–70 of 76 posts

Re: Devuan considers machine IDs

#61
post #55

Earlier quoted context omitted.

Does something like dd if=/dev/urandom bs=1 count=16 | hexdump Give you something that you can use?

Well, the machine-id of that Debian VM was ... 38d05397c25548b4f4bda7751b5062 ... and ... $ FOO=`cat /dev/urandom | tr -dc a-z0-9 | head -c${1:-30}` $ echo $FOO 6we4gvnmx00w208ffty6i11m82rw6d But I have no clue whether systemd would be happy with that. Maybe later I can test more. Edit: Oops. Make that ... $ FOO=`cat /dev/urandom | tr -dc abcdef0-9 | head -c${1:-30}` $ echo $FOO b486935dbb9e9fe603328a19e2b5b4

Maybe use pwgen?

Something like:

    $ pwgen -1s 31
    qHfKU46H2RA2WUr0EZ1zBHfIBLKZKuT

Re: Devuan considers machine IDs

#62
post #55

Earlier quoted context omitted.

Well, the machine-id of that Debian VM was ... 38d05397c25548b4f4bda7751b5062 ... and ... $ FOO=`cat /dev/urandom | tr -dc a-z0-9 | head -c${1:-30}` $ echo $FOO 6we4gvnmx00w208ffty6i11m82rw6d But I have no clue whether systemd would be happy with that. Maybe later I can test more. Edit: Oops. Make that ... $ FOO=`cat /dev/urandom | tr -dc abcdef0-9 | head -c${1:-30}` $ echo $FOO b486935dbb9e9fe603328a19e2b5b4

Maybe use pwgen? Something like: $ pwgen -1s 31 qHfKU46H2RA2WUr0EZ1zBHfIBLKZKuT

I think that it needs to be hexadecimal. But not sure.

Re: Devuan considers machine IDs

#64
post #11

If a file on your computer is being used by a program to send information to someone, the answer isn't to destroy/randomize the file and break other applications, the answer is to not use the program that is sending your information somewhere.

Chromium reads it, but are we sure it's sending it somewhere? Maybe it uses it for bookkeeping of local sessions or something like that.

See http://jdebp.uk./Softwares/nosh/guide/commands/machine-id.xm...

Re: Devuan considers machine IDs

#65
post #7

OK, from the man page: > The /etc/machine-id file contains the unique machine ID of the local system that is set during installation. The machine ID is a single newline-terminated, hexadecimal, 32-character, lowercase ID. When decoded from hexadecimal, this corresponds to a 16-byte/128-bit value. > The machine ID is usually generated from a random source during system installation and stays constant for all subsequen…

So basically deleting the file as the last step before a shut down or reboot will work, is that correct?

Incorrect.

Machine IDs are stored in several places, some of which are not even files.

* http://jdebp.uk./Softwares/nosh/guide/commands/machine-id.xm...

They can be resurrected if not all storage locations are dealt with. Moreover, some systems use things like the SMBIOS product UUID.

* http://jdebp.uk./Softwares/nosh/guide/commands/setup-machine...

The correct approach is not deleting files.

* http://jdebp.uk./Softwares/nosh/guide/commands/erase-machine...

* https://lists.debian.org/debian-user/2019/03/msg00550.html

Re: Devuan considers machine IDs

#67
post #65

Earlier quoted context omitted.

So basically deleting the file as the last step before a shut down or reboot will work, is that correct?

Incorrect. Machine IDs are stored in several places, some of which are not even files. * http://jdebp.uk./Softwares/nosh/guide/commands/machine-id.xm... They can be resurrected if not all storage locations are dealt with. Moreover, some systems use things like the SMBIOS product UUID. * http://jdebp.uk./Softwares/nosh/guide/commands/setup-machine... The correct approach is not deleting files. * http://jdebp.uk./Softw…

Thanks.

So at boot, one would run "erase-machine-id". Then create a random 30-character hexadecimal number. And then either set "the systemd.machine_id= kernel command line parameter" to it. Or pass it via "the option --machine-id= to systemd".

Re: Devuan considers machine IDs

#68
post #67
post #65

Earlier quoted context omitted.

Incorrect. Machine IDs are stored in several places, some of which are not even files. * http://jdebp.uk./Softwares/nosh/guide/commands/machine-id.xm... They can be resurrected if not all storage locations are dealt with. Moreover, some systems use things like the SMBIOS product UUID. * http://jdebp.uk./Softwares/nosh/guide/commands/setup-machine... The correct approach is not deleting files. * http://jdebp.uk./Softw…

Thanks. So at boot, one would run "erase-machine-id". Then create a random 30-character hexadecimal number. And then either set "the systemd.machine_id= kernel command line parameter" to it. Or pass it via "the option --machine-id= to systemd".

No.

    % system-control cat machine-id
    start:#!/bin/nosh
    start:true
    stop:#!/bin/nosh
    stop:envdir env
    stop:erase-machine-id
    run:#!/bin/nosh
    run:#Set up and tear down the machine ID
    run:envdir env
    run:setup-machine-id
    restart:#!/bin/sh
    restart:exec false      # ignore script arguments
    %

Re: Devuan considers machine IDs

#69
post #68
post #67

Earlier quoted context omitted.

Thanks. So at boot, one would run "erase-machine-id". Then create a random 30-character hexadecimal number. And then either set "the systemd.machine_id= kernel command line parameter" to it. Or pass it via "the option --machine-id= to systemd".

No. % system-control cat machine-id start:#!/bin/nosh start:true stop:#!/bin/nosh stop:envdir env stop:erase-machine-id run:#!/bin/nosh run:#Set up and tear down the machine ID run:envdir env run:setup-machine-id restart:#!/bin/sh restart:exec false # ignore script arguments %

OK, thanks.

So "setup-machine-id". Does that generate a value that's unrelated to any preexisting versions, analogs, etc?

I ask because, when I deleted /etc/machine-id and ran "systemd-machine-id-setup", it generated a new machine-id by copying the D-Bus machine ID.

Re: Devuan considers machine IDs

#70

If a file on your computer is being used by a program to send information to someone, the answer isn't to destroy/randomize the file and break other applications, the answer is to not use the program that is sending your information somewhere.

But what faster way to discover which applications to remove than by deleting /etc/machine-id?
Post reply on HN