View previous topic :: View next topic |
Author |
Message |
jankom Guru
Joined: 30 Aug 2021 Posts: 352 Location: USA
|
Posted: Thu May 16, 2024 1:59 pm Post subject: nsswitch.conf clarification [SOLVED] |
|
|
Sorry to bother you guys with this maybe trivial question, but I would like to understand a note after eix-sync compile output:
Quote
...
*
* Add the appropriate mdns into the hosts line in /etc/nsswitch.conf
* before resolve and dns. An example line looks like:
* hosts: mymachines mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname dns
*
...
Unquote.
What is the meaning of "mymachines"?
I understand the meaning of "myhostname" is the output of - although should it be the fqdn or just the hostname part of it? In my case "/etc/conf.d/hostname" file has it as fqdn.
Thanks,
jankom
Last edited by jankom on Fri May 17, 2024 5:01 pm; edited 1 time in total |
|
Back to top |
|
|
mvaterlaus Apprentice
Joined: 01 Oct 2010 Posts: 237 Location: Switzerland
|
Posted: Fri May 17, 2024 12:25 pm Post subject: |
|
|
The Option mymachines is used by a Plugin [1] for nsswitch.conf providing name resolution for locally hosted containers spawned with systemd-machined service. I think you can omit this value, if you do not use systemd as init or are not hosting any containers spawned with systemd-machined.
[1]https://www.man7.org/linux/man-pages/man8/libnss_mymachines.so.2.8.html |
|
Back to top |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 352 Location: USA
|
Posted: Fri May 17, 2024 3:13 pm Post subject: |
|
|
Thanks for the info. I do not have systemd, but if I use the "example line" Code: | hosts: mymachines mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname dns | it works. My previous setting was Code: | hosts: files mdns_minimal [NOTFOUND=return] dns mdns | and it worked.
However: something strange has happened due to profile updates or updates on my other machine, acerlinux laptop (linux Mint) - see my previous, SOLVED post https://forums.gentoo.org/viewtopic-t-1167283-highlight-.html
It looks like I cannot ping Mint from Gentoo as .local or vica versa. Also, The Mint machine is visible on the local router as "acerlinux" (the machine name setting on the Mint machine), but the Gentoo machine is shown only as "connected device".
When I closed the earlier (avahi) posting they could ping each other and were visible on the local router (hotspot on a smartpfone).
The only reason this is important is because the .local method allows for sinpler printer and ssh settings, do not need the ever changing local IP (the smartphone hotspot changes the 3rd section of the IP after the smartphone is rebooted. the 4th section (and of course 192.168.) part remains the same.
No big deal, just interesting and curious, why, what is the root cause.
jankom |
|
Back to top |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 352 Location: USA
|
|
Back to top |
|
|
|