Go Premium for a chance to win a PS4. Enter to Win


what's the advantage of NIS over NFS?

Posted on 2004-03-24
Medium Priority
Last Modified: 2008-03-17
I have some workstations that are configured to recieve 500 pages of NIS data from the NIS server. This data includes the usual files, but mostly consists of configuration files for a software tool.

So this seems pretty strange to me. I was wondering why they didn't use NFS instead of NIS. If I used NFS, I could just mount up the configuration files and wouldn't have to worry about pushing the maps all over the network.

Any thoughts on when to use NIS and when to use NFS?
Question by:rfr1tz
  • 3
  • 2
  • 2
  • +3

Expert Comment

ID: 10668646

NIS stands for Network Information Service which was previously called Sun Yellow Pages (YP).
 It provides distributed service to simplify administration work in a networked computing environment.
 The idea is that instead of having every machine keep its own copy of administrative files,
 these files are maintained on a machine called NIS server.
  Client machines have to ask the server for its administrative files.
System administrators use NIS to keep a centralized database of system administration files,
such as /etc/passwd, /etc/group and /etc/hosts. As a result, every machine has the same set of
administration files. For better efficiency, these files or maps are stored in a database format instead
of plain text.

 NFS ( Network File System) is a TCP/IP application
 that has since been implemented on most DOS and Unix systems.
 NFS lets you graft remote filesystems - or portions of them - onto your local namespace.
 Directories on the remote systems appear as part of your local filesystem and all the utilities
  you use for listing and managing files (e.g. ls, cp, mv) operate on the remote files exactly as they
  do on your local files.

  What is the best for you depends on your environment, apps, etc

Author Comment

ID: 10671739
OK, but I'm thinking "Why the hell would I ever use NIS?" OK, maybe it has a database format. Maybe that's it. But otherwise I could mount up an NFS directory with all the files I ever need. No need to request upon log on, push maps, etc.

Expert Comment

ID: 10672032
Realy in your case, you could do that. anyway, i´d like you to
see below advantages /disadvantages of NIS

NIS is fairly easy to maintain without being aware of the internal data formats, you just edit the same "flat" files, and learn one or two new procedures to go with it.
NIS is a very good way to easily maintain a large number of users and groups across a large number of shared systems. These systems have to be configured similarly.
NIS can consume a lot of network bandwidth since NIS doesn't cache data on client machines. Every lookup causes an exchange of network packets. When a master's maps get updated, every slave server is also updated with the new maps. So it's a tradeoff depending on your setup.
NIS is not secure! Outside hosts can pose as a client of your domain and grab your maps. Once they get your password map, a crack program can be run on it to decrypt passwords, opening your system up. For this reason it is fairly important to pick an obscure domain name, and not something like "cmsc" for say the computer science domain.

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

LVL 48

Expert Comment

ID: 10672280
Is NIS also used for the user accounts?

If so, then maybe whoever implemented the initial system thought it would be best to stick with NIS.

Expert Comment

ID: 10672345
Yes i think so
LVL 23

Expert Comment

ID: 10674415
If you are Windows-literate, consider NIS to roughly equivalent to Active Directory or LDAP,
and NFS to be roughly equivalent to network file sharing using SMB.

In other words, NIS and NFS (or AD and SMB file sharing) are very different tools solving
very different problems.

Accepted Solution

glassd earned 800 total points
ID: 10686570
>  But otherwise I could mount up an NFS directory with all the files I ever need. No need to request upon log on, push maps, etc.

Many of the standard authentication process look for the standard files in set places (/etc/passwd, /etc/hosts, etc/group, etc/hosts for example). They will not access files in other places, but will access other methods of providing this info (nis, ldap, dns), so you cannot provide this information using an NFS mount.

In fact one set of NIS maps often used are the automount maps, which provide the NFS mount information to the clients, so avoiding any static mounts in the fstab file. Here you are using NIS to manage NFS for you.

You can set up a NIS server to serve out the basic maps in a matter of minutes. Then you only have to maintain the maps on the server. Up to you.
LVL 51

Assisted Solution

ahoffmann earned 200 total points
ID: 10687051
> Any thoughts on when to use NIS and when to use NFS?
'cause NFS relies on proper settings in /etc/{nsswitch.conf,hosts,passowd,group,networks] (and probably some more)

Hence to use NFS, you first need proper other files, and these are the files served by NIS, usually.
From an admin point of view, NIS then can also serve other files, you don't need NFS also.

Also keep in mind that NFS relies on permanent network connection, does not work if the connection temporarily is broken, while NIS only needs the network while polling/pushing.

Expert Comment

ID: 10688063

depends a little on the NFS settings. Setting bg,soft will allow a client to boot if it can't establish a connection, and will allow the connection to be broken temporarily. Further, if automount is employed then any unused connections will be dropped after a timeout and remade transparently when required.

I think in most configurations, when there are more than one or two machines, NIS (or LDAP), together with NFS for all the data serving (using automount) give a flexible and easily managed installation.
LVL 51

Expert Comment

ID: 10689606
booting from NFS is something different than (auto)mounting, 'cause it's root access anyway
automounting does not help for broken connection, as long as it happens you get "Stale NFS file handle"
It's a pain if a local app tries to read its config files from NFS which is down somehow (doesn't matter if permanent or automounted)

Again: NIS copies the files local, so as long as the box is running anything is available (not talking of local disk problems).
Do you see the difference?

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question