Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, can anyone tell me the 1.command to display all NIS Servers. 2. command to update slave NIS from master NIS. thanks in advance, regards csanthosh...
  1. #1
    Just Joined!
    Join Date
    Jun 2009
    Posts
    21

    Nis

    Hi,
    can anyone tell me the 1.command to display all NIS Servers. 2. command to update slave NIS from master NIS.

    thanks in advance,

    regards
    csanthosh

  2. #2
    Just Joined! jaysunn's Avatar
    Join Date
    Apr 2009
    Location
    New York City - USA
    Posts
    18
    You can view NIS servers with this command. ypwhich returns the name of the NIS server that supplies the NIS services to a NIS client.
    Code:
    [root@server ~]# ypwhich 
    server3.nyc
    [root@server ~]#
    This command will show the yp configutation file for the server listing all available nis servers. As well as the NIS domain name.

    Code:
    [root@server ~]# cat /etc/yp.conf
    # /etc/yp.conf - ypbind configuration file
    # Valid entries are
    #
    # domain NISDOMAIN server HOSTNAME
    #	Use server HOSTNAME for the domain NISDOMAIN.
    #
    # domain NISDOMAIN broadcast
    #	Use  broadcast  on  the local net for domain NISDOMAIN
    #
    # domain NISDOMAIN slp
    #	Query local SLP server for ypserver supporting NISDOMAIN
    #
    # ypserver HOSTNAME
    #	Use server HOSTNAME for the  local  domain.  The
    #	IP-address of server must be listed in /etc/hosts.
    #
    # broadcast
    #	If no server for the default domain is specified or
    #	none of them is rechable, try a broadcast call to
    #	find a server.
    #
    domain itm server server3.nyc
    ypserver server2
    
    [root@server ~]#
    As for updating slaves nis from master you will issue the make command from /var/yp on the master server.

    Code:
    Last login: Sun Jun 28 12:16:20 2009 from server5
    [root@server3.nyc ~]# cd /var/yp
    [root@server3.nyc]# make
    gmake[1]: Entering directory `/var/yp/itm'
    gmake[1]: `ypservers' is up to date.
    gmake[1]: Leaving directory `/var/yp/itm'
    gmake[1]: Entering directory `/var/yp/itm'
    Updating netid.byname...
    gmake[1]: Leaving directory `/var/yp/itm'
    [root@server3.nyc]#
    Hope this helps. Also have a look at man pages for all nis related commands.

    jaysunn

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...