You are not logged in.

#1 2017-12-10 15:26:39

kgizdov
Package Maintainer (PM)
From: Edinburgh, UK
Registered: 2015-12-08
Posts: 113

[SOLVED] Do I have to manually update my nsswitch.conf

Hi,

Just ran an update and a bunch of files in `/etc` got 'pacnew' versions. For most, I know how to deal with, but I'm not particularly familiar with `nsswitch.conf`

This is the diff

$ diff -y /etc/nsswitch.conf /etc/nsswitch.conf.pacnew 
# Begin /etc/nsswitch.conf				      |	# Name Service Switch configuration file.
							      >	# See nsswitch.conf(5) for details.

passwd: compat mymachines systemd			      |	passwd: files mymachines systemd
group: compat mymachines systemd			      |	group: files mymachines systemd
shadow: compat						      |	shadow: files

publickey: files						publickey: files

hosts: files mymachines mdns_minimal [NOTFOUND=return] resolv |	hosts: files mymachines resolve [!UNAVAIL=return] dns myhostn
networks: files							networks: files

protocols: files						protocols: files
services: files							services: files
ethers: files							ethers: files
rpc: files							rpc: files

netgroup: files							netgroup: files
							      <
# End /etc/nsswitch.conf				      <

Should I transfer the changes in any way? What should I check before doing so? I remember, it's important to configure hosts/dns resolution correctly with systemd and not sure what all the strings mean. Thanks in advance.

Last edited by kgizdov (2017-12-11 10:22:25)

Offline

#2 2017-12-10 15:42:16

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] Do I have to manually update my nsswitch.conf

As a general rule you want to avoid attempting to do any merges whatsoever of passwd/group/shadow/gshadow.

As for nsswitch, if you've customized it you likely know what you are doing, but the only change in the packaged defaults is switching "compat" for "files" and adding some comments.  If you don't have any compelling reason to keep the old version, you should manually copy the changes over, or use some tool like pacdiffviewer which can track each version of the default file and apply a diff of the packaged changes on top of your modified version.

See https://bugs.archlinux.org/task/54592 for why you almost certainly do want to merge the compat ==> files change. wink


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#3 2017-12-11 10:22:12

kgizdov
Package Maintainer (PM)
From: Edinburgh, UK
Registered: 2015-12-08
Posts: 113

Re: [SOLVED] Do I have to manually update my nsswitch.conf

Thanks for the tip, I didn't know about the automated tools to handle this.

Honestly, I don't remember the exact reason I customized `nsswitch.conf`, but I think it was following this in the wiki - https://wiki.archlinux.org/index.php/avahi#Using_Avahi
The machine in question needs to be compatible with the specialized NAT it sits behind, so I can access it, and that was the easiest way. I will transfer the changes and hopefully it would be fine.

Last edited by kgizdov (2017-12-11 10:24:08)

Offline

Board footer

Powered by FluxBB