Whatever you do will be insignificant, but it is very important that you do it.
- Mahatma Gandhi

Thursday, October 09, 2008

Creating a list of machines on your NIS domain

If you're on a Linux machine that authenticates via NIS, you can very easily generate a list of all the Linux/Unix machines that are using that NIS server to authenticate. The command is:
ypcat hosts
You can also list the users that are authenticating against this server:
ypcat passwd
One situation in which this becomes very useful is if you have a heterogeneous network and people are running different shells. Part of the output of this second command is to tell you what shell people have as their default login shell. If these are set differently, you could be getting different environment settings and behavior.

No comments: