LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 04-15-2010, 07:37 AM   #1
naman.jandial
Member
 
Registered: Jan 2010
Posts: 30

Rep: Reputation: 16
Client unable to listen to NIS domain server


Client unable to listen to NIS domain server
I have configured an NIS server, which is working fine.
I then configured an NIS client to share some like passwd, shadow, etc.

By default the client was trying to communicate to the NIS server using the broadcast method as:
Quote:
domain naman.com broadcast
, but I wanted it to communicate hrough the client-server connection. Hence for that I edited the /etc/yp.conf file as:
Quote:
domain naman.com server station51.naman.com
as station51 is the host name for my server.

I then run the
Code:
service ypbind restart; chkconfig ypbind on
and it tries to communicate to the server and is able to Listen to the domain server.

However if I restart the client computer, it fails to communicate or Listen to the domain server. Once I login to the pc, I then check the /etc/yp.conf file and it switched back to the broadcast method.

Is there any way that I can make this entry: domain naman.com server station51.naman.com permanent so that even after the reboot it should communicate using the client-server connection rather than the broadcast connection.

Please help.

Thanks
 
Old 04-15-2010, 07:52 AM   #2
engelienart
Member
 
Registered: Feb 2009
Location: Netherlands
Distribution: Kubuntu, Debian
Posts: 73

Rep: Reputation: 16
Everything about NIS, is found here:

http://www.linux-nis.org/nis-howto/

Sorry, that's all the help I can give you.
 
Old 04-16-2010, 12:20 PM   #3
naman.jandial
Member
 
Registered: Jan 2010
Posts: 30

Original Poster
Rep: Reputation: 16
Exclamation

Thanks engelienart for the link.

I tried to follow the documentation, but still stuck at the same problem.

I noticed where the problem is, but don't know the cure.

If I provide static IP to the client, then the entry in /etc/yp.conf remains as:
domain naman.com server station51.naman.com even after restarting the network services and it even survives the reboot and it continues to bind to the server.

But if I provide a dynamic IP to the client, then the entry in /etc/yp.conf changes to
domain naman.com broadcast after restarting the network srvices or reboot, and hence it doesn't binds to the server.

Is it possible to fix this entry: domain naman.com server station51.naman.com in /etc/yp.conf permanently so that it continues to bind even after restart without any problem.

Thanks

Last edited by naman.jandial; 04-17-2010 at 06:00 AM.
 
Old 04-20-2010, 02:57 AM   #4
engelienart
Member
 
Registered: Feb 2009
Location: Netherlands
Distribution: Kubuntu, Debian
Posts: 73

Rep: Reputation: 16
Maybe edit the file /etc/yp.conf and make it readonly?

In the man of ypbind it says:

Code:
       A   broadcast   entry  in  the  configuration  file  will  overwrite  a
       ypserver/server entry and a ypserver/server  entry  broadcast.  If  all
       given server are down, ypbind will not switch to use broadcast.  ypbind
       will try at first /etc/hosts and then DNS for resolving the hosts names
       from /etc/yp.conf.  If ypbind couldn’t reconfigure the search order, it
       will use only DNS.  If DNS isn’t available,  you  could  only  use  IP-
       addresses  in  /etc/hosts.   ypbind  could  only reconfigure the search
       order with glibc 2.x.  If the -broadcast option  is  specified,  ypbind
       will  ignore  the configuration file.  If the file does not exist or if
       there are no valid entries, ypbind exit.
Maybe u should try IPadresses?
 
Old 04-21-2010, 06:30 PM   #5
naman.jandial
Member
 
Registered: Jan 2010
Posts: 30

Original Poster
Rep: Reputation: 16
Thanks engelienart,

I tried making the /etc/ypconf file as read-only but you won't believe it, once I restarted it it switched back to read-write mode, hence the entry remained as broadcast.

I also tried using the ipaddress, but no go.

This happens only when the client is accquiring IP address dynamically, there are no problems if I use a static IP.

But if u r an administrator and you have manage a large number of machines, I guess assigning a static IP would be a cumbersome process.

Any guesses how can I fix this and allow the client to accquire IP through DHCP?

Thanks again for your help
 
Old 04-22-2010, 04:09 AM   #6
engelienart
Member
 
Registered: Feb 2009
Location: Netherlands
Distribution: Kubuntu, Debian
Posts: 73

Rep: Reputation: 16
Using a DHCP that gives static IPadresses based on MACadres?
Well for my small organisation (10 WorkStations), I can do that.
I will think about it some more
 
Old 04-22-2010, 07:08 PM   #7
naman.jandial
Member
 
Registered: Jan 2010
Posts: 30

Original Poster
Rep: Reputation: 16
hmmm, Mac Binding seems to be a better option.
Will try that and let u know
 
Old 04-27-2010, 02:25 PM   #8
naman.jandial
Member
 
Registered: Jan 2010
Posts: 30

Original Poster
Rep: Reputation: 16
Tried mac binding, still the same.
Switches back to domain naman.com broadcast

If its a bug, is there a fix?
 
Old 04-27-2010, 07:20 PM   #9
naman.jandial
Member
 
Registered: Jan 2010
Posts: 30

Original Poster
Rep: Reputation: 16
OK I have figured it out and resolved the issue, now the client is able to BIND TO THE NIS DOMAIN SERVER without any problems, whether I assign a static IP or it accquires through DHCP.

To accomplish that I modified the /sbin/dhclient-script file, since this is the file that was overwriting the /etc/yp.conf file.

I am using RHEL 5.2 so will mention the steps accordingly.

Code:
vim /sbin/dhclient-script
search for yp.conf within the file.
Then locate the string that reads:
Quote:
echo '# generated by /sbin/dhclient-script' > /etc/yp.conf
Then locate the string that reads:
Quote:
echo "domain $new_nis_domain broadcast" >> /etc/yp.conf
and change it as:
Code:
 echo "domain $new_nis_domain server $nameserver" >> /etc/yp.conf
Save and exit the file:

Code:
service network restart
service ypbind restart; chkconfig ypbind on
Voilla!! the baby listens to papa now

I am so happy to fix this.

I posted here, so that someone may benefit from my experience, finally, I learnt something new. AWESOME.

Last edited by naman.jandial; 04-27-2010 at 07:24 PM.
 
  


Reply

Tags
naman, nis


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nis Client On Centos not working with Suse Server . But works with Suse Nis Client jibinforu Linux - Server 2 07-23-2009 08:44 PM
Nis Client On Centos not working with Suse Server . But works with Suse Nis Client jibinforu Linux - Networking 1 07-13-2009 05:51 AM
RHEL 4 client in VMware not binding to NIS server. Ping works fine and NIS server wo panini.kompella Linux - Server 1 03-16-2008 11:06 PM
How to setup a solaris NIS client while with a Linux NIS server? ntcm Linux - Security 2 03-31-2004 12:43 PM
How to setup a solaris NIS client while with a Linux NIS server? ntcm Linux - Networking 1 03-31-2004 07:51 AM


All times are GMT -5. The time now is 06:51 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration