|Lesson 10||Troubleshooting NIS |
|Objective||List the steps used to troubleshoot NIS problems. |
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.
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:
- Ping the NIS server.
- 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.
- 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.
- 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:
- Verify that all NIS clients and servers are running the correct version of NIS.
- 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.
- 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.
- Check the NIS server logs for any error messages that may indicate a problem.
This can be done by checking the
file on the NIS server.
- 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.
- Check the /var/yp/ypbind.log file on the NIS client for any error messages.
- Make sure that the NIS maps are being propagated correctly. This can be done by running the
ypwhich command on the NIS client.
- Check that the NIS maps are being updated correctly. This can be done by running the
ypcat command on the NIS client.
- Restart NIS server and client services, if necessary.
- 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.
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
ypmatch to see if this user does in fact have a network account.