1833758 Members
2715 Online
110063 Solutions
New Discussion

Re: NIS

 
SOLVED
Go to solution
Jason_93
Occasional Contributor

NIS

HP 9000 hp-ux 10.20 I am getting a tcp\unknown service message that I am sure has to do with NIS. However since I am new to Unix I am unsure as to where I should be looking to correct this.
5 REPLIES 5
Michael Tully
Honored Contributor

Re: NIS

Hi,

If your using NIS, you need to mnake sure
that your have the correct /etc/nsswitch.conf
file in place. There are a few examples in
the /etc directory. Here are two of mine,
one being with NIS (/etc/nsswitch.conf) and
the other with no NIS. If you are using NIS the file will need to be moved.

# mv /etc/nsswitch.conf /etc/nsswitch.orig
# mv /etc/nsswitch.nis /etc/nsswitch.conf

HTH
~Michael

# /etc/nsswitch.nis:
#
# @(#)B.11.11_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
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

$ more /etc/nsswitch.conf
hosts: files [NOTFOUND=continue UNAVAIL=return TRYAGAIN=return] dns [NOTFO
UND=return UNAVAIL=continue TRYAGAIN=return]
Anyone for a Mutiny ?
Michael Tully
Honored Contributor

Re: NIS

Hi,

One other thought, where exactly is the message being reported?

A user logging in ?
An 'ftp' session message?
In the /var/adm/syslog/syslog.log file?
Somewhere else....

Cheers
~Michael
Anyone for a Mutiny ?
U.SivaKumar_2
Honored Contributor

Re: NIS

hi,

Check these files for invalid lines .
/etc/services
/etc/inetd.conf
compare the above files with
/usr/newconfig/etc/services
/usr/newconfig/etc/inetd.conf
you can copy those files from /usr/newconfig/etc to /etc/
#cp -p /usr/newconfig/etc/services /etc
#cp -p /usr/newconfig/etc/inetd.conf /etc
and give
#inetd -c
Now hope that error won't come again.

regards,
U.SivaKumar
Innovations are made when conventions are broken
Jason_93
Occasional Contributor

Re: NIS

Within /etc there is not a nsswitch.conf file and that maybe the source of my grief.
sven verhaegen
Respected Contributor
Solution

Re: NIS

you have no need for the nsswitch.conf file if you are not altering the prefered way to look at the specific resources for a NIS exported file , if there is no nsswitch.conf it will use the standard setting which is NIS file immediately before the file locally itself


as you have an issue with this services file check first if your services file does contain the service required , if not if there is a sign in there for the NIS compatibility (look at the man pages) and if so with ypcat you can look at the services file exported from the NIS server (check with YPWHICH what server that is) if the service required does exist in there , if it is so then you could have a issue with the NIS request itself (timing / no answer etc...)

I had a look at some known issues with NIS and there are some known timing issues which could case a slow reply from the NIS server to create this kind of problem , so it can be wise installing the latest NFS/NIS ONC megapatch and it's dependencies (they are important) about 15 patches are needed in total

If at the end it turns out to be a timing issue not fixed by patchuing then the nsswitch file can be usefull , putting up

services NIS [NOTFOUND=continue] files
...knowing one ignores a greath many things is the first step to wisdom...