cancel
Showing results for 
Search instead for 
Did you mean: 

NIS trouble in the system

Anand Banajiger
Occasional Visitor

NIS trouble in the system

Hi,

I have trouble in my system in which NIS is not working. Earlier the NIS was working. Now its not working.

# /sbin/init.d/nis.client start
starting NIS CLIENT networking
starting up the rpcbind
rpcbind already started, using pid: 1399
domainname KTeng
starting up the Network Information Service
starting up the ypbind daemon
ypbind will not use the server list available in the file /var/yp/binding//ypservers for binding purpose. Also if ypbind is invoked with -broadcast option, then -broadcast option is ignored.
/usr/lib/netsvc/yp/ypbind -ypset
calling ypset with 10.161.9.155
Checking NIS binding.
Unable to bind to NIS server using domain KTeng.
starting up the keyserv daemon
/usr/sbin/keyserv
#

One more thing I found DNS is not working. IS this due to this my NIS is not working. Below is the output of nsswitch.conf.

# more /etc/nsswitch.conf
#
# /etc/nsswitch.nis:
#
# @(#)B11.23_LR
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# uses NIS (YP) in conjunction with files.
#

passwd: compat
group: compat
hosts: nis [NOTFOUND=return] files
ipnodes: files
networks: nis [NOTFOUND=return] files
protocols: nis [NOTFOUND=return] files
rpc: nis [NOTFOUND=return] files
publickey: nis [NOTFOUND=return] files
netgroup: nis [NOTFOUND=return] files
automount: files nis
aliases: files nis
services: files nis
#

Please help
8 REPLIES
Anand Banajiger
Occasional Visitor

Re: NIS trouble in the system

Hi,

One more thing i found command nsquery. But this command fails.

# /usr/contrib/bin/nsquery hosts ites

Using "nis [NOTFOUND=return] files" for the hosts policy.

Searching nis for ites
This Name Service is currently unavailable

Switch configuration: Allows fallback

Searching /etc/hosts for ites
ites was NOTFOUND

Switch configuration: Allows fallback

All name services have been searched
# echo $?
3
#


Looked into man nsquery command and found

RETURN VALUE
0: Success.

1: Invalid Usage.

2: Unknown ACTION.

3: No match found in any name services queried.

Viktor Balogh
Honored Contributor

Re: NIS trouble in the system

Hi,

The line in your nsswitch.conf

hosts: nis [NOTFOUND=return] files

means, that if NIS is reachable and the hostname wasn't found in it, it returns a "not found" message. If NIS is down, it falls back to your local hosts file. Since it hasn't been found in your hosts file, it gives back a "notfound" message. This is the way it works.

You can check if you are bound to any NIS master or slave:

# ypwhich

Please post the output.
****
Unix operates with beer.
Anand Banajiger
Occasional Visitor

Re: NIS trouble in the system

I get output for ypwhich.

# ypwhich
NIS domain KTeng not bound.
# ps -ef | grep -i ypbind
root 4899 4869 0 19:20:48 pts/0 0:00 grep -i ypbind
root 4549 1 0 18:59:38 ? 0:00 /usr/lib/netsvc/yp/ypbind -ypset
V. Nyga
Honored Contributor

Re: NIS trouble in the system

Hi,

your client has no connection to your NIS domain server: KTeng

Can you ping the server?
Does the server knows that it is 'KTeng'?

V.
*** Say 'Thanks' with Kudos ***
V. Nyga
Honored Contributor

Re: NIS trouble in the system

Hi again,

can you post the output from your NIS server:
ypwhich
domainname
ps -ef|grep ypserv

>I have trouble in my system in which NIS is
>not working. Earlier the NIS was working. >Now its not working.

Do you know anything that changed?

>One more thing I found DNS is not working.
Is it working again now?

V.
*** Say 'Thanks' with Kudos ***
Anand Banajiger
Occasional Visitor

Re: NIS trouble in the system

Yes, DNS is working on the system now.

======================================
Below is the configuration file of

# more /etc/rc.config.d/namesvrs
unset UNIX95
PRE_U95=true;export PRE_U95;

##############################################
# named (BIND) configuration. See named(1m). #
##############################################
#
# Name server using the Domain Name System (DNS) protocol (RFC 1034/1035)
#
# @(#)B11.23_LR
#
# NAMED: Set to 1 to start nameserver daemon.
# NAMED_ARGS: Arguments to the nameserver daemon
#
# Configuration of a named file (e.g. /etc/named.conf) is needed for
# successful operation of the name server.
#
NAMED=0
NAMED_ARGS=""


