home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / HOWTO / NIS-HOWT < prev    next >
Encoding:
Text File  |  1995-04-20  |  22.3 KB  |  778 lines

  1.   The Linux NIS(YP)/NIS+/NYS HOWTO
  2.   Andrea Dell'Amico, Mitchum DSouza, Erwin Embsen
  3.   Version 0.3, Last Modified on June 16, 1994
  4.  
  5.   1.  Glossary of Terms
  6.  
  7.   In this document a lot of acronyms are used. Here are the most
  8.   important acronyms and a brief explanation:
  9.  
  10.  
  11.      DBM
  12.         DataBase Management, a library of functions which maintain key-
  13.         content pairs in a data base.
  14.  
  15.  
  16.      DLL
  17.         Dynamically Linked Library, a library linked to an executable
  18.         program at run-time.
  19.  
  20.  
  21.      FTP
  22.         File Transfer Protocol, a protocol used to transfer files
  23.         between two computers.
  24.  
  25.  
  26.      NIS
  27.         Network Information Service, a service that provides
  28.         information, that has to be known throughout the network, to all
  29.         machines on the network.
  30.  
  31.  
  32.      nsl
  33.         network services library, a library of network service calls
  34.         (socket, bind, etc...) on SYSV Unixes.
  35.  
  36.  
  37.      NYS
  38.         This is a mutation of the word NIS and represents the NIS+
  39.         services library written by Peter Eriksson (pen@lysator.liu.se).
  40.  
  41.  
  42.      RPC
  43.         Remote Procedure Call. RPC routines allow C programs to make
  44.         procedure calls on other machines across the network.
  45.  
  46.  
  47.      YP Yellow Pages(tm), a registered trademark in the UK of British
  48.         Telecom plc.
  49.  
  50.  
  51.      TCP-IP
  52.         Transmission Control Protocol/Internet Protocol. It's a data
  53.         communication protocol often used on Unix machines.
  54.  
  55.  
  56.  
  57.   1.1.  Some General Information
  58.  
  59.   The next three lines are quoted from the Sun(tm) System & Network
  60.   Administration Manual:
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.       "NIS was formerly known as Sun Yellow Pages (YP) but
  68.        the name Yellow Pages(tm) is a registered trademark
  69.        in the United Kingdom of British Telecom plc and may
  70.        not be used without permission."
  71.  
  72.  
  73.  
  74.  
  75.   NIS stands for Network Information Service. It's purpose is to provide
  76.   information, that has to be known throughout the network, to all
  77.   machines on the network. Information likely to be distributed by NIS
  78.   is:
  79.  
  80.  
  81.   o  login names/passwords/home directories (/etc/passwd)
  82.  
  83.   o  group information (/etc/group)
  84.  
  85.   So, for example, if your password entry is recorded in the NIS passwd
  86.   database, you will be able to login on all machines on the net which
  87.   have the NIS client programs running.
  88.  
  89.   Sun is a trademark of Sun Microsystems, Inc. licensed to SunSoft, Inc.
  90.  
  91.  
  92.  
  93.   2.  Introduction
  94.  
  95.   More and more, Linux machines are installed as part of a network of
  96.   computers. To simplify network administration, most networks (mostly
  97.   Sun-based networks) run the Network Information Service. Linux
  98.   machines can take full advantage of existing NIS service or provide
  99.   NIS service themselves.
  100.  
  101.   This document tries to answer questions about setting up
  102.   NIS(YP)/NIS+/NYS on your Linux machine. Don't forget to read section
  103.   4.1, The RPC Portmapper.
  104.  
  105.  
  106.  
  107.   2.1.  New versions of this document
  108.  
  109.   New versions of this document will be posted periodically (about every
  110.   month) to the newsgroups comp.os.linux.announce and
  111.   comp.os.linux.misc.  The document is archived on a number of Linux FTP
  112.   sites, including sunsite.unc.edu in /pub/Linux/docs/HOWTO.
  113.  
  114.  
  115.  
  116.   2.2.  Disclaimer
  117.  
  118.   Although this document has been put together to the best of our
  119.   knowledge it may, and probably does contain errors. Please read any
  120.   README files that are bundled with any of the various pieces of
  121.   software described in this document for more detailed and accurate
  122.   information. We will attempt to keep this document as error free as
  123.   possible.
  124.  
  125.  
  126.  
  127.   2.3.  Feedback
  128.  
  129.   If you have any comments, questions or suggestions please email them
  130.   to erwin@nioz.nl. Definitely contact him if you find errors or obvious
  131.   omissions.
  132.  
  133.   2.4.  Acknowledgements
  134.  
  135.   We would like to thank all the people who have contributed (directly
  136.   or indirectly) to this document. In alphabetical order:
  137.  
  138.  
  139.  
  140.        Andrea Dell'Amico (adellam@di.unipi.it)
  141.        Mitchum DSouza    (m.dsouza@mrc-apu.cam.ac.uk)
  142.        Erwin Embsen      (erwin@nioz.nl)
  143.        Byron A Jeff      (byron@cc.gatech.edu)
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.   3.  NIS or NIS+ (aka. NYS) ?
  151.  
  152.   The choice between NIS and NIS+ is a question of flexibility vs.
  153.   maturity.  Generally NIS has been around longer and sometimes suffers
  154.   from its age, inflexibility, and administration difficulties. NIS+
  155.   addresses all these problems, provides more flexibility, is easier to
  156.   set up and administer, and is backward compatable with NIS servers and
  157.   thus recommended for first time users setting up Linux machines within
  158.   a NIS enviroment. However, unlike NIS which is integrated into the
  159.   standard C library, NIS+ requires you to relink all deamons and
  160.   clients wishing to access these services with the NYS library libnsl.a
  161.   (similarly to SYSV - or the shared library libnsl.so). However, once
  162.   clients and deamons are compiled with NYS, they bypass the
  163.   /etc/host.conf mechanism totally (for host lookups) and determine
  164.   their resolving mechanism via the /etc/nsswitch.conf file.
  165.  
  166.  
  167.  
  168.   4.  How it works
  169.  
  170.   Within a network there must be at least one machine acting as a NIS
  171.   server. If there are more machines in the network providing NIS, then
  172.   one machine is said to be the master NIS server and all the other NIS
  173.   servers are so-called slave NIS servers. Slave servers only have
  174.   copies of the NIS databases and receive these copies from the master
  175.   NIS server whenever changes are made to the master's databases.
  176.   Depending on the number of machines in your network and the
  177.   reliability of your network, you might decide to install one or more
  178.   slave servers.  Whenever a NIS server goes down or is too slow in
  179.   responding to requests, a NIS client connected to that server will try
  180.   to find one that is up or quicker.
  181.  
  182.   With NYS, however, the /etc/nsswitch.conf file determines which host
  183.   you want to go to for a particular service (as there is no binding
  184.   deamon `ypbind') if your primary NIS server is not running or is too
  185.   slow to respond. This adds more flexibility as you are able to choose
  186.   on a per-service basis which host should answer what query. For
  187.   example, you may specify that if the master server `A' is down then,
  188.   for host queries, go to server `B' and for password queries go to
  189.   server `C' etc..
  190.  
  191.   NIS databases are in so-called DBM format, derived from ASCII
  192.   databases.  For example, the files /etc/passwd and /etc/group can be
  193.   directly converted to DBM format using ASCII-to-DBM translation
  194.   software ('dbload', it's included with the server software). The
  195.   master NIS server should have both, the ASCII databases and the DBM
  196.   databases.  Slave servers or client machines will be notified of any
  197.   change to the NIS maps, (via the "ypbind" deamon), and automatically
  198.   retrieve the necessary changes in order to synchronize their
  199.   databases. The author of the YP clients for linux has informed us that
  200.   the newest ypbind (from yp-clients.tar.gz) is able to get the server
  201.   from a configuration file - thus not need to broadcast.
  202.  
  203.  
  204.  
  205.   5.  What you need to set up NIS?
  206.  
  207.   5.1.  The RPC Portmapper
  208.  
  209.   To run any of the software mentioned below you will need to run the
  210.   program /usr/sbin/rpc.portmap. Some Linux distributions already have
  211.   the code in /etc/rc.d/rc.inet2 to start up this daemon.  All you have
  212.   to do is comment it out and reboot your Linux machine to activate it.
  213.  
  214.   The RPC portmapper (portmap(8c)) is a server that converts TCP/IP
  215.   protocol port numbers into RPC program numbers. It must be running in
  216.   order to make RPC calls (which is what the NIS client software does).
  217.   When an RPC server is started (like a NIS server program), it will
  218.   tell portmap what port number it is listening to, and what RPC program
  219.   numbers it is prepared to serve. When a client wishes to make an RPC
  220.   call to a given program number, it will first contact portmap on the
  221.   server machine to determine the port number where RPC packets should
  222.   be sent.
  223.  
  224.   Normally, standard RPC servers are started by inetd(8C), so portmap
  225.   must be started before inetd is invoked.
  226.  
  227.  
  228.  
  229.   5.2.  Determine whether you are a Server, Slave or Client.
  230.  
  231.   To answer this question you have to consider two cases:
  232.  
  233.  
  234.   1. Your machine is going to be part of a network with existing NIS
  235.      servers
  236.  
  237.   2. You do not have any NIS servers in the network yet
  238.  
  239.   In the first case, you only need the client programs (ypbind, ypwhich,
  240.   ypcat, yppoll, ypmatch). The most important program is ypbind. This
  241.   program must be running at all times, that is, it should always appear
  242.   in the list of processes. It's a so-called daemon process and needs to
  243.   be started from the system's startup file (eg. /etc/rc.local).  As
  244.   soon as ypbind is running, your system has become a NIS client.
  245.  
  246.   In the second case, if you don't have NIS servers, then you will also
  247.   need a NIS server program (usually called ypserv). Section 6 describes
  248.   how to set up a NIS server on your Linux machine using the 'ypserv'
  249.   implementation by Peter Eriksson (pen@lysator.liu.se). Note that this
  250.   implementation does NOT support the master-slave concept talked about
  251.   in section 3. Using this software, all your NIS servers will be master
  252.   servers.
  253.  
  254.  
  255.  
  256.   5.3.  The Software
  257.  
  258.   The system library "/usr/lib/libc.a" (version 4.4.2 and better) or the
  259.   shared library "/usr/lib/libc.sa" and its related DLL contain all
  260.   necessary system calls to succesfully compile the NIS client and
  261.   server software. Some people reported that NIS only works with
  262.   "/usr/lib/libc.a" version 4.5.21 and better so if you want to play it
  263.   safe don't user older libc's.  The NIS client software can be obtained
  264.   from:
  265.          Site                   Directory                        File Name
  266.  
  267.          ftp.uni-paderborn.de   /pcsoft2/linux/local/yp          yp-clients.tar.gz
  268.          nic.funet.fi           /pub/OS/Linux/BETA/NYS           yp-clients.tar.gz
  269.          sunsite.unc.edu        /pub/Linux/system/Network/admin  yp-clients.tar.gz
  270.  
  271.  
  272.  
  273.  
  274.   Once you obtained the software, please follow the instructions which
  275.   come with the software.
  276.  
  277.  
  278.  
  279.   5.4.  Setting up a NIS Client
  280.  
  281.   Assuming you have succesfully compiled the software you are now ready
  282.   to install the software. A suitable place for the ypbind daemon is the
  283.   directory /usr/sbin.
  284.  
  285.   You'll need to do this as root of course. The other binaries (ypwhich,
  286.   ypcat, yppoll, ypmatch) should go in a directory accessible by all
  287.   users, for example /usr/etc or /usr/local/bin.  It might be a good
  288.   idea to test ypbind before incorporating it in /etc/rc.d/rc.inet2.
  289.  
  290.   To test ypbind do the following:
  291.  
  292.  
  293.   o  Make sure you have your domain name set. If it is not set then
  294.      issue the command:
  295.  
  296.  
  297.  
  298.                    /bin/domainname my.domain
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.   where my.domain is the domain your machine is part of.
  306.  
  307.   o  Start up "/usr/sbin/rpc.portmap" if it is not already running.
  308.  
  309.   o  Create the directory "/var/yp" if it does not exist.
  310.  
  311.   o  Start up "/usr/sbin/ypbind"
  312.  
  313.   o  Use the command "rpcinfo -p localhost" to check if ypbind was able
  314.      to register its service with the portmapper. The rpcinfo should
  315.      produce something like:
  316.  
  317.  
  318.  
  319.               program vers proto   port
  320.                100000    2   tcp    111  portmapper
  321.                100000    2   udp    111  portmapper
  322.                100007    2   udp    637  ypbind
  323.                100007    2   tcp    639  ypbind
  324.                300019    1   udp    660
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.   o  You may also run "rpcinfo -u localhost ypbind". This command should
  332.      produce something like:
  333.  
  334.  
  335.  
  336.                program 100007 version 2 ready and waiting
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.   Finally, do not forget that for host lookups you must set (or add)
  344.   "nis" to the lookup order line in your /etc/host.conf file. Please
  345.   read the manpage `resolv+.8' for more details.
  346.  
  347.   At this point you should be able to use NIS client programs like
  348.   ypcat, etc...  For example, "ypcat passwd" will give you the entire
  349.   NIS password database.
  350.  
  351.   IMPORTANT: If you skipped the test procedure then make sure you have
  352.   set the domain name, and created the directory:
  353.  
  354.  
  355.  
  356.            /var/yp
  357.  
  358.  
  359.  
  360.  
  361.   This directory MUST exist for ypbind to start up succesfully.
  362.  
  363.   If the test worked you may now want to change the files /etc/rc.d/rc.M
  364.   and /etc/rc.d/rc.inet2 on your system so that ypbind will be started
  365.   up at boot time and your system will act as a NIS client. Edit the
  366.   file /etc/rc.d/rc.M and look for the commands which set the domain
  367.   name.  Change the domain name into the name of your domain. Also, edit
  368.   the file /etc/rc.d/rc.inet2, comment out the lines which start up the
  369.   rpc.portmap daemon, and add the following lines just after the place
  370.   where rpc.portmap is started:
  371.  
  372.  
  373.  
  374.            #
  375.            # Start the ypbind daemon
  376.            #
  377.            if [ -f ${NET}/ypbind -a -d /var/yp ]; then
  378.                echo -n " ypbind"
  379.                ${NET}/ypbind
  380.            fi
  381.  
  382.  
  383.  
  384.  
  385.   Unlike Sun's implementation of NIS you do not need to edit /etc/passwd
  386.   and /etc/group to take advantage of NIS. Sun's implementation needs a
  387.   line "+:*:0:0:::" in /etc/passwd and a line "+:*:0:" in /etc/group to
  388.   tell NIS to search the NIS password and group databases.
  389.  
  390.   Well, that's it. Reboot the machine and watch the boot messages to see
  391.   if ypbind is actually started.
  392.  
  393.   IMPORTANT: Note that the netgroup feature is not yet implemented.
  394.   Netgroups allow access control for every machine and every user in the
  395.   NIS domain, and they require an entry like:
  396.  
  397.            +@this_machine_users
  398.  
  399.  
  400.  
  401.  
  402.   in /etc/passwd. At this moment, every user in the NIS password
  403.   database can access your linux machine if you run "ypbind".
  404.  
  405.  
  406.  
  407.   6.  What you need to set up NYS?
  408.  
  409.   6.1.  Determine whether you are a Server, Slave or Client.
  410.  
  411.   To answer this question you have to consider two cases:
  412.  
  413.  
  414.   o  Your machine is going to be part of a network with existing NIS
  415.      servers
  416.  
  417.   o  You do not have any NIS servers in the network yet
  418.  
  419.   In the first case, you only need to relink all client and deamon
  420.   programs with the NYS library libnsl.so (or statically link them with
  421.   libnsl.a). This means adding the line
  422.  
  423.  
  424.  
  425.            LIBS=-lnsl
  426.  
  427.  
  428.  
  429.  
  430.   to your Makefile signifing you want to link the Network Services
  431.   Library.
  432.  
  433.   Basically all network deamons and the `login' program need to be
  434.   recompiled. However an alternate strategy is now available. See
  435.   section 5.5 below on how to make your binaries NYS aware.
  436.  
  437.   Similarly like in the case of the standard NIS, if you don't have NIS
  438.   servers, then you will also need a NIS server program (usually called
  439.   ypserv) and you have to designate one of the machines in your network
  440.   as a master NIS server. Again, you might want to set up at least one
  441.   slave server as well (Note: not applicable to ypserv on Linux).
  442.  
  443.  
  444.  
  445.   6.2.  The Software
  446.  
  447.   You need to retrieve and compile the NYS services library libnsl.so.
  448.   If you don't have the DLL tools installed you may retrieve a
  449.   precompiled shared, static and stub library from the same site
  450.   mentioned below.
  451.  
  452.   The NYS library (source and precompiled version)  can be obtained
  453.   from:
  454.  
  455.  
  456.  
  457.            Site              Directory                      File Name
  458.  
  459.            nic.funet.fi      /pub/OS/Linux/BETA/NYS         nys-0.27.1.tar.gz
  460.            nic.funet.fi      /pub/OS/Linux/BETA/NYS/lib     libnsl.so.1.0.a26
  461.  
  462.  
  463.   Precompiled `login' and `su' programs may also be fetched from
  464.  
  465.  
  466.  
  467.            Site              Directory                      File Name
  468.  
  469.            nic.funet.fi      /pub/OS/Linux/BETA/NYS/bin     login
  470.            nic.funet.fi      /pub/OS/Linux/BETA/NYS/bin     su
  471.  
  472.  
  473.  
  474.  
  475.   Similarly, example configuration files may be retrieved from
  476.  
  477.  
  478.  
  479.            Site              Directory                      File Name
  480.  
  481.            nic.funet.fi      /pub/OS/Linux/BETA/NYS/etc     *conf
  482.  
  483.  
  484.  
  485.  
  486.   For compilation of the nsl library, please follow the instructions
  487.   which come with the software. If you wish to compile the shared DLL
  488.   library you must have the DLL tools installed in the standard place
  489.   (/usr/dll). The DLL tools (the package tools-2.11.tar.gz) can be
  490.   obtained from many sites.
  491.  
  492.  
  493.  
  494.   6.3.  Setting up a NYS Client
  495.  
  496.   Unlike NIS, there is no setting up required for a NYS client. All that
  497.   is required is that the configuration files (/etc/yp.conf,
  498.   /etc/nis.conf) point to the correct servers for their information. See
  499.   the examples provided with the source code.
  500.  
  501.  
  502.  
  503.   6.4.  The nsswitch.conf File
  504.  
  505.   The Network Services switch file /etc/nsswitch.conf determines the
  506.   order of lookups performed when a certain piece of information is
  507.   requested, just like the /etc/host.conf file which determines the way
  508.   host lookups are performed. Again, look at at the example file
  509.   provided in the source distribution. For example, the line
  510.  
  511.  
  512.  
  513.            hosts: files nis dns
  514.  
  515.  
  516.  
  517.  
  518.   specifies that host lookup functions should first look in the local
  519.   /etc/hosts file, followed by a NIS lookup and finally thru the domain
  520.   name service (/etc/resolv.conf and named), at which point if no match
  521.   is found an error is returned.
  522.  
  523.  
  524.   5.5. Making your binaries NYS aware
  525.  
  526.   Instead of relinking each binary with the NYS library (libnsl.so), a
  527.   cleaner solution has been achieved by providing the user with the
  528.   ability to build a NYS aware libc. This means all you need to do is
  529.   recompile a new libc and replace your existing /lib/libc.so.x.y.z for
  530.   all (non-static compiled) programs to be NYS aware.
  531.  
  532.   This merge also gives you the advantage over the "standard" YP
  533.   implementation in the linux libc in that it allows transparent shadow
  534.   passwords support (via the /etc/nisswitch.conf file).
  535.  
  536.   Follow these simple steps to rebuild a NYS aware libc.
  537.  
  538.  
  539.   o  Make sure you have the latest DLL tools installed. Refer to the the
  540.      GCC-FAQ for more info on where to get this.
  541.  
  542.   o  Get the latest libc sources. (again see GCC-FAQ)
  543.  
  544.   o  Get the latest nys sources from
  545.  
  546.  
  547.  
  548.                  ftp.lysator.liu.se:/pub/NYS
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.   and extract it under this libc-linux source directory.  The current
  556.   NYS distribution is "nys-0.27.1.tar.gz".
  557.  
  558.   o  Do the ./configure as before and first answer `n' to the question
  559.  
  560.  
  561.  
  562.                  Values correct (y/n) [y] ?
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.   Then go thru all the other questions and the last question will now be
  570.  
  571.  
  572.  
  573.                  Build a NYS libc from nys-0.27 (y default) ?
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.   answer 'y' to this.
  581.  
  582.   o  Then issue the command
  583.  
  584.  
  585.  
  586.                  % make
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.   The library generated after compilation is named something like
  594.  
  595.            libc.so.4.5.26
  596.  
  597.  
  598.  
  599.  
  600.   and placed under the directory jump/libc-nys. To install this library
  601.   I would avdise copying it to /lib with a name lexiographically greater
  602.   than the version number it currently has. Just appending the letter
  603.   "a" should do the trick.  For example:
  604.  
  605.  
  606.  
  607.            % cp jump/libc-nys/libc.so.4.5.26 /lib/libc.so.4.5.26a
  608.  
  609.  
  610.  
  611.  
  612.   Alternatively I append "nys" to it so I can quickly identify it.  Now
  613.   run the command
  614.  
  615.  
  616.  
  617.            % ldconfig
  618.  
  619.  
  620.  
  621.  
  622.   which will reset your cache to use the new library. The dynamic linker
  623.   strategy may be examined with the command 'ldconfig -p'.
  624.  
  625.   That's basically it. All your programs should now be NYS aware. Please
  626.   note that usually the program "login" is compiled static and thus
  627.   cannot access the new NYS functions from the NYS aware libc. You must
  628.   either recompile "login" without the -static flag, or else statically
  629.   link it to the libnsl.a library.
  630.  
  631.  
  632.  
  633.   7.  Setting up a NYS Server
  634.  
  635.   7.1.  The Server Program ypserv
  636.  
  637.   The NIS/NYS server software can be found on:
  638.  
  639.  
  640.  
  641.            Site                Directory                          File Name
  642.  
  643.            ftp.lysator.liu.se  /pub/NYS                           ypserv-0.11.tar.gz
  644.            ftp.univie.ac.at    /unix/system/linux/funet/BETA/NYS  ypserv-0.11.tar.gz
  645.            mcsun.eu.net        /os/linux/BETA/NYS                 ypserv-0.11.tar.gz
  646.  
  647.  
  648.  
  649.  
  650.   The server setup is the same for both NIS and NYS.
  651.  
  652.   Compile the software to generate the 'ypserv', 'dbcat' and 'dbload'
  653.   programs.  Firstly, determine what files you require to be available
  654.   via NIS/NYS and then add or remove the appropriate entries to the
  655.   ypMakefile. Now build the DBM files by
  656.  
  657.  
  658.  
  659.            % make -f ypMakefile
  660.  
  661.   Make sure the portmapper (rpc.portmap) is running, and start the
  662.   server 'ypserv'. The command
  663.  
  664.  
  665.  
  666.            % rpcinfo -u localhost ypserv
  667.  
  668.  
  669.  
  670.  
  671.   should output something like
  672.  
  673.  
  674.  
  675.            program 100004 version 2 ready and waiting
  676.  
  677.  
  678.  
  679.  
  680.   That's it, your server is up and running.
  681.  
  682.  
  683.  
  684.   7.2.  The Program yppasswdd
  685.  
  686.   Whenever users change their passwords, the NIS password database and
  687.   probably other NIS databases, which depend on the NIS password
  688.   database, should be updated.  The program "yppasswdd" is a server that
  689.   handles password changes and makes sure that the NIS information will
  690.   be updated accordingly. The software for "yppasswdd" can be found on:
  691.  
  692.  
  693.  
  694.            Site                   Directory        File Name
  695.  
  696.            ftp.lysator.liu.se    /pub/NYS          yppasswdd-0.1.tar.gz
  697.  
  698.  
  699.  
  700.  
  701.   Once you obtained the software, please follow the instructions which
  702.   come with the software.
  703.  
  704.  
  705.  
  706.   8.  Verifying the NIS/NYS Installation
  707.  
  708.   If everything is fine (as it should be), you should be able to verify
  709.   your installation with a few simple commands. Assuming, for example,
  710.   your passwd file is being supplied by NIS/NYS, the command
  711.  
  712.  
  713.  
  714.            % ypcat passwd
  715.  
  716.  
  717.  
  718.  
  719.   should give you the contents of your NIS passwd file. The command
  720.  
  721.  
  722.  
  723.            % ypmatch userid passwd
  724.  
  725.  
  726.  
  727.   (where userid is the login name of an arbitrary user) should give you
  728.   the user's entry in the NIS passwd file. The 'ypcat' and 'ypmatch'
  729.   programs should be included with your distribution of NIS or NYS.
  730.  
  731.  
  732.  
  733.   9.  Common Problems and Troubleshooting NIS
  734.  
  735.   Here are some common problems reported by various users:
  736.  
  737.  
  738.   1. The libraries for 4.5.19 are broken. NIS won't work with it.
  739.  
  740.   2. If you upgrade the libraries from 4.5.19 to 4.5.24 then the su
  741.      command breaks. You need to get the su command from the slackware
  742.      1.2.0 distribution. Incidentally that's where you can get the
  743.      updated libraries.
  744.  
  745.   3. You could run into trouble with NIS and DNS on the same machine.
  746.      My DNS server occasionally will not bring up NIS. Haven't yet
  747.      tracked down why.
  748.  
  749.   4. When a NIS server goes down and comes up again ypbind starts
  750.      complaining with messages like:
  751.  
  752.  
  753.               yp_match: clnt_call:
  754.                           RPC: Unable to receive; errno = Connection refused
  755.  
  756.  
  757.  
  758.  
  759.   and logins are refused for those who are registered in the NIS
  760.   database. Try to login as root and if you succeed, then kill ypbind
  761.   and start it up again.
  762.  
  763.  
  764.  
  765.   10.  Frequently Asked Questions
  766.  
  767.   Most of your questions should be answered by now. If there are still
  768.   questions unanswered you might want to post a message to
  769.  
  770.  
  771.  
  772.            comp.os.linux.help
  773.  
  774.  
  775.  
  776.  
  777.   or contact one of the authors of this HOWTO.
  778.