LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   NIS in cent os 6.3 (https://www.linuxquestions.org/questions/linux-server-73/nis-in-cent-os-6-3-a-4175457854/)

sasaditya 04-11-2013 10:39 PM

NIS in cent os 6.3
 
hello linuxquestion.org,i am so new to linux world..
i had installed nis below this process

[root@station1 ~]# hostname
station1.server.com
[root@station1 ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV4=yes
NETWORKING_IPV6=no
HOSTNAME=station1.server.com
NISDOMAIN=server.com

[root@station1 yp]# cat /etc/hosts
127.0.0.1 station1 station1.server.com
192.168.0.30 station2 station2.server.com

[root@station1 yp]# cat /etc/yp.conf
# /etc/yp.conf - ypbind configuration file
# Valid entries are
#
domain server.com server 127.0.0.1 192.168.0.30
# 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 127.0.0.1 192.168.0.30
# 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.
#


[root@station1 ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:F0:0B:87
inet addr:192.168.0.30 Bcast:192.168.0.255 Mask:255.255.255.0

[root@station1 ~]#yum install ypserv* yp-tools* -y
[root@station1 ~]#service portmap start
[root@station1 ~]#service ypserv start




but when i tried to create host list #/usr/lib64/yp/ypinit -m command it shows

station1
station2

Is this correct? [y/n: y] y
We need a few minutes to build the databases...
Building /var/yp/server.com/ypservers...
Running /var/yp/Makefile...
gmake[1]: Entering directory `/var/yp/server.com'
Updating passwd.byname...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating passwd.byuid...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating group.byname...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating group.bygid...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating hosts.byname...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating hosts.byaddr...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating rpc.byname...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating rpc.bynumber...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating services.byname...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating services.byservicename...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating netid.byname...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating protocols.bynumber...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating protocols.byname...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating mail.aliases...
failed to send 'clear' to local ypserv: RPC: Unknown hostgmake[1]: Leaving directory `/var/yp/server.com'



what is my mistake..
(i had followed this site in configuration http://visitmeranjith.blogspot.in/20...centos-63.html)

JJJCR 04-12-2013 05:11 AM

hi sasaditya, check out this link below it might help.

http://www.thegeekstuff.com/2011/11/...er-and-client/

sasaditya 04-12-2013 08:48 PM

1. Verify Portmap

there is portmapper in centos 6.3.and i had check through geekstuff.com..

JJJCR 04-15-2013 04:29 AM

have you check this link before: http://www.studentcpu.com/2010/05/ni...failed-to.html

from link above:

NIS Error Message Solution failed to send 'clear' to local ypserv: RPC: Program
While we configure NIS we do the following step
[root@localhost html]# /usr/lib/yp/ypinit -m
At this point, we have to construct a list of the hosts which will run NIS
servers. sys.example.com is in the list of NIS server hosts. Please continue to add
the names for the other hosts, one per line. When you are done with the
list, type a .
next host to add: sys.example.com
next host to add:
The current list of NIS servers looks like this:
sys.example.com
Is this correct? [y/n: y] y
We need a few minutes to build the databases...
Building /var/yp/(none)/ypservers...
Running /var/yp/Makefile...
gmake[1]: Entering directory `/var/yp/(none)'
Updating passwd.byname...
while I configure I got the following error message
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating passwd.byuid...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating group.byname...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating group.bygid...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating hosts.byname...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating hosts.byaddr...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating rpc.byname...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating rpc.bynumber...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating services.byname...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating services.byservicename...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating netid.byname...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating protocols.bynumber...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating protocols.byname...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating mail.aliases...
failed to send 'clear' to local ypserv: RPC: Program not registeredgmake[1]: Leaving directory `/var/yp/(none)'
sys.example.com has been set up as a NIS master server.
Now you can run ypinit -s sys.example.com on all slave server.
[root@localhost html]# cd /var/yp/
[root@localhost yp]# make
gmake[1]: Entering directory `/var/yp/(none)'
Updating passwd.byname...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating passwd.byuid...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating group.byname...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating group.bygid...
failed to send 'clear' to local ypserv: RPC: Program not registeredUpdating netid.byname...
failed to send 'clear' to local ypserv: RPC: Program not registeredgmake[1]: Leaving directory `/var/yp/(none)'

Solution For that Problem
while we configure NIS
We need to Edit the following file
[script@redhat yp]# vi /var/yp/Makefile
Int the 109 Add # symbol before the hosts
ll: passwd group #hosts rpc services netid protocols mail \
Restart the Following service
portmap and ypserv service Then try it will work perfectly without any issue.

NIS Error Message -2
#/usr/lib64/yp/ypinit -m
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating passwd.byuid...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating group.byname...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating group.bygid...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating hosts.byname...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating hosts.byaddr...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating rpc.byname...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating rpc.bynumber...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating services.byname...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating services.byservicename...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating netid.byname...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating protocols.bynumber...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating protocols.byname...
failed to send 'clear' to local ypserv: RPC: Unknown hostUpdating mail.aliases...
failed to send 'clear' to local ypserv: RPC: Unknown hostgmake[1]:


Update the proper localhost.localdoman in /etc/hosts file.
then Update the NIS Database #/usr/lib64/yp/ypinit -m
It will work perfectly.

chrism01 04-15-2013 07:59 AM

There's a good NIS HOWTO here http://www.linuxhomenetworking.com/w...onfiguring_NIS

sasaditya 04-19-2013 07:43 AM

thanks you sir jee.....you are great JJJCR...
this is working ........
i love this site..

chrism01 04-22-2013 02:15 AM

BTW, NIS is a plaintext protocol; you'd be safer with LDAP+TLS. See that same site I linked to above for a HOWTO.


All times are GMT -5. The time now is 01:07 AM.