Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP)
Previous Next

Adding a Slave Server

After NIS is running, you might need to create an NIS slave server that you did not include in the initial list given to ypinit.

To add an NIS slave server:

How to Add a Slave Server

  1. On the master server, become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Chapter 9, Using Role-Based Access Control (Tasks), in System Administration Guide: Security Services.

  2. Change to the NIS domain directory.
    # cd /var/yp/domainname
  3. Disassemble the ypservers file.
    # makedbm -u ypservers >/tmp/temp_file

    The makedbm command converts ypservers from ndbm format to a temporary ASCII file /tmp/temp_file.

  4. Edit the /tmp/temp_file file using a text editor. Add the name of the new slave server to the list of servers. Then save and close the file.
  5. Run the makedbm command with temp_file as the input file and ypservers as the output file.
    # makedbm /tmp/temp_file ypservers

    makedbm then converts ypservers back into ndbm format.

  6. Verify that the ypservers map is correct (since there is no ASCII file for ypservers) by typing the following on the slave.
    slave3# makedbm -u ypservers

    The makedbm command displays each entry in ypservers on your screen.


    Note - If a machine name is not in ypservers, it will not receive updates to the map files because yppush consults this map for the list of slave servers.


  7. On the new NIS slave, become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Chapter 9, Using Role-Based Access Control (Tasks), in System Administration Guide: Security Services.

  8. Set up the new slave server's NIS domain directory.

    Copy the NIS map set from the master server, then start the NIS client. When running the ypinit command, follow the prompts and list the NIS servers in order of preference.

    slave3# cd /var/yp
    slave3# ypinit -c
    slave3# svcadm enable network/nis/client
  9. Initialize this machine as a slave.
    slave3# /usr/sbin/ypinit -s ypmaster

    where ypmaster is the machine name of the existing NIS master server.

  10. Stop the machine running as an NIS client.
    # svcadm disable network/nis/client
  11. Start NIS slave service.
    # svcadm enable network/nis/server
Previous Next

 
 
  Published under the terms fo the Public Documentation License Version 1.01. Design by Interspire