When I modify /etc/nsswitch.conf, is there an "nss" daemon I should restart? I am not referring to modules such as mdns & nis.
Asked
Active
Viewed 7.1k times
3 Answers
23
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.
![](../../users/profiles/7342.webp)
David Pashley
- 23,151
- 2
- 41
- 71
-
1Well since my answer as accepted I have to give David the upvote :-P – Kyle Brandt Oct 21 '09 at 17:30
-
\o/ cheers. now I feel the need to upvote you for your generosity. – David Pashley Oct 21 '09 at 17:32
-
Thanks guys. I can see that nscd isn't installed/running by default on Ubuntu. – jldupont Oct 23 '09 at 15:24
-
1That's probably a good thing. NSCD just normally causes more problems than it solves. :) – David Pashley Oct 23 '09 at 16:26
-
Rather than just restart, [you could disable the thing](http://unix.stackexchange.com/a/273721/13308). I would restart my NSCD and successfully resolve host names, then a short while later, my resolution would fail. This happened consistently. – palswim Apr 01 '16 at 19:32
20
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."
![](../../users/profiles/145139.webp)
Keith Edmunds
- 201
- 2
- 2
-
6
-
3
-
3Installing `nscd` and doing `sudo service nscd restart && sudo service network-manager restart` removes the need to reboot for me. – 01AutoMonkey Jun 29 '17 at 17:10
-
Ubuntu 16: `Failed to restart nscd.service: Unit nscd.service not found` – Paulo Pedroso Jan 31 '19 at 11:46
16
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.
![](../../users/profiles/2561.webp)
Kyle Brandt
- 82,107
- 71
- 302
- 444