-   Linux - Newbie (
-   -   Client unable to listen to NIS domain server (

naman.jandial 04-15-2010 07:37 AM

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:

domain broadcast
, but I wanted it to communicate hrough the client-server connection. Hence for that I edited the /etc/yp.conf file as:

domain server
as station51 is the host name for my server.

I then run the

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 server permanent so that even after the reboot it should communicate using the client-server connection rather than the broadcast connection.

Please help.


engelienart 04-15-2010 07:52 AM

Everything about NIS, is found here:

Sorry, that's all the help I can give you.

naman.jandial 04-16-2010 12:20 PM

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 server 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 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 server in /etc/yp.conf permanently so that it continues to bind even after restart without any problem.


engelienart 04-20-2010 02:57 AM

Maybe edit the file /etc/yp.conf and make it readonly?

In the man of ypbind it says:


      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?

naman.jandial 04-21-2010 06:30 PM

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

engelienart 04-22-2010 04:09 AM

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 :(

naman.jandial 04-22-2010 07:08 PM

hmmm, Mac Binding seems to be a better option.
Will try that and let u know

naman.jandial 04-27-2010 02:25 PM

Tried mac binding, still the same.
Switches back to domain broadcast

If its a bug, is there a fix?

naman.jandial 04-27-2010 07:20 PM

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.


vim /sbin/dhclient-script
search for yp.conf within the file.
Then locate the string that reads:

echo '# generated by /sbin/dhclient-script' > /etc/yp.conf
Then locate the string that reads:

echo "domain $new_nis_domain broadcast" >> /etc/yp.conf
and change it as:

echo "domain $new_nis_domain server $nameserver" >> /etc/yp.conf
Save and exit the file:


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.

All times are GMT -5. The time now is 11:58 PM.