⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 0430nis.htm

📁 鸟哥的linux私房菜
💻 HTM
📖 第 1 页 / 共 5 页
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
	>
<html lang="zh-TW">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=gb2312" >
	<meta name="Author" content="VBird, 鸟哥" >
	<meta name="Description" content="Network Information Service, NIS 伺服器" >
	<title>鸟哥的 Linux 私房菜 -- NIS 伺服器</title>
	<style type="text/css">
	 	body {
			background-color: #D3D3D3;
			color: #000000;
			background-attachment:fixed ;
		}
				body,th,td,input,select,textarea,select,checkbox {
			font-family: '新细明体', 'Times New Roman', serif;
			font-size: 11pt ;
		}
		a:link		{text-decoration: none; color: blue}
		a:visited	{text-decoration: none; color: blue}
		a:active	{text-decoration: none; color: blue}
		a:hover		{text-decoration: underline; color: #ff0000}
				table.head1	{width:100%; background-color: #FFCCCC; 
				 border-style:groove;border-width:5px;border-color: #FFCCCC; margin:0;
				 padding: 5px 5px}
		   		   td.head1	{font: 10pt "新细明体", serif; color: #000099; }
		   		   td.info1	{font: 11pt "新细明体", serif; color: #000066; text-align:center; width:14%}
		   td.info2	{font: 11pt "新细明体", serif; color: #000066; text-align:center; width:12%}
		    *.info21	{font: 11pt "新细明体", serif; color: #000066; }
		    *.info22	{font: 11pt "新细明体", serif; color: blue  ; }
		    *.info23	{font: 11pt "新细明体", serif; color: green ; }
		   td.info3	{font: 11pt "新细明体", serif; color: #000066; text-align:justify}
				*.text_head0	{font-size:18pt; font-family:'标楷体','Times New Roman','Times', serif; }
		*.text_head_en	{font-size:18pt; font-family:'Times New Roman','Times', serif; }
				*.text_h1	{font: 15pt "新细明体", serif; color: #0000BB; font-weight: bold }
				*.text_h2	{font: 13pt "新细明体", serif; color: #0000BB; font-weight: bold }
				*.text_import1	{font:  11pt "新细明体", serif; color: #000088; font-weight: bold  }
		*.text_import2	{font:  11pt "新细明体", serif; color: #000088; font-weight: normal}
		*.text_vbird	{font:  11pt "新细明体", serif; color: #000088; font-weight: normal; 
				 font-style: italic;}
		*.text_history	{font:  10pt "新细明体", serif; color: #000066; }
		*.text_date	{font:  10pt "新细明体", serif; color: #3333FF; }
				*.block1	{padding: 10px 20px 10px 25px; text-align:left }
				*.block2	{padding: 10px 0px  10px 25px; text-align:left }
	    table.term2		{width: 350px; background-color: #000000;
				 border-style:groove;border-width:3px;border-color: #FFCCCC; margin:10px 0px;}
	    	    table.term		{width: 580px; background-color: #000000;
				 border-style:groove;border-width:3px;border-color: #FFCCCC; margin:10px 0px;}
	       	       td.term		{font:  10pt "细明体", Fixedsys, serif; color: #FFFFFF; }
		*.term_hd	{font:  10pt "细明体", Fixedsys, serif; color: #BBBBBB; }
		*.term_note	{font:  10pt "细明体", Fixedsys, serif; color: #777777; font-weight: normal }
		*.term_note_b	{font:  10pt "细明体", Fixedsys, serif; color: #FF77FF; font-weight: bolder }
		*.term_command	{font:  10pt "细明体", Fixedsys, serif; color: yellow ; font-weight: bolder }
		*.term_write	{font:  10pt "细明体", Fixedsys, serif; color: yellow ; font-weight: normal }
		*.term_say	{font:  10pt "细明体", Fixedsys, serif; color: #FF6666; font-weight: normal }
	</style>
	<script language="JaveScript" type="text/javascript" src="/include/java.js"></script>
</head>
<body style="margin:0; padding:0">
<center>


<!-- 这里是关于页首按钮处的按钮程式 -->
<div style="text-align:center">
<span style="font-weight:bolder; color:#3333FF"><span class="text_head0">鸟哥的<span class="text_head_en"> 
	Linux </span>私房菜</span></span><br />
<span style="color:#000080">为取得较佳浏览结果,请爱用 <a href="http://moztw.org" target="_blank">firefox</a>
	浏览本网页</span><br />
<a href="http://linux.vbird.org/" target="_blank"
	onmouseover="document.head_icon1.src='../images/icon_VBird_on.jpg'"
	onfocus="document.head_icon1.src='../images/icon_VBird_on.jpg'"
	onmouseout="document.head_icon1.src='../images/icon_VBird_off.jpg'">
	<img alt="前往鸟哥的 Linux 私房菜馆首页" title="前往鸟哥的 Linux 私房菜馆首页" name="head_icon1"
		src="../images/icon_VBird_off.jpg" border="0" /></a>
<a target="_blank" href="http://linux.vbird.org/linux_basic"
	onmouseover="document.head_icon2.src='../images/icon_basic_on.jpg'"
	onfocus="document.head_icon2.src='../images/icon_basic_on.jpg'"
	onmouseout="document.head_icon2.src='../images/icon_basic_off.jpg'">
	<img src="../images/icon_basic_off.jpg" border="0" 
		alt="前往 Linux 基础文件,新手请从头学起" 
		title="前往 Linux 基础文件,新手请从头学起" name="head_icon2" /></a>
<a target="_blank" href="http://linux.vbird.org/linux_server"
	onmouseover="document.head_icon3.src='../images/icon_server_on.jpg'"
	onfocus="document.head_icon3.src='../images/icon_server_on.jpg'"
	onmouseout="document.head_icon3.src='../images/icon_server_off.jpg'">
	<img src="../images/icon_server_off.jpg" border="0"
		alt="前往 Linux 架站文件,网路基础那章节请务必参考!" 
		title="前往 Linux 架站文件,网路基础那章节请务必参考!" name="head_icon3" /></a>
<a target="_blank" href="http://linux.vbird.org/linux_security"
	onmouseover="document.head_icon4.src='../images/icon_security_on.jpg'"
	onfocus="document.head_icon4.src='../images/icon_security_on.jpg'"
	onmouseout="document.head_icon4.src='../images/icon_security_off.jpg'">
	<img src="../images/icon_security_off.jpg" border="0"
		alt="前往『网路安全』相关文件网页" title="前往『网路安全』相关文件网页" name="head_icon4" /></a>
<a href="http://phorum.vbird.org" target="_blank"
	onmouseover="document.head_icon5.src='../images/icon_forum_on.jpg'"
	onfocus="document.head_icon5.src='../images/icon_forum_on.jpg'"
	onmouseout="document.head_icon5.src='../images/icon_forum_off.jpg'">
	<img src="../images/icon_forum_off.jpg" border="0"
		alt="前往 Linux 新手讨论区,发问前务必查阅发文规则" 
		title="前往 Linux 新手讨论区,发问前务必查阅发文规则" name="head_icon5" /></a>
<a target="_blank" href="http://linux.vbird.org/adsl"
	onmouseover="document.head_icon6.src='../images/icon_adsl_on.jpg'"
	onfocus="document.head_icon6.src='../images/icon_adsl_on.jpg'"
	onmouseout="document.head_icon6.src='../images/icon_adsl_off.jpg'">
	<img src="../images/icon_adsl_off.jpg" border="0"
		alt="前往『ADSL连线分享』相关文件网页" title="前往『ADSL连线分享』相关文件网页" name="head_icon6" /></a>
<a href="http://www.study-area.org" target="_blank"
	onmouseover="document.head_icon7.src='../images/icon_study-area.jpg'"
	onfocus="document.head_icon7.src='../images/icon_study-area.jpg'"
	onmouseout="document.head_icon7.src='../images/icon_study-area.jpg'">
	<img src="../images/icon_study-area.jpg" border="0"
		alt="前往 Study Area 网站" title="前往 Study Area 网站" name="head_icon7" /></a>
<br />
</div>


<table summary="本文内容的排版" style="width:750px; 
	background-image:url('../images/VBirdLinux.jpg');
	background-attachment:fixed;" border="0" cellspacing="0" cellpadding="0">
<tr><td style="width:16px; height:16px; background-image:url('../images/border-top-left.jpg'); 
	font-size:6px">  </td>
    <td style="width:718px; height:16px; font-size:6px;
	background-image:url('../images/border-top-center.jpg')">  </td>
    <td style="width:16px; height:16px; background-image:url('../images/border-top-right.jpg');
	font-size:6px">  </td></tr>
<tr><td style="width:16px; font-size:6px;
	background-image:url('../images/border-middle-left.jpg')">  </td>
    <td width="718">

<!-- 本文的档头部分 -->
<div style="text-align:center">
    <a href="0430nis.php">
    <span class="text_head0"><span class="text_head_en">NIS </span>伺服器</span></a><br />
</div>
    <div style="text-align:left">
        <a href="0430nis.php?thisscreen=800x600"><!--切换解析度为 800x600--></a>
    </div>
    <div style="text-align:right">
        <span class="text_history">最近更新日期∶2006/10/11</span>
    </div>


<!-- 本文的档头部分 -->
<table class="head1" summary="排版∶文章档头的说明"><tr><td class="head1">
	有没有想过,如果我有十部 Linux 主机,这十部主机仅负责不同的功能,事实上,
	所有的主机帐号与对应的密码都相同!那么我是将帐号与密码分别设定置在十部电脑上面,
	还是可以透过一部主机做为帐号管理的功能,然后其他的主机只要当用户用登入时,
	就必须要到管理帐号的主机上面确认其帐号与密码呢?哪一个比较方便而且灵活?
	当然是找一个帐号管理的主机比较方便的多啦!如果有使用者要修改密码,不必要去到十部主机修改密码啦!
	只要到主要管理主机去修改,其他的主机根本就不需要更动!哈哈!轻松又愉快呢!这个功能的达成有很多的方式,
	在这里,我们介绍一个很简单的方式,那就是
	Network Information Service 这个 NIS 伺服器的架设啦!
</td></tr></table><br />

<!-- 本文的连结区部分 -->
<div class=block1>
<span class="text_h1">
1. <a href="#before">本章的行前准备工作</a><br />
2. <a href="#whatisnis">NIS 的由来与功能</a><br />
	<span class=text_h2>
	    2.1 <a href="#whatisnis_use">NIS 的主要功能</a><br />
	    2.2 <a href="#whatisnis_process">NIS 的运作流程</a><br />
	</span>
3. <a href="#nis_server">NIS server 端的设定</a><br />
	<span class=text_h2>
	    3.1 <a href="#nis_server_pack">所需要的套件</a><br />
	    3.2 <a href="#nis_server_nis">NIS 的套件结构</a><br />
	    3.3 <a href="#nis_server_case">一个实作案例</a><br />
	    3.4 <a href="#nis_server_master">NIS master 的设定与启动</a><br />
	    3.5 <a href="#nis_server_slave">NIS slave 的设定与启动 (optional)</a><br />
	    3.6 <a href="#nis_server_fire">防火墙设置</a><br />
	</span>
4. <a href="#nis_client">NIS client 端的设定</a><br />
	<span class=text_h2>
	    4.1 <a href="#nis_client_pack">NIS client 所需套件与套件结构</a><br />
	    4.2 <a href="#nis_client_setup">NIS client 的设定与启动</a><br />
	    4.3 <a href="#nis_client_check">NIS client 端的检验</a>∶
		<a href="#yptest">yptest</a>, <a href="#ypwhich">ypwhich</a>, 
		<a href="#ypcat">ypcat</a><br />
	    4.4 <a href="#nis_client_user">使用者参数修改∶ yppasswd, ypchfn, ypchsh</a><br />
	</span>
5. <a href="#nis_nfs">NIS 与 NFS 的设定与丛集电脑运用</a><br />
6. <a href="#command">指令对应资料</a><br />
7. <a href="#review">重点回顾</a><br />
8. <a href="#FAQ">课后练习</a><br />
9. <a href="#reference">参考资料</a><br />
<span class=text_h2>
10.<a href="http://phorum.vbird.org/viewtopic.php?p=115269"
        target="_blank">针对本文的建议∶http://phorum.vbird.org/viewtopic.php?p=115269</a><br />
</span>
</span>
</div>


<!-- 本文的正式部分 -->
<hr /><a NAME="before"></a><img src="images/penguin-m.gif" alt="大标题的图示" height="34" width="25" align="middle" /><span class="text_h1">本章的行前准备工作</span><br />
<div class=block1>
	NIS 最大的用途在于提供用户端的使用者相关参数查询,举例来说,使用者的帐号、密码、UID、家目录、shell 
	等等的,都可以透过 NIS 伺服器来查询的。但 NIS 所能提供的也就是这样了,他并没有办法提供使用者家目录的空间,
	因此,一般在高效能运算电脑当中,如果想要让所有的机器都拥有相同的帐号密码,
	通常使用 NIS 提供身份验证,配合 NFS 提供所需要的磁碟空间的呐!
	因此在这一章开始前,你最好知道∶<br />

	<ul>
	<li>了解<a href="0110network_basic.php">网路基础</a>,防火墙与<a
	href="0240network-secure-1.php#packet_flow_protect">关闭 SELinux 模组</a>等等。
	<li>一定要认识 <a href="0330nfs.php">NFS</a> 伺服器;
	<li>需要了解 RPC 这个玩意儿;
	<li>需要了解使用者帐号相关知识,可以参考基础篇的<a href="../linux_basic/0410accountmanager.php">使用者帐号管理章节</a>。
	<li>建立 NIS 资料库会使用到 make/Makefile 功能,请参考<a 
		href="../linux_basic/0520source_code_and_tarball.php">基础篇原始码与 tarball</a>章节。
	</ul>
</div>

<hr /><a NAME="whatisnis"></a><img src="images/penguin-m.gif" alt="大标题的图示" height="34" width="25" align="middle" /><span class="text_h1">NIS 的由来与功能</span><br />
<div class=block1>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -