<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Admin&#039;s Choice &#187; NIS</title>
	<atom:link href="http://adminschoice.com/category/nis/feed" rel="self" type="application/rss+xml" />
	<link>http://adminschoice.com</link>
	<description>Unix adminstrators documents , tip and more</description>
	<lastBuildDate>Thu, 11 Feb 2010 02:53:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>NISplus Installation &amp; Administration</title>
		<link>http://adminschoice.com/nisplus-installation-administration</link>
		<comments>http://adminschoice.com/nisplus-installation-administration#comments</comments>
		<pubDate>Tue, 29 Dec 2009 22:08:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[NIS]]></category>

		<guid isPermaLink="false">http://adminschoice.com/?p=377</guid>
		<description><![CDATA[
NISplus&#160; is network which allows you to store client information at a
          central place where all the clients have access. This enables system
          administrators to manage a group of servers from a central place.
    [...]]]></description>
			<content:encoded><![CDATA[
<p><b>NISplus</b>&nbsp; is network which allows you to store client information at a<br />
          central place where all the clients have access. This enables system<br />
          administrators to manage a group of servers from a central place.<br />
          This article discusses the nisplus objects , installation of servers ,clients and administration commands.</p>
<p align="left"><b>1.0&nbsp; <a href="#Introduction%20to%20NIS+%C2%A0">Introduction to NIS+</a></b>         </p>
<p align="left"><b>1.1&nbsp; <a href="#Objects%20in%20NIS%20+">Objects in NIS+</a></b></p>
<p align="left"><b>1.2&nbsp; <a href="#Standard%20Tables%20in%20NIS+">Standard tables in NIS+</a></b></p>
<p align="left"><b>1.3&nbsp; <a href="#Groups%20in%20NIS+">Groups  in NIS+</a></b></p>
<p align="left"><b>2.0&nbsp; <a href="#Preparing%20for%20Install">Preparing for Install</a></b></p>
<p align="left"><b>2.1&nbsp; <a href="#Installing%20Server">Installing Server</a></b></p>
<p align="left"><b>3.0&nbsp; <a href="#Installing%20Client">Installing Client</a></b></p>
<p align="left"><b>4.0&nbsp; <a href="#Administration%20Commands">Administration commands&nbsp;</a></b><br />
___________________________________<br />
            &nbsp;<br />
            <b>1.0&nbsp;<a name="Introduction to NIS+&nbsp;">Introduction to<br />
              NIS+&nbsp;</a></b></p>
<ul style="margin-top: 0in;" type="disc">
<li class="MsoNormal">NIS +&nbsp; is network information services&nbsp;<br />
              which allows you to store client information at a central place<br />
              where all the clients have access. &nbsp;&nbsp; The information<br />
              can be user passwords , home directories, network services .<span style="position: relative;" class="preLoadWrap" id="preLoadWrap5"></p>
<div style="position: absolute; z-index: 4000; top: -32px; left: -18px; display: none;" id="preLoadLayer5">
                <img style="border: 0px none ;" src="http://kona.kontera.com/javascript/lib/imgs/grey_loader.gif" width="22" height="22">
              </div>
<p>              </span>etc .</li>
<li class="MsoNormal">The information is stored in NIS+ tables .<br />
              Some of the standard tables (16 in number) comes with predefined<br />
              structure when NIS+ is installed . The other tables can be created<br />
              as per requirement using NIS+ commands.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
<li class="MsoNormal">NIS+ uses&nbsp; hierarchical structure and can<br />
              have multiple domains servers&nbsp; .</li>
<li class="MsoNormal">NIS+ uses the client server model . The<br />
              primary server is called master server and the <font style="font-weight: 400; position: static"><span class="kLink" style="font-weight: 400; position: static">backup<br />
              server</span></font> is called the replica server . Both server<br />
              runs NIS+ and have copies of tables . The changes in master server&nbsp;<br />
              are propagated to replica servers in increments.</li>
<li class="MsoNormal">For security it uses both authentication and<br />
              authorization for securing the access to system and resources.<br />
              Authentication verifies validity of a user ; Authorization<br />
              verifies if the user is allowed to&nbsp; have access to the<br />
              resources. Access to any NIS+ table can be controlled through the<br />
              table permissions.</li>
<li class="MsoNormal">Clients&nbsp; have a configuration file /etc/nsswitch.com<br />
              ; entries in this file determines where the clients should look<br />
              for the information , in local files or NIS+ maps at the server.&nbsp;</li>
</ul>
<dl>
<p>  <b>1.1 <a name="Objects in NIS +">Objects in NIS +</a></b><br />
  There&nbsp; are three objects in NIS+&nbsp;<br />
  1. Parent domain -&nbsp; represented by&nbsp; <font style="font-weight: 400; position: static"><span class="kLink" style="font-weight: 400; position: static">domain<br />
    name</span></font> e.g.&nbsp; planet.com.: (Parent &nbsp; domain )</p>
<p>  2. org_dir&nbsp; &#8211; which contains all the NIS+&nbsp; tables .<br />
  3. groups_dir &#8211; contains the groups information , by default only admin<br />
    group is there.&nbsp;<br />
  &nbsp;<br />
  <b>1.2 <a name="Standard Tables in NIS+">Standard Tables in NIS+</p>
<p>    </a></b><br />
  They contain same type of information&nbsp; as standard files of the same<br />
    name .The passwd table however contains the encrypted password information<br />
    also .<br />
  passwd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
    group&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
    auto_master&nbsp;&nbsp;&nbsp;&nbsp; auto_home</p>
<p>  Bootparams&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cred&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ethers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
    hosts</p>
<p>  mail_aliases&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sendmailvars&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
    netmasks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; netgroup&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>  networks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; protocols&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
    rpc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
    services</p>
<p>  timezone&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; client_info</p>
<p>  <b>1.3 <a name="Groups in NIS+">Groups in NIS+</a></b><br />
  By default only admin group is created at the time of installation of NIS+<br />
    .<br />
  &nbsp;<br />
  <b>2.0 <a name="Preparing for Install">Preparing for Install</a></b><br />
  First step is to prepare the data files for NIS+ maps .This can be done by<br />
    coping the files which needs to be put in the nis+ tables for centralized<br />
    administration . The files are located in /etc and mostly have the same name<br />
    as NIS+&nbsp; tables</p>
<p>If you want only passwords , groups , hosts , home directories to be<br />
administered then you need to copy the these files in some other directory &#8211; say<br />
nisfiles. You can make additional changes here .</p>
<dl>
  <b>#cp /etc/passwd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /export/home/nisfiles</b><br />
  <b>#cp /etc/group&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /export/home/nisfiles</b><br />
  <b>#cp /etc/hosts &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /export/home/nisfiles</b>
</dl>
<p>auto_home can&nbsp; be created by editing a copy of passwd file and keeping<br />
only the login name and home directory .</p>
<p>A typical auto_home will consists of following entries</p>
<dl>
  <b>#vi auto_home</b><br />
  +auto_home<br />
  peter&nbsp;&nbsp; 10.20.30.40:/home/&amp;<br />
  john&nbsp;&nbsp;&nbsp; 10.20.30.40:/home/&amp;
</dl>
<p>First column is user names&nbsp; followed by&nbsp; name of the machine<br />
providing home directories &amp; home&nbsp; directory path.</p>
<dl>
  <b>2.1 <a name="Installing Server">Installing Server</a></b><br />
  a) Define a default&nbsp; domain&nbsp; if not defined already in /etc/defaultdomain.<br />
  &nbsp;<br />
  &nbsp;&nbsp;&nbsp; <b>#domainname</b><br />
  &nbsp;&nbsp;&nbsp; planet.com<br />
  &nbsp;&nbsp;&nbsp; <b>#domainname &gt; /etc/defaultdomain</b><br />
  &nbsp;<br />
  b) As root ; change directory to the /usr/lib/nis or add PATH to this<br />
    directory.<br />
  &nbsp;&nbsp;&nbsp; Run server initialization program.<br />
  &nbsp;<br />
  &nbsp;&nbsp;&nbsp; <b>#nisserver -r</p>
<p>    </b>To setup server in NIS compatibility mode</p>
<p>    <b>#nisserver -r -Y<br />
    </b><br />
  <br />
    The above commands will setup the NIS+ server software.
</dl>
<p>Reboot the server</p>
<dl>
  c) Login as root ; change directory to the one containing the files<br />
    auto_home , passwd&nbsp; and group.<br />
  &nbsp;&nbsp;&nbsp; Run the command to populate the empty nis+ tables.<br />
  &nbsp;<br />
  &nbsp;&nbsp;&nbsp; <b>#cd /export/home/nisfiles</b><br />
  <b>&nbsp;&nbsp;&nbsp; #nispopulate –v –F</b><br />
  &nbsp;&nbsp;&nbsp; This will try to populate all the standard tables from<br />
    the files in local directory .&nbsp; you can also&nbsp;<br />
  &nbsp;&nbsp;&nbsp; specify a particular file name in&nbsp; for populating<br />
    a&nbsp; single&nbsp;&nbsp;&nbsp;&nbsp;table e.g.<br />
  &nbsp;<br />
  &nbsp;&nbsp;&nbsp;<b> #nispopulate –v –F&nbsp; auto_home&nbsp;</b><br />
  &nbsp;&nbsp;&nbsp; auto_home is the local file containg the entries in<br />
    proper format.<br />
  &nbsp;<br />
  <b>3.0 <a name="Installing Client">Installing Client</a></b><br />
  a.) Login as root in client<br />
  &nbsp;&nbsp; Define a default domain&nbsp; name – planet&nbsp; here.<br />
  b.) Run the client initialsation programme.<br />
  &nbsp;&nbsp; <b>#nisclient –i&nbsp; -h jupiter -d panet.com</b><br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; h&nbsp;&nbsp;&nbsp;&nbsp; is<br />
    for nis+ server host name .<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; d&nbsp;&nbsp;&nbsp;&nbsp; is<br />
    for nis+ domain name .<br />
  &nbsp;<br />
  &nbsp;&nbsp;&nbsp;&nbsp; reboot the&nbsp; client machine.<br />
  c.) Login again and open /etc/nsswitch.conf<br />
  &nbsp;&nbsp;&nbsp; check to see that only entries coreesponding to the<br />
    populated tables are&nbsp;<br />
  &nbsp;&nbsp;&nbsp; pointing to nisplus first&nbsp; and then files. Rest of<br />
    them should be&nbsp; files and nisplus.<br />
  &nbsp;</p>
