Network Information Service (NIS) basics Which NIS client command returns the name of the NIS server currently serving the client system?

Difficulty: Easy

Correct Answer: ypwhich

Explanation:


Introduction / Context:
Network Information Service (NIS), formerly known as Yellow Pages (YP), centralizes user, group, and other administrative maps. Troubleshooting NIS often requires confirming which server the client is bound to. Several commands exist, each with a distinct purpose, and knowing which one reveals the current server is fundamental.


Given Data / Assumptions:

  • NIS client utilities are installed.
  • The client is already bound to an NIS server (via ypbind or system services).
  • We want the command that shows the serving NIS master or current server.


Concept / Approach:
The ypwhich command queries the local binding and prints the hostname of the NIS server that the client is currently using. Other commands have different roles: ypbind manages binding; ypcat prints the contents of a map; yppoll queries a map's order number and master but is not primarily used to display the bound server for the client itself.


Step-by-Step Solution:
Identify the task: display the current NIS server.Match functionality: ypwhich reports the NIS server.Exclude tools with different purposes (binding, map content, map order).Select ypwhich.


Verification / Alternative check:
Run ypwhich; it should output the NIS server hostname. Running ypwhich -m lists NIS maps and their masters, reinforcing understanding of the toolset.


Why Other Options Are Wrong:
ypbind: daemon that binds the client to a server; not a query tool.ypcat: prints map contents; does not show the bound server.yppoll: checks map order/master for a given map; not the general “who am I bound to” tool.


Common Pitfalls:

  • Confusing ypwhich -m (map masters) with the basic ypwhich server query.
  • Forgetting that NIS may be firewalled; ensure ports are open for binding and queries.
  • Assuming DNS and NIS are the same; they serve different purposes.


Final Answer:
ypwhich

More Questions from Linux

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion