Solved

what's the advantage of NIS over NFS?

Posted on 2004-03-24
10
1,715 Views
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?
0
Comment
Question by:rfr1tz
  • 3
  • 2
  • 2
  • +3
10 Comments
 
LVL 6

Expert Comment

by:bira
Comment Utility
Hi

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
0
 
LVL 3

Author Comment

by:rfr1tz
Comment Utility
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.
0
 
LVL 6

Expert Comment

by:bira
Comment Utility
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.
0
 
LVL 48

Expert Comment

by:Tintin
Comment Utility
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.
0
 
LVL 6

Expert Comment

by:bira
Comment Utility
Yes i think so
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 23

Expert Comment

by:brettmjohnson
Comment Utility
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.
0
 
LVL 7

Accepted Solution

by:
glassd earned 200 total points
Comment Utility
>  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.
0
 
LVL 51

Assisted Solution

by:ahoffmann
ahoffmann earned 50 total points
Comment Utility
> 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.
0
 
LVL 7

Expert Comment

by:glassd
Comment Utility
ahoffmann

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.
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
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?
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
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.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now