[root@rhel7server1 ~]# systemctl enable nfs-server Created symlink from /etc/systemd/system/multi-user.target.wants/nfs-server.service to /usr/lib/systemd/system/nfs-server.service.
## Assuming that the same users exist in the client machine with same uid,gid as that in the NFS server,
## it will automount the home directories on first access
## check the home directory for user1, notice it is now mounted from NFS server
[root@rhel7client1 etc]# su - user1
Last login: Mon Jun 29 11:47:42 +08 2020 on pts/0
[user1@rhel7client1 ~]$ df /home/user1
Filesystem 1K-blocks Used Available Use% Mounted on rhel7server1:/home/user1 10475520 33024 10442496 1% /home/user1
[user1@rhel7client1 ~]$ ll
total 4
-rw-rw-r--. 1 user1 user1 18 Jun 29 11:30 user1.txt
[user1@rhel7client1 ~]$ cat user1.txt
created at server
[user1@rhel7client1 ~]$ echo "created at client" >> user1-clientside.txt
[user1@rhel7client1 ~]$ ll
total 8
-rw-rw-r--. 1 user1 user1 18 Jun 29 11:49 user1-clientside.txt
-rw-rw-r--. 1 user1 user1 18 Jun 29 11:30 user1.txt