Configuring the Network Infomation Service (NIS) (part4)

To set up the NIS name service master server, perform the following steps:

purchase viagra
buy generic levitra

  1. Determine which machines on your network domain will be NIS servers. There should be one NIS master server, and there can be as many NIS slave servers as needed. All systems within the domain are NIS clients.
  2. Choose an NIS domain name. This is usually less than 32 characters in length. (The maximum length is 256 characters, and it is case sensitive.)
  3. Enter the domainname command to set the local NIS domain.
    # domainname domainname

    For example:

    # domainname classroom.Central.Sun.COM 
  4. Create an /etc/defaultdomain file with the domain name. You must maintain the format established by the original files and update the text files in the /etc directory (all of the files that are used for NIS maps) on the master server with information about the domain.
  5. If the files do not already exist, use the touch command to create zero-length files with the following names: /etc/ethers, /etc/bootparams, /etc/locale, /etc/timezone, /etc/netgroup, and /etc/netmasks. These files are necessary for the creation of the complete set of NIS maps as directed in the Makefile file. When you initialize NIS, you receive error messages for each of these files if they do not exist.
  6. Install an updated Makefile file in the /var/yp directory if you intend to use NIS on the system that functions as your JumpStartTM server. Performing this installation provides entries that create a map for the /etc/locale file, so that the locale information does not have to be provided by the sysidcfg file.
    Note: The lab at the end of this module shows you how to create the updated Makefile file.
  7. Create or populate the /etc/locale file, and make an entry for each domain on your network using the following format:
    domainname     locale

    For example:

    classroom.Central.Sun.COM     en_US
  8. Initialize the master server by using the local /etc files. Enter the ypinit -m command.
    # ypinit -m
    1. When the program prompts you for a list of slave servers and after you complete your list, press Control-D. You can make entries for all slaves now, or you can rerun the ypinit -m command after you determine whether you need more or less slave servers.
    2. The program asks if you want to terminate it on the first fatal error. If you answer n, the procedure reports any error and attempts to complete the creation of the NIS database files. If you answer y, the process aborts with the first error. You can correct the error and restart the ypinit program.
  9. Copy the /etc/nsswitch.nis file to the /etc/nsswitch.conf file. If necessary, modify the file.

    The following example shows the text feedback displayed as the program begins:

    # ypinit -m
    In order for NIS to operate successfully, we have to construct a list of the NIS servers. Please continue to add the names for YP servers in order of preference, one per line. When you are done with the list, type a <control D> or a return on a line by itself.
    next host to add: server1
    next host to add: <Control-D>
    The current list of yp servers looks like this:
    server1
    Is this correct? [y/n: y] y
    Installing the YP database will require that you answer a few questions.
    Questions will all be asked at the beginning of the procedure.
    Do you want this procedure to quit on non-fatal errors? [y/n: n] n
    OK, please remember to go back and redo manually whatever fails. If you don’t, some part of the system (perhaps the yp itself) won’t work.

    Note: If you have to restart the ypinit program, you are prompted to destroy the /var/yp/domainname directory. Answer y.
  10. Start the NIS daemons on the master server with the following command:
    # svcadm enable svc:/network/nis/server:default
  11. If you want to stop the NIS service running on the NIS master, perform the command:
    # svcadm disable svc:/network/nis/server:default

There are a number of commands that you can use to obtain information from and about the NIS database. You can also use these commands to test the functionality of the NIS service. You do not have to be the superuser to use these commands.

The most commonly used NIS commands are:

Common

NIS Commands

Command Description
ypcat Prints values from an

NIS map

ypmatch
Prints the value of one or more keys from an

NIS map

ypwhich
Returns the name of the NIS server that supplies the NIS map services to an

NIS client

Using the ypcat CommandThe following example prints the information from the hosts database.

$ ypcat hosts
192.168.30.30   instructor instructor1
127.0.0.1       localhost loghost
192.168.30.45   sys45
192.168.30.44   sys44
192.168.30.43   sys43
192.168.30.42   sys42
192.168.30.41   sys41

<output truncated>

Using the ypmatch Command

The following example matches individual host entries.

# ypmatch sys41 localhost hosts
192.168.30.41   sys41
127.0.0.1       localhost loghost

