The NIS Server ypserve Daemon and Maps Location Part 2

Posted by arlene

NIS Slaves

NIS slaves hold exact duplicates of NIS maps as the master server. The slave also runs the same ypse ry daemon. The only difference between the two servers is that only the slave answers client requests; the slave doesn’t make any changes to the NIS maps. Only the master server can update the NIS

maps. When the master server makes a change to the maps, it then propagates the changes to all the slave servers in the NIS domain.

Setting Up Slaves

Creating a slave server is similar to creating the master server. First, set the NIS domain name by typing domainname at the command line. After setting the NIS domain name, start the ypbind server process by entering this:

ypbind

And then enter the following on the slave server-to-be:

ypinit -s NISmaster

Living the Web 2.0The - s option specifies that you are setting up a slave server, followed by the NIS domain master server name. After the slave server is initialized, the master server transfers all the NIS domain information to the slave. During the setup of the slave server, it does not look at its local / etc files to create the NIS maps. The slave server has only the information that is stored in the maps on the master server.

Deciding when to create a slave server should be done during the initial planning phase of setting up the NIS network. Although growing networks don’t exactly grow according to plan, it is possible to add slave servers later. If you add a slave server after the initial setup of the master server, you’ll need to add the new slave’s hostname to the ypserver s map file.

Starting and Stopping the NIS Service on Slave Servers

Starting and stopping all YP processes is a simple task. These commands may be used online to start or stop the services. The following line will cause the YP processes to all stop running:

/etc/init.d/yp stop

To start all YP processes, use the following command:

/etc init.d/yp start

Now it can’t be simpler than that, after all you’ve gone through to get this system up and running!

Changing NIS Maps

You can make changes to the normal system files (that is, /etc/ passwd) on the NIS master server. After you make these kinds of changes, set your default directory to be / var /yp, and then execute the command make mapname, where mapname is the name of the map being modified.

To update the system after making changes to the mak ef e, you’ll need to stop the YP processes, make the changes, and restart NIS. You can make changes to the makefile to add or remove maps. Use the same start/stop commands described in the preceding section for this purpose.

Pushing Modifications to NIS Slave Servers

After you’ve made modifications on the master NIS server, the changes must be sent to all other slaw servers so that the databases can be kept in sync. The mak ef ile utility uses the yppush command to send these map changes to the affected servers. The process is accomplished by sending a message to the ypserve daemon. The ypserve daemon that resides on the slave server then starts up another process using the ypxfr r utility. This utility establishes communication with the ypsf rd daemon that runs on the master NIS server to see whether any changes need to be made. If so, the yppush program sends the map changes. If they are successfully applied to the slave server, it returns a successful status message to yppush.

Note that yppush sends only maps that have changed and that already exist on the slave servers. If you create new maps on the master NIS server that don’t yet exist on the slave NIS servers, use the command ypxf r by itself on the command line to do this. For troubleshooting purposes you can check the results of the command by viewing the log file named /var/yp/ypxf r log.

Other Useful NIS YP Commands

Although the documentation for your system contains a lot of other tasks you can perform using NIS, 1! this has only touched on the basics. However, a few other useful commands that you’ll find in most implementations of NIS include the following:

  • ypcat map filenameThis command lists the values stored in a map file. If you want to list the keys for the map file values, use the option -k in this syntax directly after the ypcat command.

Possibly related posts: (automatically generated)
The NIS Server ypserve Daemon and Maps Location Part 2

4 Responses to “The NIS Server ypserve Daemon and Maps Location Part 2”

  1. Since the web host doesn t do any hand holding ( shooting) you ll pay less for an unmanaged, dedicated server. … Dedicated IP

  2. Perfect for home or office, these Illuminated Wall maps are an ideal way to display your locations or travels throughout the USA and World. … Maps Com December

  3. Additional terms and conditions for the registration of .Moby domains the .Moby domain costs just $19. … Domain Hosting

  4. ) ” The Power Behind business(tm)&quote, has announced that they have teamed with Overture to offer iPowerWeb’s Small and Medium Size Business Members $50.00 in FREE advertising credit. … Free Domains

Leave a Reply

LogoAlexa CounterFeedBurner Counter