12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Enabling NIS 263To accept requests from additional hosts, add a line with a netmask, followed by a space,followed by a network pair for each set of hosts such as255.255.255.0 192.168.10.0If clients not in the /var/yp/securenets file try to connect, the request is ignored, and awarning message is logged on the server.Access control lists for NIS can also be set in /etc/ypserv.conf. Each access control line isin the following format:12host:domain:map:securityThe host field can be an individual IP address such as 192.168.10.2, an IP address rangeand netmask such as 192.168.10.0/255.255.255.0, or the beginning of the IP address rangesuch as 192.168, which translates to 192.168.0.0/255.255.0.0. The domain field is the NISdomain for which this rule applies. An asterisk (*) can be used as the domain name tomatch any domain. The map field must be an NIS map name or an asterisk for all NISmaps. Security must be none, port, or deny. If set to none, clients matching the rule areallowed access. If set to port, clients matching the rule are allowed from ports less than1024 only. If set to deny, clients matching the rule are denied access to the NIS server.Connecting to the NIS ServerThe ypbind RPM package must be installed on each NIS client so that the ypbind servicecan be run to connect to the NIS server. The client connects to the NIS server based onthe hostname of the NIS server and optionally the domain name if more than onedomain is on the network.To configure the NIS server for the client, edit the /etc/yp.conf file as root to include thefollowing line, replace with the IP address or hostname of the server:ypserver or to specify the domain as well:domain server Next, start the service with the service ypbind start command as root. Also executechkconfig ypbind on as root to make sure it is started at boot time.To verify that you are connected to the NIS server, execute the ypwhich command. Itdisplays the name of the NIS server to which you are connected. The ypcat command as previously mentioned can be used on the client to display various maps andconfiguration files from the server. To view a list of available maps, execute the ypwhich-m command on the client.To change user data from an NIS client, use the following command:yppasswd

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!