##########################################################
# NIS (YP) configuration. See domainname(1), ypserv(1m) #
##########################################################
#
# Name server using Network Information Service protocol (Sun's ONC)
#
# NIS_MASTER_SERVER: 1 if this node is the master NIS server, 0 if not.
# NIS_SLAVE_SERVER: 1 if this node is a slave NIS server, 0 if not.
# NIS_CLIENT:1 1 if this node is a NIS client, 0 if not.
# NISPLUS_SERVER: 1 if this node is a NIS+ server, 0 if not.
# NISPLUS_CLIENT: 1 if this node is a NIS+ client, 0 if not.
# EMULYP: -Y to have rpc.nisd support YP clients.
# NISDOMAIN: the NIS domain name (see domainname(1)).
# NISDOMAIN_ERR: ???
# MAX_NISCHECKS= max number of bind attempts the NIS client will make
# YPSERV_OPTIONS command line options for ypserv
# YPBIND_OPTIONS command line options for ypbind
# YPPASSWDD_OPTIONS command line options for yppasswdd
# KEYSERV_OPTIONS command line options for keyserv
# YPUPDATED_OPTIONS command line options for ypupdated
# YPXFRD_OPTIONS command line options for ypxfrd
# RPC_NISD_OPTIONS command line options for rpc.nisd
# NIS_CACHEMGR_OPTIONS command line options for nis_cachemgr
# YPSET_ADDR IP addr or name of NIS server. Must set YPBIND_OPTIONS
# to "-ypset"
# LONGNAMES_OPTIONS
# SHORTNAMES_OPTIONS
#
# Note: - NIS_MASTER_SERVER and NIS_SLAVE_SERVER are mutually exclusive,
# i.e., only one, not both, should be set if either is set.
# - All NIS servers must also be NIS clients, so if you set either
# NIS_MASTER_SERVER or NIS_SLAVE_SERVER to 1, you should set
# NIS_CLIENT to 1, too.
# - Refer to NFS administration manual and ypinit(1M) for the
# steps required to create NIS servers.
#
# MAX_NISCHECKS
# The maximum number of bind attempts the
# NIS client will make for a NIS server to be
# available before shuting down NIS and
# booting without it. This value should
# not be less than 2.
#
NIS_MASTER_SERVER=0
NIS_SLAVE_SERVER=0
NIS_CLIENT=1
NISPLUS_SERVER=0
NISPLUS_CLIENT=0
NIS_DOMAIN="KTeng"
MAX_NISCHECKS=2
EMULYP=""
YPSERV_OPTIONS=""
YPBIND_OPTIONS="-ypset"
YPPASSWDD_OPTIONS="/etc/passwd -m passwd PWFILE=/etc/passwd"
KEYSERV_OPTIONS=""
YPUPDATED_OPTIONS=""
YPXFRD_OPTIONS=""
RPC_NISD_OPTIONS="$EMULYP"
NIS_CACHEMGR_OPTIONS=""
YPSET_ADDR="10.161.9.155"
LONGNAMES_OPTIONS="group.bygid.dir group.bygid.pag group.byname.dir \
group.byname.pag hosts.byaddr.dir hosts.byaddr.pag \
hosts.byname.dir hosts.byname.pag networks.byaddr.dir \
networks.byaddr.pag networks.byname.dir networks.byname.pag \
passwd.byname.dir passwd.byname.pag passwd.byuid.dir \
passwd.byuid.pag protocols.byname.dir protocols.byname.pag \
protocols.bynumber.dir protocols.bynumber.pag \
rpc.bynumber.dir rpc.bynumber.pag services.byname.dir \
services.byname.pag ypservers.dir ypservers.pag"

SHORTNAMES_OPTIONS="group.bygi.dir group.bygi.pag group.byna.dir \
group.byna.pag hosts.byad.dir hosts.byad.pag \
hosts.byna.dir hosts.byna.pag netwk.byad.dir \
netwk.byad.pag netwk.byna.dir netwk.byna.pag \
passw.byna.dir passw.byna.pag passw.byui.dir \
passw.byui.pag proto.byna.dir proto.byna.pag \
proto.bynu.dir proto.bynu.pag rpc.bynu.dir \
rpc.bynu.pag servi.byna.dir servi.byna.pag \
ypservers.dir ypservers.pag"
#
=========================================
Now its able to ping to NIS master server which is different subnet.

In above i have placed the value for

YPSET_ADDR="10.161.9.155"

which is NIS slave server in the same subnet. IS my above setting are correct?
Anand Banajiger
Occasional Visitor

Re: NIS trouble in the system

Hi,

Can any one paste the output of nsswitch.nis file in HPUX. My team have changed that file now.

MY current configuration file is

# more nsswitch.nis
#
# /etc/nsswitch.nis:
#
# @(#)B11.23_LR
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# uses NIS (YP) in conjunction with files.
#

passwd: files nis
group: files nis
hosts: nis [NOTFOUND=return] files
ipnodes: files
networks: nis [NOTFOUND=return] files
protocols: nis [NOTFOUND=return] files
rpc: nis [NOTFOUND=return] files
publickey: nis [NOTFOUND=return] files
netgroup: nis [NOTFOUND=return] files
automount: files nis
aliases: files nis
services: files nis
#

Please help.


V. Nyga
Honored Contributor

Re: NIS trouble in the system

Hi again,

#
# /etc/nsswitch.nis:
#
# @(#)B.11.11_LR
#
# An example file that could be copied over to /etc/nsswitch.co
# uses NIS (YP) in conjunction with files.
#

passwd: files nis
group: files nis
hosts: nis [NOTFOUND=return] files
networks: nis [NOTFOUND=return] files
protocols: nis [NOTFOUND=return] files
rpc: nis [NOTFOUND=return] files
publickey: nis [NOTFOUND=return] files
netgroup: nis [NOTFOUND=return] files
automount: files nis
aliases: files nis
services: files nis

Looks like yours - except that you run 11.23.

Again:

can you post the output from your NIS server 10.161.9.155:

ypwhich
domainname
ps -ef|grep ypserv

V.
*** Say 'Thanks' with Kudos ***