Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
nsswitch.conf clarification [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 327
Location: USA

PostPosted: Thu May 16, 2024 1:59 pm    Post subject: nsswitch.conf clarification [SOLVED] Reply with quote

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
Code:
hostname
- 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
View user's profile Send private message
mvaterlaus
Apprentice
Apprentice


Joined: 01 Oct 2010
Posts: 235
Location: Switzerland

PostPosted: Fri May 17, 2024 12:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 327
Location: USA

PostPosted: Fri May 17, 2024 3:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum