751-752.html
来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 73 行
HTML
73 行
<HTML>
<HEAD>
<TITLE>Linux Unleashed, Third Edition:NIS and YP</TITLE>
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!--ISBN=0672313723//-->
<!--TITLE=Linux Unleashed, Third Edition//-->
<!--AUTHOR=Tim Parker//-->
<!--PUBLISHER=Macmillan Computer Publishing//-->
<!--IMPRINT=Sams//-->
<!--CHAPTER=44//-->
<!--PAGES=751-752//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="747-751.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="../ch45/745-755.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<H3><A NAME="Heading6"></A><FONT COLOR="#000077">Setting Up NIS Clients</FONT></H3>
<P>Setting up an NIS client requires that you have the domain name set properly, either with the <TT>domainname</TT> command or an entry in the <TT>rc</TT> startup files, and that the <TT>ypbind</TT> command has been issued properly, and the NIS client is bound to the NIS server.</P>
<P>When an entry in the <TT>/etc/passwd</TT> or <TT>/etc/group</TT> file must be searched for a match, the local files are examined first, and then the server is queried if no match is found. In order to instruct your client to go to the NIS master to match a login, you need to add the following entry to the bottom of the <TT>/etc/passwd</TT> file:</P>
<!-- CODE SNIP //-->
<PRE>
+:*:0:0:::
</PRE>
<!-- END CODE SNIP //-->
<P>If you know the format of the <TT>/etc/passwd</TT> file entries, you will recognize this as a legal entry with no information specified. The plus sign in the username field is to instruct <TT>ypbind</TT> to query the NIS master. This is called a <I>marker entry</I>. The plus sign entry can be anywhere in the file. When it is reached, NIS is used, and the file is read as before if no match has been found.</P>
<H3><A NAME="Heading7"></A><FONT COLOR="#000077">Summary</FONT></H3>
<P>As you can see, setting up NIS is not overly difficult. The hardest part of the process is usually getting the files that NIS uses to generate maps into proper shape, removing old entries and ensuring that security is maintained. Setting up the master and a slave can take less than half an hour, as most of the steps are automated. Often, actually finding the paths to the NIS utilities is more complex than setting up the server! From here you can read more about:
</P>
<DL>
<DD>Setting up Network File System to share directories across entire networks in Chapter 43, “NFS.”
<DD>Setting up <TT>cron</TT> and <TT>at</TT> to automate background processing in Chapter 46, “<TT>cron</TT> and <TT>at</TT>.”
<DD>Setting up your own Internet server or WWW server in Chapter 47, “Setting up an Internet Site.”
</DL>
<P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="747-751.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="../ch45/745-755.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?