In brief term, you first need a NIS environment. That is, a network with a NIS server and clients that are configured to use NIS for passwd and group, etc.
What you mostly see in NIS environments is that filesystems are NFS mounts, for example /home or /usr/users or whatever.
Possibly you can do this all on one machine, for testing purpose.
If this is all up and running then login from a client, using a login that is not defined local but on the NIS server.
In brief term, you first need a NIS environment. That is, a network with a NIS server and clients that are configured to use NIS for passwd and group, etc.
What you mostly see in NIS environments is that filesystems are NFS mounts, for example /home or /usr/users or whatever.
Possibly you can do this all on one machine, for testing purpose.
If this is all up and running then login from a client, using a login that is not defined local but on the NIS server.