Tille - I can see you, read those man pages!   Tille's Site

Setting up NIS in 10 steps

Network Information System (used to be Yellow Pages) basics for JumpStart configuration. Use LDAP for all other purposes.

Setting up the master server:

  1. Define your NIS domainname:

    domainname your_domain > /etc/defaultdomain
  2. Edit or create the /etc/ethers file (see the man page, should contain mac address and hostname per client). This is only necessary when you are going to use this NIS server as a JumpStart server.

  3. Check that you have /etc/locale and /etc/timezone. See the man pages for possible choices, e.g.:

    promt:> cat locale
    your_domain	en_US
    prompt:> cat timezone
    MET	your_domain

    These files are also needed for Jumpstart using NIS.

  4. Create a source file directory for NIS, e.g. /etc/nis.

    Place all the files needed for the JumpStart in this directory:

    cd /etc
    cp bootparams ethers hosts locale netgroup netmasks timezone nis/

    This way, we don't have to work on original data from /etc and files from other hosts can be imported.

  5. Edit the /var/yp/Makefile file: DIR and PWDIR should point to the location of your source file directory. Check the all target. You can use the timezone target as a template for adding locale.time. This is needed for JumpStarting clients without intervention. When customizing the NIS maps, don't forget to add a .time directive and a reference to the file to process at the bottom of the Makefile.

  6. Initialize the NIS master server:

    ypinit -m

    Answer the questions this asks.

  7. Upon initializing the server, the make command will be called to create the NIS tablespaces from the Makefile. If the tables are made without any fatal errors, everything should be OK, however messy the output. If all the tables are updated, don't worry about warnings. When changing the NIS tablespaces, run /usr/ccs/bin/make manually after removing /var/yp/*.time.

  8. Check that /var/yp/your_domain is populated with pairs of files (.pag and .dir, .dir may be empty).

  9. Run /usr/lib/netsvc/yp/ypstart. This should start 5 daemon processes: ypserv, ypbind, rpc.yppasswd, ypxfrd and rpc.ypupdated.

  10. Test your server running the ypwhich command, eventually with the -m option, this should show your NIS domain and, with the option, the NIS maps.

Setting up clients

Normally not advised these days any more, but if you should be confronted with problems in NIS installations that are not migrated to LDAP yet, check the following:

  1. The /etc/nsswitch.conf file should reflect the use of a NIS nameservice next to the normal files and, eventually, dns:

    passwd:     files nis
    group:      files nis
    hosts:      files nis dns
    ipnodes:    files
    networks:   files nis	
    protocols:  files nis
    rpc: 	    files nis
    ethers:     files nis
    netmasks:   files nis
    bootparams: files nis
    publickey:  files nis
    netgroup:   files nis
    automount:  files nis
    aliases:    files nis
    services:   files nis
    sendmailvars:   files
    printers:   user files nis
    auth_attr:  files nis
    prof_attr:  files nis
    project:    files nis
  2. The /etc/hosts file on the client should contain entries for all NIS master and slave servers.

  3. Set the domainname, as for the server.

  4. Has the client been initialized? Check the existence of /var/yp/binding/your_domain/ypservers. If the information in this file is not correct, remove it and run ypinit -c.

  5. Is ypbind running? If not, start the daemon using the /usr/lib/netsvc/yp/ypstart program.

© 1995-2010 Machtelt Garrels - tille - Powered by vIm - Best viewed with your eyes - Validated by W3C - Last update 20100511