Open Linux Forums
Like Ubuntu forums, except with beer.
Member
Joined: Oct 04 2017
Posts: 361

audiomick wrote:

What is in the "machine-id" file? Is it readable?

I may even have one on the desktop (Ubuntu), but I can't be bothered turning it on at this time of night just to look for that.

Yes you have this file. It is part of Linux and, very possibly, all other OSs.

If you run

$ man machine-id

you will get a man page for it. Didn't give me a clue as to what it is actually good for.

If you run

$ cat /etc/machine-id

you will get output of a 32 alpha/numeric character string. This is the unique, supposedly anyway, machine-id for your system.

If you look it up online you will find a lot of content on it but nothing that seemed to me to explain what the damned thing is actually for or why they tell you that you shouldn't disclose this in public which is the reason I am not posting my output of that file.

All I know is that I have checked via the cat command 3 of my installs and they do indeed have different output that seems to be persistent.

Some function(s) must call on this for some reason.

Administrator
avatar
Joined: Jan 06 2018
Posts: 1697

From the little I read and understood, machine-id seems like it would quite useful in keeping track of computers in, for instance, a Google server farm. A big building where 50,000 computers just sit there thinking shit up probably day dreaming about combing the desert.

This guy seems to have a solid idea of what it's for. Didn't finish reading because phone. Also because long, boring, etc. Also, also because don't care. But mostly because phone.

https://medium.com/@george.shuklin/do-not-miss-etc-machine-id-31d21f028246

Member
Joined: Oct 04 2017
Posts: 361

Well that is interesting.

Don't really see how it is used but there does seem to be some sense to it.

But even if used in a cluster or in servers you still have to have the buggers connected and that means they all have to have an address which would identify them as well as this file does.

Obviously I am missing the point.

Administrator
avatar
Joined: Jan 06 2018
Posts: 1697

Don't feel left out. I don't get it either. Except, now that I think of it, you can have lots of computers all using the same IP address. In a server farm, to continue the example, the computers wouldn't all need to have different IP's. (That probably complicate things immeasurably.) This would be a way to identity a machine having trouble and woes. Still, identifying could also be done with MAC addresses. So yeah, don't get it.

Member
Joined: Oct 04 2017
Posts: 361

It seems to have something to do with individual applications and possibly where they are allowed to run.

Or something.

Oh well. Doesn't seem to be anything that has much to do with my operations or any that are likely to come up that I need to know about it.

Administrator
avatar
Joined: Oct 04 2017
Posts: 395

I'm just guessing, but I think it holds the (current) UUID for the machine the system is installed on.

Member
Joined: Oct 04 2017
Posts: 361

Leppie wrote:

I'm just guessing, but I think it holds the (current) UUID for the machine the system is installed on.

Interesting idea but I don't think it holds up.

Just checked with blkid for my partition uuids, both uuid and partuuid, here on my external drive and there is no similarity between them (even checked the /home partition ones as well as / partitions) and the machine-ids for these 2 installs.

Baffling.

Administrator
avatar
Joined: Oct 04 2017
Posts: 395

ranchhand wrote:

Just checked with blkid for my partition uuids, both uuid and partuuid, here on my external drive and there is no similarity between them (even checked the /home partition ones as well as / partitions) and the machine-ids for these 2 installs.

The machine's UUID is different from any individual piece of hardware or partition.

Administrator
avatar
Joined: Jan 06 2018
Posts: 1697

Irritation extremely with cellar dwellers naming scheme of different things same meaning.

Member
Joined: Oct 04 2017
Posts: 361

Leppie wrote:

ranchhand wrote:

Just checked with blkid for my partition uuids, both uuid and partuuid, here on my external drive and there is no similarity between them (even checked the /home partition ones as well as / partitions) and the machine-ids for these 2 installs.

The machine's UUID is different from any individual piece of hardware or partition.

Thank you.

Actually you are a real pain in the ass. I now have a whole lot more stuff to study.

But I have discovered the
dmidecode

command that does give that information. At least it gives that information on the actual hardware running.

I would hope that there would be some different machine-id for VM installations.

There is, by the way, a possibility of multiple MAC addresses apparently. I am not sure how that works but would definitely indicate some need for specific identification other than that.

One interesting thing I ran into while playing with the dmidecode command is

root@openbox:/home/tom# dmidecode -s system-serial-number
To be filled by O.E.M.

This is something that is amusing in that I am the OEM. Probably very important for me to learn how to do that. Don't think I am going to put that very high on my priorities list. I could also, apparently in some manner, create a discoverable
system-product-name
and probably some other things too. What fun.

Need to try this command on something like the wife's laptop.

For the system uuid you need

# dmidecode -s system-uuid

Checking with
aptitude why

I find that dmidecode is a depends for
libparted2

Which I think most people would have installed but maybe not.

Thanks again. Starting to make some sense. Machine-id may be derived from that somehow but I haven't seen that explicitly stated. It is the source, however, for any VM apparently so logically this could be inferred for non VM systems too.

Will have to study on this more sometime. Problem is my list is getting a bit long and I am getting pretty sure that I will not live long enough to clear it.