nsswitch.conf: is there a daemon I need to restart?
Solution 1
No you probably don't (other than what David said, and maybe ypbind, but you said not NIS). The nsswitch.conf file isn't for a daemon in particular, it is actually a file used by the C library for various system calls.
Solution 2
You may have nscd (Name Service Caching Daemon) running, which you may need to restart, otherwise it's unlikely. Certain daemons might cache get*() function call results and may need restarting.
Solution 3
Be aware that existing processes will not be aware of the changes to nsswitch.conf. The nsswitch.conf(5) page states, "Within each process that uses nsswitch.conf, the entire file is read only once; if the file is later changed, the process will continue using the old configuration."
Related videos on Youtube
jldupont
Updated on September 17, 2022Comments
-
jldupont almost 2 years
When I modify /etc/nsswitch.conf, is there an "nss" daemon I should restart? I am not referring to modules such as mdns & nis.
-
Kyle Brandt over 14 yearsWell since my answer as accepted I have to give David the upvote :-P
-
David Pashley over 14 years\o/ cheers. now I feel the need to upvote you for your generosity.
-
jldupont over 14 yearsThanks guys. I can see that nscd isn't installed/running by default on Ubuntu.
-
David Pashley over 14 yearsThat's probably a good thing. NSCD just normally causes more problems than it solves. :)
-
Ken Williams over 10 yearsSo what's a person to do? Reboot?
-
Ron Smith about 10 years@Ken: Sadly, this appears to be the case.
-
palswim about 8 yearsRather than just restart, you could disable the thing. I would restart my NSCD and successfully resolve host names, then a short while later, my resolution would fail. This happened consistently.
-
01AutoMonkey almost 7 yearsInstalling
nscd
and doingsudo service nscd restart && sudo service network-manager restart
removes the need to reboot for me. -
Paulo Pedroso over 5 yearsUbuntu 16:
Failed to restart nscd.service: Unit nscd.service not found