We will setup next environment:
In our organization we will use setup NFS server to allow users centrally managed by mine NIS server to have the same files in the same home directory on any machine in mine organization. I want to export /home/org directory to trusted network ( using NFSv3. In NIS I will configure user which will use this directory. To be sure that all will work, I will setup some static ports for listening in local firewall.
Configure nfs so he is listening on static ports. It means that you should remove comment from some lines in /etc/sysconfig/nfs


After this we can start nfs service and nfslock service.

[root@security1 ~]# chkconfig nfs on
[root@security1 ~]# chkconfig nfslock on
[root@security1 ~]# /etc/init.d/nfs start
[root@security1 ~]# /etc/init.d/nfslock start

Look for open ports which are important for nfs, and open it permanent in firewall.

[root@security1 ~]# rpcinfo -p

Now you will make directory where you will add all of yours users home directory. In mine case it is /home/org, so inside home I will just add directory. In this point it is very important to pay attention on selinux type of added directory.

[root@security1 home]# mkdir org
[root@security1 home]# chcon -t home_root_t org/

Now you will change /etc/exports file and add next line

/home/org,sync) there is no space between netmask and options
[root@security1 yp]# exportfs -a export all

On client side add directory, and make permanent mount for shared directory

[root@security2 ~]# mkdir /home/org
[root@security2 ~]# vi /etc/fstab /home/org nfs defaults 0 0
[root@security2 home]# mount -a you will do this just now, this will automatic be done after restart
[root@security2 ~]# setsebool use_nfs_home_dirs on selinux stuff

Now on server side add nfsuser with uid 5000, and home directory located in /home/org. Recompile NIS maps, and add user in kerberos. On end try to connect on security2.

[root@security1 home]# useradd -u 5000 -d /home/org/nfsuser nfsuser
[root@security1 home]# cd /var/yp/
[root@security1 yp]# make
[root@security1 yp]# kadmin.local
kadmin.local: addprinc nfsuser
[root@security1 yp]# ssh nfsuser@security2
[nfsuser@security2 ~]$