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.

260CHAPTER 12Identity ManagementLISTING 12.1Continuedsmallville.example.netIs this correct? [y/n: y] yWe need a few minutes to build the databases...Building /var/yp/example/ypservers...Running /var/yp/Makefile...gmake[1]: Entering directory `/var/yp/example’Updating passwd.byname...Updating passwd.byuid...Updating group.byname...Updating group.bygid...Updating hosts.byname...Updating hosts.byaddr...Updating rpc.byname...Updating rpc.bynumber...Updating services.byname...Updating services.byservicename...Updating netid.byname...Updating protocols.bynumber...Updating protocols.byname...Updating mail.aliases...gmake[1]: Leaving directory `/var/yp/example’smallville.example.net has been set up as a NIS master server.Now you can run ypinit -s smallville.example.net on all slave server.The NIS map files are created in the /var/yp// directory. After the NIS databasehas been created, the server must be told about changes to the data being shared. Toupdate the NIS maps after modifying files on the server, change to the /var/yp/ directoryand type the make command as the root user. To keep the NIS information updated on aregular basis, consider creating a cron task to execute this command periodically. Theupdate frequency depends on how often the information is updated. You can also runmake in the /var/yp/ directory after each change if you need them to take place immediatelyor if you don’t update the data very often. Refer to Chapter 11, “Automating Taskswith Scripts,” for details on setting up a cron task.From the client side, the ypcat command can be used to view the contents of the NISmaps. For example, execute ypcat passwd.byname to view the user entries from/etc/passwd on the server. A full list of maps to query can be retrieved from the ypwhich-m command on the client. Entry names such as passwd.byname are not always easy toremember, so the /var/yp/nicknames file on the NIS server can be used to set up aliasesor nicknames so they can be used to query the server for information lists. For example,the nickname passwd is set up by default for passwd.byname. View the contents of the

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

Saved successfully!

Ooh no, something went wrong!