LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   File /etc/machine-id not found. Pros/Cons ? (https://www.linuxquestions.org/questions/slackware-14/file-etc-machine-id-not-found-pros-cons-4175734868/)

random_guy 03-13-2024 08:43 AM

File /etc/machine-id not found. Pros/Cons ?
 
Hi all,

I came across something that I haven't ever needed, it's a file named: /etc/machine-id.
I see why it might be needed. So a couple of questions:
Firstly, I'm curious as to why it's not created on Slackware in /etc/machine-id during install (I like that this is the default, actually). And, secondly, what are the pros/cons of creating it manually, if needed?

I've used Slackware (currently 15.0) for many years and I'm pretty sure it's never been part of the install but I could be wrong, as I've never had a reason to use machine-id or go looking for it :)

Any comments, advice would be greatly appreciated.

TIA

Didier Spaier 03-13-2024 09:23 AM

https://www.freedesktop.org/software...achine-id.html

brianL 03-13-2024 09:59 AM

Quote:

Thou shalt not mention systemd, or anything that is appertaining to it, in this forum.
-- St Brian's Epistle to the Slackers, v32

Petri Kaukasoina 03-13-2024 10:17 AM

/etc/rc.d/rc.messagebus runs dbus-uuidgen --ensure which ensures that /var/lib/dbus/machine-id exists and has the uuid in it.

You can make a link to /etc/machine-id:
Code:

ln -s /var/lib/dbus/machine-id /etc/machine-id
A program needed it but I don't remember which one.

random_guy 03-14-2024 07:59 AM

Thanks everyone for responding! @Petri you are correct the file does indeed exist on my machine. Thank you that info. @BrianL lol I understand, point taken.

I was curious about this text in the doc referenced by Didier in particular - It "must" not be used "directly". Instead ...


"This ID uniquely identifies the host. It should be considered "confidential", and must not be exposed in untrusted environments, in particular on the network. If a stable unique identifier that is tied to the machine is needed for some application, the machine ID or any part of it must not be used directly. Instead the machine ID should be hashed with a cryptographic, keyed hash function, using a fixed, application-specific key. That way the ID will be properly unique, and derived in a constant way from the machine ID but there will be no way to retrieve the original machine ID from the application-specific one. "


Is *direct* application access to machine-id enforced by the system in anyway i.e. an application is only allowed access to the machine-id through sd_id128_get_machine* library calls or is it up to the application to do so but not required?

dchmelik 03-21-2024 06:56 PM

It's a way 'they' want to track you. Hopefully there's a way to randomize it on boot or whenever you want, or just put all zeroes or something.

netcrawl 03-21-2024 08:12 PM

Quote:

Originally Posted by dchmelik (Post 6491124)
It's a way 'they' want to track you.

Yeah, Bernie says a lot of stuff. https://pbs.twimg.com/media/DtzwW0DWwAAQGPq.jpg

allend 03-22-2024 12:30 AM

Quote:

Originally Posted by Petri Kaukasoina (Post 6489487)
A program needed it but I don't remember which one.

Microsoft Edge recently started to require it, and now maybe
Vivaldi

brianL 03-22-2024 11:33 AM

Quote:

Originally Posted by allend (Post 6491158)
Microsoft Edge recently started to require it, and now maybe
Vivaldi

Who's using Microsoft Edge on Slackware? Sacrilege and blasphemy! "Bob" forgive them, they know not what they do.

metaed 03-22-2024 12:57 PM

Could it be Chrome, as installed by slackware64-15.0/extra/google-chrome/google-chrome.SlackBuild? Chrome complains
Quote:

Mar 22 17:53:59 newjersey chrome[11102]: [11102:11102:0322/175359.891900:ERROR:browser_dm_token_storage_linux.cc(100)] Error: /etc/machine-id contains 0 characters (32 were expected).
but runs anyway.

allend 03-22-2024 06:53 PM

Quote:

Originally Posted by brianL (Post 6491249)
Who's using Microsoft Edge on Slackware? Sacrilege and blasphemy! "Bob" forgive them, they know not what they do.

Microsoft Teams is a pervasive business platform, best accessed using Microsoft Edge.

allend 03-23-2024 07:06 AM

Quote:

Originally Posted by metaed (Post 6491269)
Could it be Chrome, as installed by slackware64-15.0/extra/google-chrome/google-chrome.SlackBuild? Chrome complains

but runs anyway.

My guess is the WebKit engine.

chemfire 03-24-2024 04:00 PM

I have been experimenting with just some experimenting with rc.local_shutdown just replacing the content of /var/lib/dbus/machine-id via

uuidgen | tr -d '-' > /var/lib/dbus/machine-id

So far this does not seem to cause an issue. This might be a 'privacy enhanced' option for folks worried about it. It may be useful to have a globally unique machine identifier that isnt tied to any current network address for some applications for the life a user session.

It might be useful for that to persist beyond that but I think that should be clear choice presented user not a 'surprise' So I don't feel any remorse breaking the contract of the spec in this way. If that results in a broken application - well its probably not an application I want to be using.


All times are GMT -5. The time now is 11:54 PM.