Find the answer to your Linux question:
Results 1 to 4 of 4
Hi, I was told to add the "nis" in front of "files" for below lines in /etc/nsswitch.conf was not in a good practise. I tried to search in google and ...
  1. #1
    Just Joined!
    Join Date
    Apr 2010
    Posts
    2

    question about nsswitch.conf

    Hi,

    I was told to add the "nis" in front of "files" for below lines in /etc/nsswitch.conf was not in a good practise. I tried to search in google and man page for nsswitch.conf and can't find the answer. could someone please help me?

    passwd: nis files
    shadow: nis files
    group: nis files
    hosts: nis files

    Thanks

  2. #2
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,114
    Unless you are running Solaris, and use the NIS
    name service, yes, it shouldn't be first.

    /etc/nsswitch.conf -- Name Service Switch File

    The /etc/nsswitch.conf file

    Code:
    hosts:files dns
    is probably the usual default. That means, when your system
    wants to look up a name, it checks the /etc/hosts file
    first, then the configured name server.

  3. #3
    Just Joined!
    Join Date
    Apr 2010
    Posts
    2
    Thanks. Could you pls let me know the reason why it is not a good idea? Thanks a lot!!

  4. #4
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,114
    My guess is that it would slow down your name lookups
    as it would check NIS, which isn't available, and fail at that
    before consulting /etc/hosts or DNS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...