<?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>Kyle BrandtTag: Network Information Service | Kyle Brandt</title>
	<atom:link href="http://www.kbrandt.com/tag/network-information-service/feed" rel="self" type="application/rss+xml" />
	<link>http://www.kbrandt.com</link>
	<description>Original computing articles by a systems administrator</description>
	<lastBuildDate>Mon, 19 Dec 2011 21:41:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Authenticating with Active Directory using Likewise Open and Migrating from NIS</title>
		<link>http://www.kbrandt.com/2008/11/authenticating-with-active-directory.html</link>
		<comments>http://www.kbrandt.com/2008/11/authenticating-with-active-directory.html#comments</comments>
		<pubDate>Thu, 20 Nov 2008 13:55:00 +0000</pubDate>
		<dc:creator>Kyle</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Windows / Exchange]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Likewise Open]]></category>
		<category><![CDATA[Network Information Service]]></category>
		<category><![CDATA[NIS]]></category>

		<guid isPermaLink="false">http://www.kbrandt.com/?p=35</guid>
		<description><![CDATA[The current infrastructure at my office uses network information services (NIS) to authenticate users on Linux machines against the office&#8217;s Window&#8217;s domain. I found this to be unreliable. It depends upon Microsoft Identity Management for Unix, version 5.2, which is flaky in my experience. My goal was to be able to transition from NIS to [...]]]></description>
			<content:encoded><![CDATA[<p>The current infrastructure at my office uses network information services (<a href="http://en.wikipedia.org/wiki/Network_Information_Service" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://en.wikipedia.org/wiki/Network_Information_Service');">NIS</a>) to authenticate users on Linux machines against the office&#8217;s Window&#8217;s domain.  I found this to be unreliable.  It depends upon Microsoft Identity Management for Unix, version 5.2, which is flaky in my experience.</p>
<p>My goal was to be able to transition from NIS to authenticating directly with Active Directory (AD) smoothly.  I also wanted to maintain the shared home directories that reside on a network file system (NFS) server.  The solution I have chosen is<a href="http://www.likewisesoftware.com/products/likewise_open/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.likewisesoftware.com/products/likewise_open/');"> Likewise Open</a>, I have found it very easy to set up while still being customizable.  In order to maintain the shared home directories I have just taken the automount configuration out of NIS and put it locally on each machine.  Even though this may not be as centralized I think it is better because the mounts don&#8217;t depend upon Microsoft&#8217;s Unix Identity Management.</p>
<p>The following are the steps I took to set this up. Likewise has good documentation so I recommend you look at that before you follow my steps.  I am deploying this as I rebuild machines with Centos 5.2 which makes the process a little neater (If you want to transition current machines you will probably need to google nsswitch.conf):</p>
<ol>
<li>When deploying Centos be sure to set up <a href="http://www.ntp.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.ntp.org/');">Network Time Protocol</a> (NTP) during the installation because Kerberos authentication depends on approximate clock synchronization between the client and the server.</li>
<li>Download and install Likewise Open (as root):<br />
a)     <span style="font-family:courier new;">wget </span><a style="font-family: courier new;" href="http://www.likewisesoftware.com/bits/Fall08/3895/LikewiseIdentityServiceOpen-5.0.0.3895-linux-i386-rpm-installer" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.likewisesoftware.com/bits/Fall08/3895/LikewiseIdentityServiceOpen-5.0.0.3895-linux-i386-rpm-installer');">http://www.likewisesoftware.com/bits/Fall08/3895/LikewiseIdentityServiceOpen-5.0.0.3895-linux-i386-rpm-installer</a><br />
b) <span style="font-family:courier new;">chmod +x   LikewiseIdentityServiceOpen-5.0.0.3895-linux-i386-rpm-installer</span><br />
c) <span style="font-family:courier new;">./LikewiseIdentityServiceOpen-5.0.0.3895-linux-i386-rpm-installer</span></li>
<li>Join the domain (as root):<br />
a) <span style="font-family:courier new;">/opt/likewise/bin/domainjoin-cli join mydomain.com administrator</span><br />
b) Where administrator is a user with privileges to join a computer to the domain</li>
<li>Customize Likewise to use the mounted home directories (automount of home directories explained in step 5).  It is important to do this before logging in, because once users have logged in you can&#8217;t change the home directory without reinitializing likewise:<br />
a) in /etc/likewise/lsassd.conf edit the following:<br />
i) Change the homedirecy path:  <span style="font-family:courier new;">homedir-template = %H/users/%U</span><br />
ii) Make sure it doesn&#8217;t mess up a home directory: <span style="font-family:courier new;">create-homedir = no</span><br />
iii) Make it so when logging in the domain does not have to be specified:  <span style="font-family:courier new;">assume-default-domain = yes</span><br />
iv) Changed the shell to bash: <span style="font-family:courier new;">login-shell-template = /bin/bash</span></li>
<li>Set up automount to mount people&#8217;s home directories which live on a NFS server:<br />
a) Add the following to /etc/auto.master: <span style="font-family:courier new;">/home/users /etc/auto.home &#8211;timeout 60</span><br />
b) Create auto.home and enter the following into the file: <span style="font-family:courier new;">* -rw [nfs_server_ip]:/dir_where_homes_are/&amp;</span><br />
c) restart autofs: <span style="font-family:courier new;">/etc/init.d/autofs restart</span><br />
d) The home directories will not appear until you change directory into them, hence <span style="font-style: italic;">auto</span>mount</li>
<li>Migrate from NIS:<br />
a) After a successful login with a windows username type the <span style="font-family:courier new;">id</span> command and note the users <a href="http://en.wikipedia.org/wiki/User_identifier_%28Unix%29" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://en.wikipedia.org/wiki/User_identifier_%28Unix%29');">UID</a> number.  The UID number is what Unix cares about, the name isn&#8217;t important.  The UID that Likewise generates is a hashed version of the <a href="http://en.wikipedia.org/wiki/Security_Identifier" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://en.wikipedia.org/wiki/Security_Identifier');">Windows SID</a>.<br />
b) Log into your Windows domain controller.  Click the user properties and then in the &#8220;Unix Properties&#8221; tab change the UID to match what Likewise generated.  This way servers that are still on NIS will be consistent with Likewise Open.<br />
c) Reown the users home directory with the new UID: chown -R [UID] /home/users/[user]</li>
<li>Optional:  Change users shell<br />
a) Since everyone with Likewise uses the same shell, if you like a different shell like zsh you can put the following in /home/users/[user]/.profile : <span style="font-family:courier new;">if which zsh; then; exec zsh; fi</span><br />
b) The exec command replaces the current shell with whatever command you specify, so you won&#8217;t be running zsh within a bash process.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.kbrandt.com/2008/11/authenticating-with-active-directory.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

