Network Information  «Prev  Next»
Lesson 10Troubleshooting NIS
ObjectiveList the steps used to troubleshoot NIS problems.

Troubleshooting NIS

On systems using NIS or NIS+, a system failure will prevent all users from logging on to the network. The typical failure signal is that the login process will hang for a considerable period of time when someone tries to log on using a network password. In fact, this may be the only indication of a problem. If you are in an NIS environment and the login process hangs, the first reason you should consider is a failed NIS server. Because NIS is a distributed database service, it can be difficult to track down the offending machine. Time-tested solutions include checking connectivity, logging on with a local account, and checking processes.

Troubleshooting NIS

Problems with NIS are common. The most serious problem is when you lose your NIS server. Most NIS environments have dedicated master and slave servers, making total breakdown less likely. Below are some steps you can take to troubleshoot your NIS system:
  1. Ping the NIS server.
  2. Use the rpcinfo command with the host argument and grep (rpcinfo -p nishost | grep ypserv). This will help you see if the ypserv is running on the NIS server.
  3. Try to log on to the NIS server using its local accounts. If you can log on with a local account, you can be reasonably assured that the local system’s processes are not malfunctioning.
  4. Use the ps command to see if the ypserv program is running.

If the nsswitch.conf file does not allow a local logon to the NIS host, the third option will not work. You may need to update this file as you troubleshoot.

How do I troubleshoot Network Information Service (NIS)

Troubleshooting NIS can be a complex process, as there are many potential causes of issues. Here are some steps you can take to troubleshoot NIS:
  1. Verify that all NIS clients and servers are running the correct version of NIS.
  2. Check that the NIS client and server machines are configured correctly. This includes making sure that the correct domain name is set and that the /etc/yp.conf file is configured correctly.
  3. Verify that the NIS client and server machines can communicate with each other. This can be done by using the ping command to check connectivity.
  4. Check the NIS server logs for any error messages that may indicate a problem. This can be done by checking the
    /var/log/messages
    
    file on the NIS server.
  5. Check the NIS client for any error messages that may indicate a problem. This can be done by checking the /var/log/messages file on the NIS client.
  6. Check the /var/yp/ypbind.log file on the NIS client for any error messages.
  7. Make sure that the NIS maps are being propagated correctly. This can be done by running the ypwhich command on the NIS client.
  8. Check that the NIS maps are being updated correctly. This can be done by running the ypcat command on the NIS client.
  9. Restart NIS server and client services, if necessary.
  10. If the problem persists, refer to NIS documentation or seek help from a NIS expert.
Please note that these steps are general, you might need to adjust them to your specific NIS version or configuration, and it is also recommended to have a backup of your data before making any changes.

Client failure

If you have verified that the server is working, use the ps command to see if ypbind is running on the client. You should then check the client system’s connectivity, then see if the client can log on to other systems using local accounts.
Of course, you should use ypcat and ypmatch to see if this user does in fact have a network account.