squeak!
Syllabus Homepage
Course Overview
Course resources
Day 1
Day 2
Day 3
Day 4
Day 5
Day 6
Day 7
Day 8
Common errors
Internet Glossary
About Your Instructor
Credits: This site powered by the vi text editor, apache webserver, perl scripting, and Debian linux.
squeak!

solaris8 II - Day 2

Goals

In this session you will learn some basics on which NIS is based:
  • network your box
  • create a master NIS server
  • create a slave NIS server
  • create a client NIS server

POST

This exercise will be done on a networked box.
  1. why use NIS at all?
  2. what are some downsides/restrictions to using NIS?
  3. what is an NIS domain?
  4. which command do you use to find out the default NIS domain on your networked host?
  5. which command do you use to find out the NIS server your host is bound to?
  6. which command do you use to dump the contents of an NIS map? (passwd, for example)
  7. which command do you use to list the NIS passwd record for the user admin09?
  8. what is the relationship between passwd and passwd.byname?
  9. what is the difference between passwd.byname and passwd.byuid?
  10. how many master servers does a domain have?
  11. why?
  12. how many slave servers does a domain typically have?
  13. why?
  14. what is the orthodox client:server ratio if all boxes are the same?
  15. what kinds of factors might skew this ratio up or down?
  16. in what format are maps stored?
  17. what are some distinguishing features of that format?
  18. what are some limitations of that format?
  19. how do the maps get produced from the ASCII configuration files?
  20. how does the system keep the files and maps updated?
  21. why are NIS binaries frequently named yp*

network your box

May need to punt: sys-unconfig, reboot?

  1. check what the NIS master believes your box is named
  2. set up your config files
    • /etc/hostname.interface should contain hostname. Check dmesg for hints on your interface name.
    • /etc/hosts should contain IP hostname. Note that this may be a link to /etc/inet/hosts. Use ls -li to see for sure.
    • /etc/nodename should contain hostname.
    • /etc/defaultrouter should contain the ip (or host if in the hostfile) of the gateway
  3. stop/start the network init scripts in order. This kind of thing would work well in a shell script, no?
  4. test to see if you have got it
    1. ping a host on your network by IP. This tells you if your ethernet interface is working.
    2. ping a host outside your network by IP. This tells you if your gateway is working.
    3. ping a host outside your network by hostname. This tells you if your name lookup is working.
    4. crowing glory: browse the web

    build an NIS master

    This one will be the hardest. Luckily, the slaves will be able to leverage what you're doing here, so you don't have to duplicate it.
    1. verify your servers have the SUNWypu and SUNWypr software packages installed. May not be required for client.
    2. pick an NIS domain name
    3. create a de-duped passwd source file in /var/yp. Remove root. pp.670-71
    4. create a de-duped shados source file in /var/yp. Remove root. pp.670-71
    5. create a de-duped group source file in /var/yp. pp.671-2
    6. create a de-duped hosts source file in /var/yp. pp.672.
    7. backup and edit the /var/yp/Makefile to look at the /var/yp directory.
    8. change over to nsswitch.files p.675.
    9. ypinit -m (ie, master)
    10. change over to nsswitch.nis p.675.
    11. gut the local pass/shadow files so those accounts will be delivered via NIS.
    12. ypstop to stop if you need
    13. ypstart to start if you need

    build an NIS client

    1. gut passwd, shadow, and group files
    2. domainname domain to set the domain
    3. domainname > /etc/defaultdomain to make it stick
    4. cp /etc/nsswitch.nis /etc/nsswitch.con to set name service to NIS
    5. ypinit -c to initialize NIS in client mode. Handles everything for you.

    build an NIS slave

    1. edit hosts to add in name/ip of all servers
    2. set up as a client as above
    3. go to /var/yp
    4. see if ypbind is running; if so kill it p.683.
    5. restart with ypstart
    6. set up the box as a slave: ypinit -s master
    7. ypstop,ypstart

    Homework


    http://www.mousetrap.net/syllabus/solaris8-nfs/day2.html
    $Id: day2.orb,v 1.12 2002/11/14 18:11:47 mouse Exp $


© 1994-2002 jason carr.
distributed under the terms of the GNU Free Documentation License.

jason carr

Reminders

  • Classroom temperature can be wildly variable. Dress lightly and bring layers.
  • your username is based on the class title and the last two digits of your workstation's hostname.
  • remember to take your work with you.