<p style="text-align: justify">
<b>4.0 <a name="Administration Commands">Administration Commands</a></b>
<p style="text-align: justify">Following are some of the useful command for administering nis+</p>
<p style="text-align: justify;">&nbsp;</p>
<p>  <u><b>Listing&nbsp; table &amp; objects&nbsp; in NIS+</b></u>
</dl>
<ul>
<li><b>#nisls</b>&nbsp;&nbsp; ;Gives the total objects in NIS+
</li>
<li><b>#nisls org_dir</b>&nbsp; ;Lists the&nbsp; tables listed in the<br />
    directory. </p>
</li>
</ul>
<p><u><b>Listing a contents of tables</b></u></p>
<ul>
<li><b>#niscat passwd.org_dir</b></li>
</ul>
<dl>
  <u><b>Listing table structure</b></u>
</dl>
<ul>
<li><b>#niscat -o passwd.org_dir</b>&nbsp;&nbsp;&nbsp; ;lists structure of<br />
    password table.</li>
</ul>
<dl>
<p style="margin-left: 0in"><u><b>Adding A user</b></u>
</dl>
<ul>
<li><b>#nistbladm -a name=john&nbsp; uid=123 gid=111&nbsp; home=/home/john<br />
    shell=/bin/sh&nbsp;&nbsp; passwd.org_dir</b></li>
