what's the advantage of NIS over NFS?

Posted on 2004-03-24
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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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.
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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 200 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 50 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

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

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

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

636 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