NFS, which stands for Network file system is a kind of protocol found commonly in systems similar to the UNIX. It has been developed by Sun Microsystems and gives computer users access to files which are sent through any network. Samba, on the other hand is an implementation of a network protocol or a reimaging of file sharing via the internet. Like the NFS, Samba also is found and used as a basic service on UNIX-like systems.
The NFS Server is faster than the Samba when it comes to transfer of files greater than 1GB. The setup is also quite easy on systems, especially Linux and it has authentication support for Kerberos with the ability of squashing roots. This denies users who access shares, the permission to access root files. Moreover, it uses IP address of users for authentication.
The Samba Server has an excellent added feature that Windows connects to it directly and it aids in browsing networks without being required to install third party applications. On the Windows platform, Samba will be better because Windows does not have support for NFS and in order to run NFS on windows, there might be a necessity of installing third-party software.
However, for a Linux user, NFS is the perfect choice because the setup is quite simple and allows authentication using IP addresses. NFS is highly secure on home networks and other smaller networks but on larger networks with more than 20 boxes, Kerberos provides better and enhanced security.
For a small network NFS server is the ideal choice. However, some caution needs to be exercised. Root squashing needs to be done which makes sure that an unknown person doesn’t gain access to files and directories on the main server. On the other hand, for a comparatively bigger network, then NFS with Kerberos is the viable option because of the enhanced security it provides.
However, on the Windows platform where the server needs to be accessed, instead of purchasing third party applications, one can use the Samba server; also because there are no NFS clients which are available free of cost for the Windows platform.