</ul>
<dl>
  <u><b>Changing the user information in passwd table (Super user only</b></u>
</dl>
<p>Fill in the corresponding values&nbsp; in &lt;&gt;</p>
<ul>
<li>#nistbladm –a&nbsp; name=&lt;&gt; passwd=&lt;&gt; uid=&lt;&gt; gid=&lt;&gt;<br />
    home=&lt;&gt; shelll=&lt;&gt; passwd.org_d</li>
</ul>
<dl>
  example&nbsp;
</dl>
<ul>
<li><b>#nistbladm -a name=john uid=123 gid=234 home=/home/john&nbsp;<br />
    shell=/bin/sh&nbsp; passwd.org_di</b></li>
</ul>
<dl>
  <u><b>to change only shell</b></u></p>
</dl>
<ul>
<li><b>#nistbladm -m shell=/usr/local/bin/bash&nbsp; [name=john],passwd.org_dir
<p>    </b></li>
</ul>
<dl>
  <u><b>Changing user passwd</b></u><br />
  &nbsp;<br />
  &nbsp;&nbsp;As root
</dl>
<ul>
<li><b># nispasswd&nbsp; &lt;user_name&gt; </b>;user has to update his key<br />
    through chkey -p</li>
</ul>
<dl>
  &nbsp;&nbsp;As user
</dl>
<ul>
<li><b>$ nispasswd&nbsp;</b>&nbsp; ;update encrypted key
</li>
<li><b>$chkey -p&nbsp;</b>&nbsp; ;(user NIS+ passwd and login passwd are the<br />
    same.)</p>
</li>
</ul>
<dl>
  <u><b>Adding user credentials</b></u>
</dl>
<ul>
<li><b>#nisaddcred -p 123 -P john local</b></li>
<li><b># nisaddcred -p unix.123@planet.com&nbsp;&nbsp; -P john.planet.com. des</b></li>
</ul>
<p>123 is userid and john is the user name.</p>
<p><u><b>Adding / removing a user dir entry in&nbsp; auto_home table :</b></u></p>
<ul>
<li><b>#nistbladm -a key=john value=10.20.30.40:/home/john&nbsp;<br />
    auto_home.org_dir</b></li>
<li><b>#nistbladm -r key=john auto_home.org_dir</b>&nbsp; ;If&nbsp; key is not<br />
    unique then more fields needs to be defined .</li>
</ul>
<p><u><b>Removing a user</b></u></p>
<ul>
<li>
<p align="left"><b>#nistbladm -r name=john passwd.org_dir</b></p>
</li>
</ul>
<p style="margin-left: 0in;"><u><b>Modifying the tables&nbsp; for multiple<br />
entries.</b></u></p>
<ul>
<li>
<p align="left"><b>#nisaddent -d passwd &gt; /tmp/passwd&nbsp; </b>;Dump the<br />
    table to &nbsp;&nbsp; a file </p>
</li>
<li>
<p align="left"><b>#vi /tmp/passwd</b> ;Edit the dumped file</p>
</li>
<li>
<p align="left"><b>#&nbsp;nisaddent -r -f /tmp/passwd passwd </b>;Put back<br />
    the dumped file.</p>
</li>
</ul>
<p>nisaddent command&nbsp; is available only for&nbsp; some of the&nbsp;<br />
standard tables, for others either nispopulate or&nbsp; nistbladm has to&nbsp;<br />
be used .</p>
]]></content:encoded>
			<wfw:commentRss>http://adminschoice.com/nisplus-installation-administration/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