The following example matches a specific user in the password database.

# ypmatch user5 passwd
user5:.dJJ.oofIqCLs:4005:10::/export/home/user5:/bin/ksh

Using the ypwhich Command

Perform the ypwhich command to identify the NIS server the client is bound to:

$ ypwhich 
sys44

When used with the -m option, the ypwhich command provides a list of all databases and the name of the master server for each map.

$ ypwhich -m

<output truncated>

timezone.byname sys44
netmasks.byaddr sys44
netid.byname sys44
bootparams sys44
netgroup.byhost sys44
netgroup.byuser sys44
netgroup sys44

<output truncated>

All systems within an NIS domain that are not configured as servers are configured as clients. To configure the NIS client, complete the following steps:

  1. Edit the /etc/inet/hosts file to ensure that the NIS master server and all slave servers have been defined.
  2. Execute the domainname domainname command to set the local NIS domain.
    # domainname domainname

    For example:

    # domainname classroom.Central.Sun.COM 
  3. Create or populate the /etc/defaultdomain file with the domain name.
  4. To initialize the system as an NIS client, perform the command:
    # ypinit -c
  5. When the system prompts you for a list of NIS servers, enter the names of the NIS master and all slave servers.
  6. Copy the /etc/nsswitch.nis file to the /etc/nsswitch.conf file. If necessary, modify the file. To exit the ypinit command without building a specific list of NIS servers, press Control-D. The client then broadcasts to bind the first available server during subsequent ypbind operations. When not operating in broadcast mode, clients can only bind to servers that are listed in their /var/yp/binding/domainname/ypservers file.
  7. Start NIS with the following command:
    # svcadm enable svc:/network/nis/client:default
  8. On the newly configured NIS client, test the NIS functionality by performing the command:
    # ypwhich -m 

    The output shows a list of maps together with the NIS master server for each map.

All systems within an NIS domain that are not configured as servers are configured as clients. To configure the NIS client, complete the following steps:

  1. Edit the /etc/inet/hosts file to ensure that the NIS master server and all slave servers have been defined.
  2. Execute the domainname domainname command to set the local NIS domain.
    # domainname domainname

    For example:

    # domainname classroom.Central.Sun.COM 
  3. Create or populate the /etc/defaultdomain file with the domain name.
  4. To initialize the system as an NIS client, perform the command:
    # ypinit -c
  5. When the system prompts you for a list of NIS servers, enter the names of the NIS master and all slave servers.
  6. Copy the /etc/nsswitch.nis file to the /etc/nsswitch.conf file. If necessary, modify the file. To exit the ypinit command without building a specific list of NIS servers, press Control-D. The client then broadcasts to bind the first available server during subsequent ypbind operations. When not operating in broadcast mode, clients can only bind to servers that are listed in their /var/yp/binding/domainname/ypservers file.
  7. Start NIS with the following command:
    # svcadm enable svc:/network/nis/client:default
  8. On the newly configured NIS client, test the NIS functionality by performing the command:
    # ypwhich -m 

    The output shows a list of maps together with the NIS master server for each map.

free sex
sex video
lesbian porno video
video sex free
href=”http://www.best-porno.myhosting247.com/map.html”>online porno
asian sex actress
bdsm sex toy
free sex wmv clips
sexy naked asian chick
teen sex teen
oral sex disease
dog sex with teen girls
gay teen twink sex
free live video sex chat
ex girlfriend sex movies
teen and old sex stories
com hilton paris sex
black teen sex video archive
wv sex offender database
sex oral hentai
hardcore office sex
asian cam live sex
free gay sex for man
mature sex tgp
ebony teen sex
free amature sex clips
teen party sex college
sex education in school
free sex story post
hilton paris sex storage tape
hot asian lesbian sex
mature blonde sex
arab sex film free
amateur porn video
pregnant sex position
sex teacher
teen blonde petite lesbian sex videos
housewives sex
world sex org
free asian sex
free live web cam porn
sex mate
teen oral sex
sex party mpeg
teen couples having sex
free teen erotic lesbian sex movies
dog sex stories
mature women for sex
sex between teens and the law

Related Posts: