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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Enabling NIS 259TIPLog messages for ypserv and its related services are written to the /var/log/messagesfile.The NIS server must have a domain name (which is different from the domain name of aFQDN as discussed in Chapter 16, “Hostname Resolution with BIND”). The domain nameis used along with its IP address or hostname by clients to connect to it. Set the NISdomain name in /etc/sysconfig/network by adding the following line as root (replace with a unique name):12NISDOMAIN=””The server must be set up as a client of itself, so add the following line to /etc/yp.conf:ypserver 172.0.0.1The local files from which NIS gets its information to share with clients must be configured,including /etc/passwd, /etc/shadow, /etc/group, and /etc/hosts. In other words, usersmust be added to the NIS server with the desired passwords, groups must be added, and anyIP address and hostname combinations to be shared must be added to /etc/hosts.Next, start the portmap, yppasswdd, and ypserv services by executing the following as rootfor each of them:service startBe sure these services are started at boot time with the following command as root foreach service:chkconfig onLastly, create the NIS database (on a 64-bit system, the lib directory will be lib64 instead):/usr/lib/yp/ypinit -mEnter the requested information and answer the questions appropriately when prompted.The output should look similar to Listing 12.1.LISTING 12.1Creating the NIS DatabaseAt this point, we have to construct a list of the hosts which will run NISservers. smallville.example.net 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: smallville.example.netnext host to add:The current list of NIS servers looks like this:

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

Saved successfully!

Ooh no, something went wrong!