What is the purpose of the nsswitch.conf file?

A. It is used to configure where the C library looks for system information such as host names and user passwords.
B. It is used to configure network protocol port numbers such as for HTTP or SMTP.
C. It is used to configure LDAP authentication services for the local system.
D. It is used to configure which network services will be turned on during the next system boot.


部份GNU C語言的函式庫會根據本地端系統的設定不同而有不同的運作方式,像是getaliasent、gethostbyname、getnetent等等的函數。GNU C語言的函式庫會使用NSS(Name Service Switch)來讀取系統的資料庫,資料庫名稱列表如下:
  • aliases
  • ethers
  • group
  • hosts
  • initgroups
  • netgroup
  • networks
  • passwd
  • protocols
  • publickey
  • rpc
  • services
  • shadow