<?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>Seeds of Genius &#187; Featured</title>
	<atom:link href="http://www.seedsofgenius.net/category/featured/feed" rel="self" type="application/rss+xml" />
	<link>http://www.seedsofgenius.net</link>
	<description>Defining Value Add</description>
	<lastBuildDate>Wed, 19 Oct 2011 18:13:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Solaris Authentication Login with Active Directory</title>
		<link>http://www.seedsofgenius.net/solaris/solaris-authentication-login-with-active-directory</link>
		<comments>http://www.seedsofgenius.net/solaris/solaris-authentication-login-with-active-directory#comments</comments>
		<pubDate>Thu, 03 Jun 2010 20:41:33 +0000</pubDate>
		<dc:creator>fcaton</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Solaris]]></category>

		<guid isPermaLink="false">http://www.seedsofgenius.net/?p=301</guid>
		<description><![CDATA[In most office environments users will have a Windows workstation on their desktop; most locations do not have users&#8217; log into a Unix/Linux desktop as their primary work environment. In [...]]]></description>
			<content:encoded><![CDATA[<p>In most  office environments users will have a Windows workstation on their  desktop; most locations do not have users&#8217; log into a Unix/Linux desktop  as their primary work environment.  In these environments a small  percentage of these users may have a need to connect to their Unix  servers in order to manage databases, application servers, web servers,  etc.  It becomes an administrative nightmare to manage multiple sets of  users for the Windows and the Unix systems.  The reason for this  nightmare is primarily password management. In a lot of cases, Windows  and Unix systems have different password requirements even though they  may be in the same environment.</p>
<p>Often  times, password requirements may differ between the two system types.   This means users will have to use a different password on Windows and  Unix.  Also, when password change dates are not synchronized between the  Windows and Unix systems you&#8217;ll end with users that forget their Unix  passwords on a very frequent basis.</p>
<p>This article is  meant to provide the basic procedures to allow a Solaris system to use  user information provided by Active Directory on a Windows 2008 server  as the authentication method for logging into Solaris.</p>
<p>The  following instructions are cobbled together from several locations on  the internet and from in house testing.<br />
We primarily used the  following two sites, which offer steps on configuration using Windows  2003 R2.  We then made changes where required.</p>
<p><a href="http://blog.scottlowe.org/2006/08/15/solaris-10-and-active-directory-integration/">Sun  Wikis<br />
Scott  Lowe&#8217;s Blog</a></p>
<p><strong><span style="text-decoration: underline;">Our Test Environment</span></strong></p>
<ul type="disc">
<li>Domain Controller Information
<ul type="circle">
<li>Windows  2008 R2</li>
<li>Hostname = win2k8-dc</li>
<li>IP Address = 192.168.3.76</li>
<li>Domain  = test.sog.com</li>
<li>Kerberos Realm = TEST.SOG.COM</li>
</ul>
</li>
<li>Client  Information
<ul type="circle">
<li>Solaris 10_u8 x86</li>
<li>Hostname  = keystone</li>
<li>IP Address = 192.168.3.66</li>
</ul>
</li>
</ul>
<p><span style="font-size: large;"><strong><span style="text-decoration: underline;">Windows Configuration</span></strong></span></p>
<p>It is assumed  that Active Directory is setup and that DNS is configured on the domain  controller.  The steps provided are what you need to do to add Unix  functionality to an already existing Windows AD environment.  The  Solaris clients should be added to the DNS records on the DC.</p>
<p>The  following steps are required to add all additional functionality to the  domain controller to allow for Solaris clients to authenticate against  AD.</p>
<p><strong><span style="text-decoration: underline;">Install UNIX Schema into Active Directory<br />
</span></strong></p>
<p>Open &#8220;Server Manager&#8221; and click on  &#8220;Roles&#8221; in the left pane.  Click on &#8220;Add Role Services&#8221; in the &#8220;Active  Directory Domain Services&#8221; section in the right pane.</p>
<p><img class="alignnone" title="Screenshot #1" src="http://www.seedsofgenius.net/images/1_UNIX_AD_Auth_small.png" alt="" width="717" height="516" /></p>
<hr />Click on the check box to add &#8220;Identitiy  Management for Unix.&#8221;  Remove Password Synchronization then click on &#8220;Next&#8221;</p>
<p><img class="alignnone" title="Screenshot #2" src="http://www.seedsofgenius.net/images/2_UNIX_AD_Auth_small.png" alt="" width="547" height="404" /></p>
<hr />When you  reach the &#8220;Confirm Installation&#8221; page click on &#8220;Install&#8221;</p>
<p><img class="alignnone" title="Screenshot #3" src="http://www.seedsofgenius.net/images/3_UNIX_AD_Auth_small.png" alt="" width="546" height="403" /></p>
<hr />Click on &#8220;Close&#8221; on the next screen.  Your Domain Controller will now reboot.</p>
<p><img class="alignnone" title="Screenshot #5" src="http://www.seedsofgenius.net/images/5_UNIX_AD_Auth_small.png" alt="" width="546" height="403" /></p>
<hr /><strong><span style="text-decoration: underline;">User  Configuration in AD</span></strong></p>
<p>Any users that you want to be able to use  Active Directory for Solaris logins must have the Unix Attributes set  under User Properties for that user.  These properties include the UID,  Primary GID, login shell, and home directory.  (The users’ GECOS will  come from the Display Name setting under the General tab of the users’  properties.)</p>
<p><img class="alignnone" title="Screenshot #7" src="http://www.seedsofgenius.net/images/7_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p><img class="alignnone" title="Screenshot #8" src="http://www.seedsofgenius.net/images/8_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p><img class="alignnone" title="Screenshot #9" src="http://www.seedsofgenius.net/images/9_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p>Under Active Directory Users and Computers Right click the new user account and select Properties.  In the user&#8217;s properties window select the  <em>Unix Attributes</em> tab.</p>
<p>Select  the domain under &#8220;NIS Domain&#8221; and fill in the fields.</p>
<p><img class="alignnone" title="Screenshot #10" src="http://www.seedsofgenius.net/images/10_UNIX_AD_Auth.png" alt="" width="423" height="549" /></p>
<p>All other user properties  (secondary groups, RBAC roles/profiles/auths…) will come from the  standard file locations on the Solaris client systems- (/etc/group,  /etc/users, /etc/security/*attr)</p>
<p>Also, make sure that the user’s  password is not set to ‘<em>change at next login</em>.’  Solaris does not  have the hooks back into AD to do password management, so your user will  not be prompted to change their password and they will not be allowed  to login.  All they will see is a messages saying: “Login Incorrect.”</p>
<p style="padding-left: 30px;"><span style="color: #999999;"><span style="text-decoration: underline;">Create Kerberos  Keytab for Client System</span></span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">Although this step is given on both  of the sites provided above, I have found that it is not required to  create a functioning Solaris -&gt; AD authentication environment.  I do not know the security implication of not performing this step.<br />
On  the Windows system, create a user account for the Solaris system that  will be authenticating. In this example we are creating a user account  named host-keystone for the host keystone.  (Note: this is a user  account, not a computer account)</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;"><br />
</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">Once  this user is created you can disable it for security purposes.</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">The  purpose of this step is create the keytab file that will be transferred  to the /etc/krb5 directory of the Solaris system that will be  authenticating against AD.  In order to create the keytab file run the  following command from a CMD prompt on the domain controller.  (Make  appropriate changes for you local environment.)</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;"><span style="font-size: x-small;">C:\Users\Administrator&gt;  ktpass –princ HOST\keystone.test.sog.com@TEST.SOG.COM -mapuser  TEST\host-keystone –crypto DES-CBC-MD5 +DesOnly –pass p@ssword1 -ptype  KRB5_NT_PRINCIPAL –out Desktop\keystone.keytab</span></span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">Transfer  the file to the host keystone as /etc/krb5/krb5.keytab</span></p>
<p style="padding-left: 30px;">
<p><span style="text-decoration: underline;">Create  ProxyDN User Account</span></p>
<p>On the Windows system, create a user  account that will be the proxyDN.  Make this user a member of &#8220;Domain  Guests.&#8221;   Give it a password, and select ‘password never expires’<br />
This  will be the proxyDN username used when you run the ldapclient command  later on.  This account must remain enabled.<br />
In this test we  created a user account called “ProxyDNUser&#8221; with a password of  “p@ssword1”</p>
<p><img class="alignnone" title="Screenshot #11" src="http://www.seedsofgenius.net/images/11_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p><img class="alignnone" title="Screenshot #12" src="http://www.seedsofgenius.net/images/12_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p>Make sure  to use the Display Name under the General properties (Full Name when  creating the user) during the ldapclient step.  In this case the correct user to use during the ldapclient command will be ProxyDNUser.  Do not use the user  logon name.  We ran into a bit of a  problem when we kept trying to use the Windows logon name and we kept  getting messages saying:</p>
<p><span style="font-family: &quot;courier new&quot;;"><span style="font-size: x-small;">libsldap: Status: 49  Mesg: openConnection: simple bind failed  &#8211; Invalid credentials</span></span></p>
<p>It was a bit frustrating when  we were completely sure that we were using the right password and still  kept getting a messages saying ‘Invalid Credentials.’</p>
<p>Use  ADSIedit on your domain controller to see the full DN for the user  account if you keep getting the message above and you’re positive you  have the password correct.</p>
<p><span style="font-size: large;"><strong><span style="text-decoration: underline;">Solaris  Configuration</span></strong></span></p>
<p><span style="text-decoration: underline;">Client Side DNS  Configuration</span></p>
<p>Your Solaris system should be a member of the  DNS domain defined by your domain controller.   Make sure to create both  forward and reverse lookup records in the domain for the Solaris  system.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># cat /etc/resolv.conf<br />
domain test.sog.com<br />
nameserver 192.168.3.76</span></p>
<p>Make sure you have  the /etc/nsswitch.conf file setup to use DNS as a name service for  hosts.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># grep &#8216;^hosts&#8217; /etc/nsswitch.conf<br />
hosts        files dns</span></p>
<p>Verify that DNS works.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># nslookup `hostname`<br />
Server:         192.168.3.76<br />
Address:        192.168.3.76#53</p>
<p>Name:   keystone.test.sog.com<br />
Address: 192.168.3.66</span></p>
<p>The following nslookup commands should  produce output similar to the following.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># nslookup -querytype=any  _ldap._tcp<br />
Server:         192.168.3.76<br />
Address:         192.168.3.76#53</p>
<p>_ldap._tcp.test.sog.com service = 0 100 389  win2k8-dc.test.sog.com.</p>
<p># nslookup -querytype=any  _gc._tcp<br />
Server:         192.168.3.76<br />
Address:         192.168.3.76#53</p>
<p>_gc._tcp.test.sog.com   service = 0 100 3268  win2k8-dc.test.sog.com.</span></p>
<p><span style="text-decoration: underline;">Kerberos</span></p>
<p>Configure  the /etc/krb5/krb5.conf file on the Solaris client.  Make appropriate  changes required for your local environment.<br />
This is the /etc/krb5/krb5.conf that we used on our test system.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt">[libdefaults]<br />
default_realm =  TEST.SOG.COM<br />
dns_lookup_kdc = true<br />
verify_ap_req_nofail = false<br />
[realms]<br />
TEST.SOG.COM = {<br />
kdc =  WIN2K8-DC.TEST.SOG.COM<br />
default_domain = TEST<br />
admin_server = WIN2K8-DC.TEST.SOG.COM<br />
}<br />
[domain_realm]<br />
.test.sog.com =  TEST.SOG.COM<br />
test.sog.com = TEST.SOG.COM<br />
[logging]<br />
default =  FILE:/var/krb5/kdc.log<br />
kdc = FILE:/var/krb5/kdc.log<br />
kdc_rotate = {<br />
period =  1d<br />
versions = 10<br />
}<br />
[appdefaults]<br />
pam = {<br />
debug =  false<br />
ticket_lifetime = 36000<br />
renew_lifetime = 36000<br />
forwardable = true<br />
krb4_convert = false<br />
}<br />
kinit = {<br />
renewable  = true<br />
forwardable= true<br />
}</span></p>
<p>Run  the kinit command and enter the administrator’s password.  If the  command runs successfully, you will see no output.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># kinit administrator<br />
Password for  administrator@TEST.SOG.COM:</span></p>
<p><span style="text-decoration: underline;">LDAP</span></p>
<p>ldap  client initialization on Solaris host.  The part of the command in  orange needs to be modified for your environment.  The rest of the  command is standard across all configurations.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># ldapclient manual \<br />
-a credentialLevel=proxy \<br />
-a authenticationMethod=simple \<br />
<span style="color: #ff6600;">-a proxyDN=cn=&#8221;ProxyDNUser,cn=Users,dc=TEST,dc=SOG,dc=COM&#8221; \<br />
-a proxyPassword=p@ssword1 \<br />
-a defaultSearchBase=dc=TEST,dc=SOG,dc=COM \<br />
-a domainName=TEST.SOG.COM \<br />
-a &#8220;defaultServerList=192.168.3.76&#8243; \</span><br />
-a attributeMap=group:userpassword=userPassword \<br />
-a attributeMap=group:memberuid=memberUid \<br />
-a attributeMap=group:gidnumber=gidNumber \<br />
-a attributeMap=passwd:gecos=cn \<br />
-a attributeMap=passwd:gidnumber=gidNumber \<br />
-a attributeMap=passwd:uidnumber=uidNumber \<br />
-a attributeMap=passwd:homedirectory=unixHomeDirectory \<br />
-a attributeMap=passwd:loginshell=loginShell \<br />
-a attributeMap=shadow:shadowflag=shadowFlag \<br />
-a attributeMap=shadow:userpassword=userPassword \<br />
-a objectClassMap=group:posixGroup=group \<br />
-a objectClassMap=passwd:posixAccount=user \<br />
-a objectClassMap=shadow:shadowAccount=user \<br />
<span style="color: #ff6600;">-a serviceSearchDescriptor=passwd:dc=TEST,dc=SOG,dc=COM?sub \<br />
-a serviceSearchDescriptor=group:dc=TEST,dc=SOG,dc=COM?sub</span></p>
<p># cp /etc/nsswitch.files  /etc/nsswitch.conf</p>
<p># vi /etc/nsswitch.conf<br />
passwd  files ldap<br />
group     files ldap<br />
hosts      files dns</p>
<p># svcadm restart  ldap/client</span></p>
<p><span style="text-decoration: underline;">PAM</span></p>
<p>Edit  /etc/pam.conf to use Kerberos authentication.  Both sites provided at  the top of this article show the same modifications to pam.conf.  In our  tests we found that those entries caused problems, most notably that  the root user could not login from the console.  Here is the /etc/pam.conf that we found to work best.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># vi /etc/pam.conf<br />
# Authentication  management<br />
#<br />
# login service (explicit because of pam_dial_auth)<br />
#<br />
login   auth  requisite          pam_authtok_get.so.1<br />
login   auth  required           pam_dhkeys.so.1<br />
login   auth  required           pam_unix_cred.so.1<br />
<span style="color: #ff6600;"> login    auth sufficient         pam_krb5.so.1</span><br />
login   auth  required           pam_unix_auth.so.1<br />
login   auth  required           pam_dial_auth.so.1<br />
# Default definitions for  Authentication management<br />
# Used when service name is not explicitly  mentioned for authentication<br />
#<br />
other   auth  requisite          pam_authtok_get.so.1<br />
other   auth  required           pam_dhkeys.so.1<br />
other   auth  required           pam_unix_cred.so.1<br />
<span style="color: #ff6600;"> other    auth sufficient         pam_krb5.so.1</span><br />
other   auth  required           pam_unix_auth.so.1<br />
# Default definition for  Password management<br />
# Used when service name is not explicitly  mentioned for password management<br />
other   auth  requisite          pam_authtok_get.so.1<br />
other   auth  required           pam_dhkeys.so.1<br />
other   auth  required           pam_unix_cred.so.1<br />
<span style="color: #ff6600;"> other    auth sufficient         pam_krb5.so.1</span><br />
other   auth  required           pam_unix_auth.so.1<br />
</span></p>
<p>Create  home directory for user.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># mkdir -p  /export/home/john.doe<br />
# chown john.doe:staff /export/home/john.doe<br />
# chmod 700 /export/home/john.doe<br />
</span></p>
<p>You should now be able to log into your Solaris system with your AD user account.
<div id="apf_post_footer">
<h4>Related Articles:</h4>
<ul>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=411">Mounting ISO Images in Solaris vs. AIX</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=406">Modify a Solaris Jumpstart Miniroot for Fun and Profit</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=363">Solaris Tips: Flash Archive (FLAR) with Zones</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=349">Solaris Tips: Unencapsulate SVM root mirror</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=337">Solaris Tips: Repairing the Boot Archive</a></li>
</ul>
</div>
<p><!-- HTML Codes by Quackit.com --><br />
<span style="font-family:Arial;font-size:18px;font-style:italic;font-weight:bold;text-decoration:underline;text-transform:none;color:000066;background-color:ffffff;">ABOUT US</span><br />
<span style="font-family:Arial;font-size:14px;font-style:normal;font-weight:bold;text-decoration:none;text-transform:none;color:003366;background-color:ffffff;">Seeds of Genius, Inc. offers a full range of IT solutions including hardware and software products in addition to consulting, installation and support services. For more information, please visit our main web site at <a href="http://www.seedsofgenius.com">http://www.seedsofgenius.com</a> or contact our Technical Sales department at (410) 312-9806.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.seedsofgenius.net/solaris/solaris-authentication-login-with-active-directory/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BIND 9.6.1-P3 on Solaris 10</title>
		<link>http://www.seedsofgenius.net/featured/bind-9-6-1-p3-on-solaris-10</link>
		<comments>http://www.seedsofgenius.net/featured/bind-9-6-1-p3-on-solaris-10#comments</comments>
		<pubDate>Tue, 23 Feb 2010 17:28:10 +0000</pubDate>
		<dc:creator>bisbell</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://www.seedsofgenius.net/?p=149</guid>
		<description><![CDATA[The version of BIND that comes with the most recent release of Solaris 10 is 9.3.6-P1. This document is meant to provide a step-by-step procedure to compile and install a [...]]]></description>
			<content:encoded><![CDATA[<p>In most  office environments users will have a Windows workstation on their  desktop; most locations do not have users&#8217; log into a Unix/Linux desktop  as their primary work environment.  In these environments a small  percentage of these users may have a need to connect to their Unix  servers in order to manage databases, application servers, web servers,  etc.  It becomes an administrative nightmare to manage multiple sets of  users for the Windows and the Unix systems.  The reason for this  nightmare is primarily password management. In a lot of cases, Windows  and Unix systems have different password requirements even though they  may be in the same environment.</p>
<p>Often  times, password requirements may differ between the two system types.   This means users will have to use a different password on Windows and  Unix.  Also, when password change dates are not synchronized between the  Windows and Unix systems you&#8217;ll end with users that forget their Unix  passwords on a very frequent basis.</p>
<p>This article is  meant to provide the basic procedures to allow a Solaris system to use  user information provided by Active Directory on a Windows 2008 server  as the authentication method for logging into Solaris.</p>
<p>The  following instructions are cobbled together from several locations on  the internet and from in house testing.<br />
We primarily used the  following two sites, which offer steps on configuration using Windows  2003 R2.  We then made changes where required.</p>
<p><a href="http://blog.scottlowe.org/2006/08/15/solaris-10-and-active-directory-integration/">Sun  Wikis<br />
Scott  Lowe&#8217;s Blog</a></p>
<p><strong><span style="text-decoration: underline;">Our Test Environment</span></strong></p>
<ul type="disc">
<li>Domain Controller Information
<ul type="circle">
<li>Windows  2008 R2</li>
<li>Hostname = win2k8-dc</li>
<li>IP Address = 192.168.3.76</li>
<li>Domain  = test.sog.com</li>
<li>Kerberos Realm = TEST.SOG.COM</li>
</ul>
</li>
<li>Client  Information
<ul type="circle">
<li>Solaris 10_u8 x86</li>
<li>Hostname  = keystone</li>
<li>IP Address = 192.168.3.66</li>
</ul>
</li>
</ul>
<p><span style="font-size: large;"><strong><span style="text-decoration: underline;">Windows Configuration</span></strong></span></p>
<p>It is assumed  that Active Directory is setup and that DNS is configured on the domain  controller.  The steps provided are what you need to do to add Unix  functionality to an already existing Windows AD environment.  The  Solaris clients should be added to the DNS records on the DC.</p>
<p>The  following steps are required to add all additional functionality to the  domain controller to allow for Solaris clients to authenticate against  AD.</p>
<p><strong><span style="text-decoration: underline;">Install UNIX Schema into Active Directory<br />
</span></strong></p>
<p>Open &#8220;Server Manager&#8221; and click on  &#8220;Roles&#8221; in the left pane.  Click on &#8220;Add Role Services&#8221; in the &#8220;Active  Directory Domain Services&#8221; section in the right pane.</p>
<p><img class="alignnone" title="Screenshot #1" src="http://www.seedsofgenius.net/images/1_UNIX_AD_Auth_small.png" alt="" width="717" height="516" /></p>
<hr />Click on the check box to add &#8220;Identitiy  Management for Unix.&#8221;  Remove Password Synchronization then click on &#8220;Next&#8221;</p>
<p><img class="alignnone" title="Screenshot #2" src="http://www.seedsofgenius.net/images/2_UNIX_AD_Auth_small.png" alt="" width="547" height="404" /></p>
<hr />When you  reach the &#8220;Confirm Installation&#8221; page click on &#8220;Install&#8221;</p>
<p><img class="alignnone" title="Screenshot #3" src="http://www.seedsofgenius.net/images/3_UNIX_AD_Auth_small.png" alt="" width="546" height="403" /></p>
<hr />Click on &#8220;Close&#8221; on the next screen.  Your Domain Controller will now reboot.</p>
<p><img class="alignnone" title="Screenshot #5" src="http://www.seedsofgenius.net/images/5_UNIX_AD_Auth_small.png" alt="" width="546" height="403" /></p>
<hr /><strong><span style="text-decoration: underline;">User  Configuration in AD</span></strong></p>
<p>Any users that you want to be able to use  Active Directory for Solaris logins must have the Unix Attributes set  under User Properties for that user.  These properties include the UID,  Primary GID, login shell, and home directory.  (The users’ GECOS will  come from the Display Name setting under the General tab of the users’  properties.)</p>
<p><img class="alignnone" title="Screenshot #7" src="http://www.seedsofgenius.net/images/7_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p><img class="alignnone" title="Screenshot #8" src="http://www.seedsofgenius.net/images/8_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p><img class="alignnone" title="Screenshot #9" src="http://www.seedsofgenius.net/images/9_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p>Under Active Directory Users and Computers Right click the new user account and select Properties.  In the user&#8217;s properties window select the  <em>Unix Attributes</em> tab.</p>
<p>Select  the domain under &#8220;NIS Domain&#8221; and fill in the fields.</p>
<p><img class="alignnone" title="Screenshot #10" src="http://www.seedsofgenius.net/images/10_UNIX_AD_Auth.png" alt="" width="423" height="549" /></p>
<p>All other user properties  (secondary groups, RBAC roles/profiles/auths…) will come from the  standard file locations on the Solaris client systems- (/etc/group,  /etc/users, /etc/security/*attr)</p>
<p>Also, make sure that the user’s  password is not set to ‘<em>change at next login</em>.’  Solaris does not  have the hooks back into AD to do password management, so your user will  not be prompted to change their password and they will not be allowed  to login.  All they will see is a messages saying: “Login Incorrect.”</p>
<p style="padding-left: 30px;"><span style="color: #999999;"><span style="text-decoration: underline;">Create Kerberos  Keytab for Client System</span></span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">Although this step is given on both  of the sites provided above, I have found that it is not required to  create a functioning Solaris -&gt; AD authentication environment.  I do not know the security implication of not performing this step.<br />
On  the Windows system, create a user account for the Solaris system that  will be authenticating. In this example we are creating a user account  named host-keystone for the host keystone.  (Note: this is a user  account, not a computer account)</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;"><br />
</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">Once  this user is created you can disable it for security purposes.</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">The  purpose of this step is create the keytab file that will be transferred  to the /etc/krb5 directory of the Solaris system that will be  authenticating against AD.  In order to create the keytab file run the  following command from a CMD prompt on the domain controller.  (Make  appropriate changes for you local environment.)</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;"><span style="font-size: x-small;">C:\Users\Administrator&gt;  ktpass –princ HOST\keystone.test.sog.com@TEST.SOG.COM -mapuser  TEST\host-keystone –crypto DES-CBC-MD5 +DesOnly –pass p@ssword1 -ptype  KRB5_NT_PRINCIPAL –out Desktop\keystone.keytab</span></span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">Transfer  the file to the host keystone as /etc/krb5/krb5.keytab</span></p>
<p style="padding-left: 30px;">
<p><span style="text-decoration: underline;">Create  ProxyDN User Account</span></p>
<p>On the Windows system, create a user  account that will be the proxyDN.  Make this user a member of &#8220;Domain  Guests.&#8221;   Give it a password, and select ‘password never expires’<br />
This  will be the proxyDN username used when you run the ldapclient command  later on.  This account must remain enabled.<br />
In this test we  created a user account called “ProxyDNUser&#8221; with a password of  “p@ssword1”</p>
<p><img class="alignnone" title="Screenshot #11" src="http://www.seedsofgenius.net/images/11_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p><img class="alignnone" title="Screenshot #12" src="http://www.seedsofgenius.net/images/12_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p>Make sure  to use the Display Name under the General properties (Full Name when  creating the user) during the ldapclient step.  In this case the correct user to use during the ldapclient command will be ProxyDNUser.  Do not use the user  logon name.  We ran into a bit of a  problem when we kept trying to use the Windows logon name and we kept  getting messages saying:</p>
<p><span style="font-family: &quot;courier new&quot;;"><span style="font-size: x-small;">libsldap: Status: 49  Mesg: openConnection: simple bind failed  &#8211; Invalid credentials</span></span></p>
<p>It was a bit frustrating when  we were completely sure that we were using the right password and still  kept getting a messages saying ‘Invalid Credentials.’</p>
<p>Use  ADSIedit on your domain controller to see the full DN for the user  account if you keep getting the message above and you’re positive you  have the password correct.</p>
<p><span style="font-size: large;"><strong><span style="text-decoration: underline;">Solaris  Configuration</span></strong></span></p>
<p><span style="text-decoration: underline;">Client Side DNS  Configuration</span></p>
<p>Your Solaris system should be a member of the  DNS domain defined by your domain controller.   Make sure to create both  forward and reverse lookup records in the domain for the Solaris  system.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># cat /etc/resolv.conf<br />
domain test.sog.com<br />
nameserver 192.168.3.76</span></p>
<p>Make sure you have  the /etc/nsswitch.conf file setup to use DNS as a name service for  hosts.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># grep &#8216;^hosts&#8217; /etc/nsswitch.conf<br />
hosts        files dns</span></p>
<p>Verify that DNS works.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># nslookup `hostname`<br />
Server:         192.168.3.76<br />
Address:        192.168.3.76#53</p>
<p>Name:   keystone.test.sog.com<br />
Address: 192.168.3.66</span></p>
<p>The following nslookup commands should  produce output similar to the following.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># nslookup -querytype=any  _ldap._tcp<br />
Server:         192.168.3.76<br />
Address:         192.168.3.76#53</p>
<p>_ldap._tcp.test.sog.com service = 0 100 389  win2k8-dc.test.sog.com.</p>
<p># nslookup -querytype=any  _gc._tcp<br />
Server:         192.168.3.76<br />
Address:         192.168.3.76#53</p>
<p>_gc._tcp.test.sog.com   service = 0 100 3268  win2k8-dc.test.sog.com.</span></p>
<p><span style="text-decoration: underline;">Kerberos</span></p>
<p>Configure  the /etc/krb5/krb5.conf file on the Solaris client.  Make appropriate  changes required for your local environment.<br />
This is the /etc/krb5/krb5.conf that we used on our test system.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt">[libdefaults]<br />
default_realm =  TEST.SOG.COM<br />
dns_lookup_kdc = true<br />
verify_ap_req_nofail = false<br />
[realms]<br />
TEST.SOG.COM = {<br />
kdc =  WIN2K8-DC.TEST.SOG.COM<br />
default_domain = TEST<br />
admin_server = WIN2K8-DC.TEST.SOG.COM<br />
}<br />
[domain_realm]<br />
.test.sog.com =  TEST.SOG.COM<br />
test.sog.com = TEST.SOG.COM<br />
[logging]<br />
default =  FILE:/var/krb5/kdc.log<br />
kdc = FILE:/var/krb5/kdc.log<br />
kdc_rotate = {<br />
period =  1d<br />
versions = 10<br />
}<br />
[appdefaults]<br />
pam = {<br />
debug =  false<br />
ticket_lifetime = 36000<br />
renew_lifetime = 36000<br />
forwardable = true<br />
krb4_convert = false<br />
}<br />
kinit = {<br />
renewable  = true<br />
forwardable= true<br />
}</span></p>
<p>Run  the kinit command and enter the administrator’s password.  If the  command runs successfully, you will see no output.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># kinit administrator<br />
Password for  administrator@TEST.SOG.COM:</span></p>
<p><span style="text-decoration: underline;">LDAP</span></p>
<p>ldap  client initialization on Solaris host.  The part of the command in  orange needs to be modified for your environment.  The rest of the  command is standard across all configurations.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># ldapclient manual \<br />
-a credentialLevel=proxy \<br />
-a authenticationMethod=simple \<br />
<span style="color: #ff6600;">-a proxyDN=cn=&#8221;ProxyDNUser,cn=Users,dc=TEST,dc=SOG,dc=COM&#8221; \<br />
-a proxyPassword=p@ssword1 \<br />
-a defaultSearchBase=dc=TEST,dc=SOG,dc=COM \<br />
-a domainName=TEST.SOG.COM \<br />
-a &#8220;defaultServerList=192.168.3.76&#8243; \</span><br />
-a attributeMap=group:userpassword=userPassword \<br />
-a attributeMap=group:memberuid=memberUid \<br />
-a attributeMap=group:gidnumber=gidNumber \<br />
-a attributeMap=passwd:gecos=cn \<br />
-a attributeMap=passwd:gidnumber=gidNumber \<br />
-a attributeMap=passwd:uidnumber=uidNumber \<br />
-a attributeMap=passwd:homedirectory=unixHomeDirectory \<br />
-a attributeMap=passwd:loginshell=loginShell \<br />
-a attributeMap=shadow:shadowflag=shadowFlag \<br />
-a attributeMap=shadow:userpassword=userPassword \<br />
-a objectClassMap=group:posixGroup=group \<br />
-a objectClassMap=passwd:posixAccount=user \<br />
-a objectClassMap=shadow:shadowAccount=user \<br />
<span style="color: #ff6600;">-a serviceSearchDescriptor=passwd:dc=TEST,dc=SOG,dc=COM?sub \<br />
-a serviceSearchDescriptor=group:dc=TEST,dc=SOG,dc=COM?sub</span></p>
<p># cp /etc/nsswitch.files  /etc/nsswitch.conf</p>
<p># vi /etc/nsswitch.conf<br />
passwd  files ldap<br />
group     files ldap<br />
hosts      files dns</p>
<p># svcadm restart  ldap/client</span></p>
<p><span style="text-decoration: underline;">PAM</span></p>
<p>Edit  /etc/pam.conf to use Kerberos authentication.  Both sites provided at  the top of this article show the same modifications to pam.conf.  In our  tests we found that those entries caused problems, most notably that  the root user could not login from the console.  Here is the /etc/pam.conf that we found to work best.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># vi /etc/pam.conf<br />
# Authentication  management<br />
#<br />
# login service (explicit because of pam_dial_auth)<br />
#<br />
login   auth  requisite          pam_authtok_get.so.1<br />
login   auth  required           pam_dhkeys.so.1<br />
login   auth  required           pam_unix_cred.so.1<br />
<span style="color: #ff6600;"> login    auth sufficient         pam_krb5.so.1</span><br />
login   auth  required           pam_unix_auth.so.1<br />
login   auth  required           pam_dial_auth.so.1<br />
# Default definitions for  Authentication management<br />
# Used when service name is not explicitly  mentioned for authentication<br />
#<br />
other   auth  requisite          pam_authtok_get.so.1<br />
other   auth  required           pam_dhkeys.so.1<br />
other   auth  required           pam_unix_cred.so.1<br />
<span style="color: #ff6600;"> other    auth sufficient         pam_krb5.so.1</span><br />
other   auth  required           pam_unix_auth.so.1<br />
# Default definition for  Password management<br />
# Used when service name is not explicitly  mentioned for password management<br />
other   auth  requisite          pam_authtok_get.so.1<br />
other   auth  required           pam_dhkeys.so.1<br />
other   auth  required           pam_unix_cred.so.1<br />
<span style="color: #ff6600;"> other    auth sufficient         pam_krb5.so.1</span><br />
other   auth  required           pam_unix_auth.so.1<br />
</span></p>
<p>Create  home directory for user.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># mkdir -p  /export/home/john.doe<br />
# chown john.doe:staff /export/home/john.doe<br />
# chmod 700 /export/home/john.doe<br />
</span></p>
<p>You should now be able to log into your Solaris system with your AD user account.
<div id="apf_post_footer">
<h4>Related Articles:</h4>
<ul>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=411">Mounting ISO Images in Solaris vs. AIX</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=406">Modify a Solaris Jumpstart Miniroot for Fun and Profit</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=363">Solaris Tips: Flash Archive (FLAR) with Zones</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=349">Solaris Tips: Unencapsulate SVM root mirror</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=337">Solaris Tips: Repairing the Boot Archive</a></li>
</ul>
</div>
<p><!-- HTML Codes by Quackit.com --><br />
<span style="font-family:Arial;font-size:18px;font-style:italic;font-weight:bold;text-decoration:underline;text-transform:none;color:000066;background-color:ffffff;">ABOUT US</span><br />
<span style="font-family:Arial;font-size:14px;font-style:normal;font-weight:bold;text-decoration:none;text-transform:none;color:003366;background-color:ffffff;">Seeds of Genius, Inc. offers a full range of IT solutions including hardware and software products in addition to consulting, installation and support services. For more information, please visit our main web site at <a href="http://www.seedsofgenius.com">http://www.seedsofgenius.com</a> or contact our Technical Sales department at (410) 312-9806.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.seedsofgenius.net/solaris/solaris-authentication-login-with-active-directory/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mirror boot drive on T5120 with onboard RAID controller.</title>
		<link>http://www.seedsofgenius.net/solaris/install/mirror-boot-drive-on-t5120-with-onboard-raid-controller</link>
		<comments>http://www.seedsofgenius.net/solaris/install/mirror-boot-drive-on-t5120-with-onboard-raid-controller#comments</comments>
		<pubDate>Fri, 08 Jan 2010 17:41:18 +0000</pubDate>
		<dc:creator>bisbell</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Installation]]></category>

		<guid isPermaLink="false">http://www.seedsofgenius.net/?p=115</guid>
		<description><![CDATA[These are the procedures used create a mirrored boot drive using the onboard RAID controller on a T5120.  The same procedure can be used with any Sun system that comes [...]]]></description>
			<content:encoded><![CDATA[<p>In most  office environments users will have a Windows workstation on their  desktop; most locations do not have users&#8217; log into a Unix/Linux desktop  as their primary work environment.  In these environments a small  percentage of these users may have a need to connect to their Unix  servers in order to manage databases, application servers, web servers,  etc.  It becomes an administrative nightmare to manage multiple sets of  users for the Windows and the Unix systems.  The reason for this  nightmare is primarily password management. In a lot of cases, Windows  and Unix systems have different password requirements even though they  may be in the same environment.</p>
<p>Often  times, password requirements may differ between the two system types.   This means users will have to use a different password on Windows and  Unix.  Also, when password change dates are not synchronized between the  Windows and Unix systems you&#8217;ll end with users that forget their Unix  passwords on a very frequent basis.</p>
<p>This article is  meant to provide the basic procedures to allow a Solaris system to use  user information provided by Active Directory on a Windows 2008 server  as the authentication method for logging into Solaris.</p>
<p>The  following instructions are cobbled together from several locations on  the internet and from in house testing.<br />
We primarily used the  following two sites, which offer steps on configuration using Windows  2003 R2.  We then made changes where required.</p>
<p><a href="http://blog.scottlowe.org/2006/08/15/solaris-10-and-active-directory-integration/">Sun  Wikis<br />
Scott  Lowe&#8217;s Blog</a></p>
<p><strong><span style="text-decoration: underline;">Our Test Environment</span></strong></p>
<ul type="disc">
<li>Domain Controller Information
<ul type="circle">
<li>Windows  2008 R2</li>
<li>Hostname = win2k8-dc</li>
<li>IP Address = 192.168.3.76</li>
<li>Domain  = test.sog.com</li>
<li>Kerberos Realm = TEST.SOG.COM</li>
</ul>
</li>
<li>Client  Information
<ul type="circle">
<li>Solaris 10_u8 x86</li>
<li>Hostname  = keystone</li>
<li>IP Address = 192.168.3.66</li>
</ul>
</li>
</ul>
<p><span style="font-size: large;"><strong><span style="text-decoration: underline;">Windows Configuration</span></strong></span></p>
<p>It is assumed  that Active Directory is setup and that DNS is configured on the domain  controller.  The steps provided are what you need to do to add Unix  functionality to an already existing Windows AD environment.  The  Solaris clients should be added to the DNS records on the DC.</p>
<p>The  following steps are required to add all additional functionality to the  domain controller to allow for Solaris clients to authenticate against  AD.</p>
<p><strong><span style="text-decoration: underline;">Install UNIX Schema into Active Directory<br />
</span></strong></p>
<p>Open &#8220;Server Manager&#8221; and click on  &#8220;Roles&#8221; in the left pane.  Click on &#8220;Add Role Services&#8221; in the &#8220;Active  Directory Domain Services&#8221; section in the right pane.</p>
<p><img class="alignnone" title="Screenshot #1" src="http://www.seedsofgenius.net/images/1_UNIX_AD_Auth_small.png" alt="" width="717" height="516" /></p>
<hr />Click on the check box to add &#8220;Identitiy  Management for Unix.&#8221;  Remove Password Synchronization then click on &#8220;Next&#8221;</p>
<p><img class="alignnone" title="Screenshot #2" src="http://www.seedsofgenius.net/images/2_UNIX_AD_Auth_small.png" alt="" width="547" height="404" /></p>
<hr />When you  reach the &#8220;Confirm Installation&#8221; page click on &#8220;Install&#8221;</p>
<p><img class="alignnone" title="Screenshot #3" src="http://www.seedsofgenius.net/images/3_UNIX_AD_Auth_small.png" alt="" width="546" height="403" /></p>
<hr />Click on &#8220;Close&#8221; on the next screen.  Your Domain Controller will now reboot.</p>
<p><img class="alignnone" title="Screenshot #5" src="http://www.seedsofgenius.net/images/5_UNIX_AD_Auth_small.png" alt="" width="546" height="403" /></p>
<hr /><strong><span style="text-decoration: underline;">User  Configuration in AD</span></strong></p>
<p>Any users that you want to be able to use  Active Directory for Solaris logins must have the Unix Attributes set  under User Properties for that user.  These properties include the UID,  Primary GID, login shell, and home directory.  (The users’ GECOS will  come from the Display Name setting under the General tab of the users’  properties.)</p>
<p><img class="alignnone" title="Screenshot #7" src="http://www.seedsofgenius.net/images/7_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p><img class="alignnone" title="Screenshot #8" src="http://www.seedsofgenius.net/images/8_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p><img class="alignnone" title="Screenshot #9" src="http://www.seedsofgenius.net/images/9_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p>Under Active Directory Users and Computers Right click the new user account and select Properties.  In the user&#8217;s properties window select the  <em>Unix Attributes</em> tab.</p>
<p>Select  the domain under &#8220;NIS Domain&#8221; and fill in the fields.</p>
<p><img class="alignnone" title="Screenshot #10" src="http://www.seedsofgenius.net/images/10_UNIX_AD_Auth.png" alt="" width="423" height="549" /></p>
<p>All other user properties  (secondary groups, RBAC roles/profiles/auths…) will come from the  standard file locations on the Solaris client systems- (/etc/group,  /etc/users, /etc/security/*attr)</p>
<p>Also, make sure that the user’s  password is not set to ‘<em>change at next login</em>.’  Solaris does not  have the hooks back into AD to do password management, so your user will  not be prompted to change their password and they will not be allowed  to login.  All they will see is a messages saying: “Login Incorrect.”</p>
<p style="padding-left: 30px;"><span style="color: #999999;"><span style="text-decoration: underline;">Create Kerberos  Keytab for Client System</span></span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">Although this step is given on both  of the sites provided above, I have found that it is not required to  create a functioning Solaris -&gt; AD authentication environment.  I do not know the security implication of not performing this step.<br />
On  the Windows system, create a user account for the Solaris system that  will be authenticating. In this example we are creating a user account  named host-keystone for the host keystone.  (Note: this is a user  account, not a computer account)</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;"><br />
</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">Once  this user is created you can disable it for security purposes.</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">The  purpose of this step is create the keytab file that will be transferred  to the /etc/krb5 directory of the Solaris system that will be  authenticating against AD.  In order to create the keytab file run the  following command from a CMD prompt on the domain controller.  (Make  appropriate changes for you local environment.)</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;"><span style="font-size: x-small;">C:\Users\Administrator&gt;  ktpass –princ HOST\keystone.test.sog.com@TEST.SOG.COM -mapuser  TEST\host-keystone –crypto DES-CBC-MD5 +DesOnly –pass p@ssword1 -ptype  KRB5_NT_PRINCIPAL –out Desktop\keystone.keytab</span></span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">Transfer  the file to the host keystone as /etc/krb5/krb5.keytab</span></p>
<p style="padding-left: 30px;">
<p><span style="text-decoration: underline;">Create  ProxyDN User Account</span></p>
<p>On the Windows system, create a user  account that will be the proxyDN.  Make this user a member of &#8220;Domain  Guests.&#8221;   Give it a password, and select ‘password never expires’<br />
This  will be the proxyDN username used when you run the ldapclient command  later on.  This account must remain enabled.<br />
In this test we  created a user account called “ProxyDNUser&#8221; with a password of  “p@ssword1”</p>
<p><img class="alignnone" title="Screenshot #11" src="http://www.seedsofgenius.net/images/11_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p><img class="alignnone" title="Screenshot #12" src="http://www.seedsofgenius.net/images/12_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p>Make sure  to use the Display Name under the General properties (Full Name when  creating the user) during the ldapclient step.  In this case the correct user to use during the ldapclient command will be ProxyDNUser.  Do not use the user  logon name.  We ran into a bit of a  problem when we kept trying to use the Windows logon name and we kept  getting messages saying:</p>
<p><span style="font-family: &quot;courier new&quot;;"><span style="font-size: x-small;">libsldap: Status: 49  Mesg: openConnection: simple bind failed  &#8211; Invalid credentials</span></span></p>
<p>It was a bit frustrating when  we were completely sure that we were using the right password and still  kept getting a messages saying ‘Invalid Credentials.’</p>
<p>Use  ADSIedit on your domain controller to see the full DN for the user  account if you keep getting the message above and you’re positive you  have the password correct.</p>
<p><span style="font-size: large;"><strong><span style="text-decoration: underline;">Solaris  Configuration</span></strong></span></p>
<p><span style="text-decoration: underline;">Client Side DNS  Configuration</span></p>
<p>Your Solaris system should be a member of the  DNS domain defined by your domain controller.   Make sure to create both  forward and reverse lookup records in the domain for the Solaris  system.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># cat /etc/resolv.conf<br />
domain test.sog.com<br />
nameserver 192.168.3.76</span></p>
<p>Make sure you have  the /etc/nsswitch.conf file setup to use DNS as a name service for  hosts.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># grep &#8216;^hosts&#8217; /etc/nsswitch.conf<br />
hosts        files dns</span></p>
<p>Verify that DNS works.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># nslookup `hostname`<br />
Server:         192.168.3.76<br />
Address:        192.168.3.76#53</p>
<p>Name:   keystone.test.sog.com<br />
Address: 192.168.3.66</span></p>
<p>The following nslookup commands should  produce output similar to the following.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># nslookup -querytype=any  _ldap._tcp<br />
Server:         192.168.3.76<br />
Address:         192.168.3.76#53</p>
<p>_ldap._tcp.test.sog.com service = 0 100 389  win2k8-dc.test.sog.com.</p>
<p># nslookup -querytype=any  _gc._tcp<br />
Server:         192.168.3.76<br />
Address:         192.168.3.76#53</p>
<p>_gc._tcp.test.sog.com   service = 0 100 3268  win2k8-dc.test.sog.com.</span></p>
<p><span style="text-decoration: underline;">Kerberos</span></p>
<p>Configure  the /etc/krb5/krb5.conf file on the Solaris client.  Make appropriate  changes required for your local environment.<br />
This is the /etc/krb5/krb5.conf that we used on our test system.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt">[libdefaults]<br />
default_realm =  TEST.SOG.COM<br />
dns_lookup_kdc = true<br />
verify_ap_req_nofail = false<br />
[realms]<br />
TEST.SOG.COM = {<br />
kdc =  WIN2K8-DC.TEST.SOG.COM<br />
default_domain = TEST<br />
admin_server = WIN2K8-DC.TEST.SOG.COM<br />
}<br />
[domain_realm]<br />
.test.sog.com =  TEST.SOG.COM<br />
test.sog.com = TEST.SOG.COM<br />
[logging]<br />
default =  FILE:/var/krb5/kdc.log<br />
kdc = FILE:/var/krb5/kdc.log<br />
kdc_rotate = {<br />
period =  1d<br />
versions = 10<br />
}<br />
[appdefaults]<br />
pam = {<br />
debug =  false<br />
ticket_lifetime = 36000<br />
renew_lifetime = 36000<br />
forwardable = true<br />
krb4_convert = false<br />
}<br />
kinit = {<br />
renewable  = true<br />
forwardable= true<br />
}</span></p>
<p>Run  the kinit command and enter the administrator’s password.  If the  command runs successfully, you will see no output.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># kinit administrator<br />
Password for  administrator@TEST.SOG.COM:</span></p>
<p><span style="text-decoration: underline;">LDAP</span></p>
<p>ldap  client initialization on Solaris host.  The part of the command in  orange needs to be modified for your environment.  The rest of the  command is standard across all configurations.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># ldapclient manual \<br />
-a credentialLevel=proxy \<br />
-a authenticationMethod=simple \<br />
<span style="color: #ff6600;">-a proxyDN=cn=&#8221;ProxyDNUser,cn=Users,dc=TEST,dc=SOG,dc=COM&#8221; \<br />
-a proxyPassword=p@ssword1 \<br />
-a defaultSearchBase=dc=TEST,dc=SOG,dc=COM \<br />
-a domainName=TEST.SOG.COM \<br />
-a &#8220;defaultServerList=192.168.3.76&#8243; \</span><br />
-a attributeMap=group:userpassword=userPassword \<br />
-a attributeMap=group:memberuid=memberUid \<br />
-a attributeMap=group:gidnumber=gidNumber \<br />
-a attributeMap=passwd:gecos=cn \<br />
-a attributeMap=passwd:gidnumber=gidNumber \<br />
-a attributeMap=passwd:uidnumber=uidNumber \<br />
-a attributeMap=passwd:homedirectory=unixHomeDirectory \<br />
-a attributeMap=passwd:loginshell=loginShell \<br />
-a attributeMap=shadow:shadowflag=shadowFlag \<br />
-a attributeMap=shadow:userpassword=userPassword \<br />
-a objectClassMap=group:posixGroup=group \<br />
-a objectClassMap=passwd:posixAccount=user \<br />
-a objectClassMap=shadow:shadowAccount=user \<br />
<span style="color: #ff6600;">-a serviceSearchDescriptor=passwd:dc=TEST,dc=SOG,dc=COM?sub \<br />
-a serviceSearchDescriptor=group:dc=TEST,dc=SOG,dc=COM?sub</span></p>
<p># cp /etc/nsswitch.files  /etc/nsswitch.conf</p>
<p># vi /etc/nsswitch.conf<br />
passwd  files ldap<br />
group     files ldap<br />
hosts      files dns</p>
<p># svcadm restart  ldap/client</span></p>
<p><span style="text-decoration: underline;">PAM</span></p>
<p>Edit  /etc/pam.conf to use Kerberos authentication.  Both sites provided at  the top of this article show the same modifications to pam.conf.  In our  tests we found that those entries caused problems, most notably that  the root user could not login from the console.  Here is the /etc/pam.conf that we found to work best.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># vi /etc/pam.conf<br />
# Authentication  management<br />
#<br />
# login service (explicit because of pam_dial_auth)<br />
#<br />
login   auth  requisite          pam_authtok_get.so.1<br />
login   auth  required           pam_dhkeys.so.1<br />
login   auth  required           pam_unix_cred.so.1<br />
<span style="color: #ff6600;"> login    auth sufficient         pam_krb5.so.1</span><br />
login   auth  required           pam_unix_auth.so.1<br />
login   auth  required           pam_dial_auth.so.1<br />
# Default definitions for  Authentication management<br />
# Used when service name is not explicitly  mentioned for authentication<br />
#<br />
other   auth  requisite          pam_authtok_get.so.1<br />
other   auth  required           pam_dhkeys.so.1<br />
other   auth  required           pam_unix_cred.so.1<br />
<span style="color: #ff6600;"> other    auth sufficient         pam_krb5.so.1</span><br />
other   auth  required           pam_unix_auth.so.1<br />
# Default definition for  Password management<br />
# Used when service name is not explicitly  mentioned for password management<br />
other   auth  requisite          pam_authtok_get.so.1<br />
other   auth  required           pam_dhkeys.so.1<br />
other   auth  required           pam_unix_cred.so.1<br />
<span style="color: #ff6600;"> other    auth sufficient         pam_krb5.so.1</span><br />
other   auth  required           pam_unix_auth.so.1<br />
</span></p>
<p>Create  home directory for user.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># mkdir -p  /export/home/john.doe<br />
# chown john.doe:staff /export/home/john.doe<br />
# chmod 700 /export/home/john.doe<br />
</span></p>
<p>You should now be able to log into your Solaris system with your AD user account.
<div id="apf_post_footer">
<h4>Related Articles:</h4>
<ul>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=411">Mounting ISO Images in Solaris vs. AIX</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=406">Modify a Solaris Jumpstart Miniroot for Fun and Profit</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=363">Solaris Tips: Flash Archive (FLAR) with Zones</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=349">Solaris Tips: Unencapsulate SVM root mirror</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=337">Solaris Tips: Repairing the Boot Archive</a></li>
</ul>
</div>
<p><!-- HTML Codes by Quackit.com --><br />
<span style="font-family:Arial;font-size:18px;font-style:italic;font-weight:bold;text-decoration:underline;text-transform:none;color:000066;background-color:ffffff;">ABOUT US</span><br />
<span style="font-family:Arial;font-size:14px;font-style:normal;font-weight:bold;text-decoration:none;text-transform:none;color:003366;background-color:ffffff;">Seeds of Genius, Inc. offers a full range of IT solutions including hardware and software products in addition to consulting, installation and support services. For more information, please visit our main web site at <a href="http://www.seedsofgenius.com">http://www.seedsofgenius.com</a> or contact our Technical Sales department at (410) 312-9806.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.seedsofgenius.net/solaris/solaris-authentication-login-with-active-directory/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jumpstart of Solaris VM on VMWare ESX hangs</title>
		<link>http://www.seedsofgenius.net/solaris/install/jumpstart-of-solaris-vm-on-vmware-esx-hangs</link>
		<comments>http://www.seedsofgenius.net/solaris/install/jumpstart-of-solaris-vm-on-vmware-esx-hangs#comments</comments>
		<pubDate>Wed, 28 Oct 2009 23:02:15 +0000</pubDate>
		<dc:creator>bwagner</dc:creator>
				<category><![CDATA[Errors]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Installation]]></category>

		<guid isPermaLink="false">http://192.168.1.15/?p=28</guid>
		<description><![CDATA[Problem Description: I have a Jumpstart infrastructure set up that has had no problems installing Solaris natively on my servers. However, when I attempt to do so within a virtual [...]]]></description>
			<content:encoded><![CDATA[<p>In most  office environments users will have a Windows workstation on their  desktop; most locations do not have users&#8217; log into a Unix/Linux desktop  as their primary work environment.  In these environments a small  percentage of these users may have a need to connect to their Unix  servers in order to manage databases, application servers, web servers,  etc.  It becomes an administrative nightmare to manage multiple sets of  users for the Windows and the Unix systems.  The reason for this  nightmare is primarily password management. In a lot of cases, Windows  and Unix systems have different password requirements even though they  may be in the same environment.</p>
<p>Often  times, password requirements may differ between the two system types.   This means users will have to use a different password on Windows and  Unix.  Also, when password change dates are not synchronized between the  Windows and Unix systems you&#8217;ll end with users that forget their Unix  passwords on a very frequent basis.</p>
<p>This article is  meant to provide the basic procedures to allow a Solaris system to use  user information provided by Active Directory on a Windows 2008 server  as the authentication method for logging into Solaris.</p>
<p>The  following instructions are cobbled together from several locations on  the internet and from in house testing.<br />
We primarily used the  following two sites, which offer steps on configuration using Windows  2003 R2.  We then made changes where required.</p>
<p><a href="http://blog.scottlowe.org/2006/08/15/solaris-10-and-active-directory-integration/">Sun  Wikis<br />
Scott  Lowe&#8217;s Blog</a></p>
<p><strong><span style="text-decoration: underline;">Our Test Environment</span></strong></p>
<ul type="disc">
<li>Domain Controller Information
<ul type="circle">
<li>Windows  2008 R2</li>
<li>Hostname = win2k8-dc</li>
<li>IP Address = 192.168.3.76</li>
<li>Domain  = test.sog.com</li>
<li>Kerberos Realm = TEST.SOG.COM</li>
</ul>
</li>
<li>Client  Information
<ul type="circle">
<li>Solaris 10_u8 x86</li>
<li>Hostname  = keystone</li>
<li>IP Address = 192.168.3.66</li>
</ul>
</li>
</ul>
<p><span style="font-size: large;"><strong><span style="text-decoration: underline;">Windows Configuration</span></strong></span></p>
<p>It is assumed  that Active Directory is setup and that DNS is configured on the domain  controller.  The steps provided are what you need to do to add Unix  functionality to an already existing Windows AD environment.  The  Solaris clients should be added to the DNS records on the DC.</p>
<p>The  following steps are required to add all additional functionality to the  domain controller to allow for Solaris clients to authenticate against  AD.</p>
<p><strong><span style="text-decoration: underline;">Install UNIX Schema into Active Directory<br />
</span></strong></p>
<p>Open &#8220;Server Manager&#8221; and click on  &#8220;Roles&#8221; in the left pane.  Click on &#8220;Add Role Services&#8221; in the &#8220;Active  Directory Domain Services&#8221; section in the right pane.</p>
<p><img class="alignnone" title="Screenshot #1" src="http://www.seedsofgenius.net/images/1_UNIX_AD_Auth_small.png" alt="" width="717" height="516" /></p>
<hr />Click on the check box to add &#8220;Identitiy  Management for Unix.&#8221;  Remove Password Synchronization then click on &#8220;Next&#8221;</p>
<p><img class="alignnone" title="Screenshot #2" src="http://www.seedsofgenius.net/images/2_UNIX_AD_Auth_small.png" alt="" width="547" height="404" /></p>
<hr />When you  reach the &#8220;Confirm Installation&#8221; page click on &#8220;Install&#8221;</p>
<p><img class="alignnone" title="Screenshot #3" src="http://www.seedsofgenius.net/images/3_UNIX_AD_Auth_small.png" alt="" width="546" height="403" /></p>
<hr />Click on &#8220;Close&#8221; on the next screen.  Your Domain Controller will now reboot.</p>
<p><img class="alignnone" title="Screenshot #5" src="http://www.seedsofgenius.net/images/5_UNIX_AD_Auth_small.png" alt="" width="546" height="403" /></p>
<hr /><strong><span style="text-decoration: underline;">User  Configuration in AD</span></strong></p>
<p>Any users that you want to be able to use  Active Directory for Solaris logins must have the Unix Attributes set  under User Properties for that user.  These properties include the UID,  Primary GID, login shell, and home directory.  (The users’ GECOS will  come from the Display Name setting under the General tab of the users’  properties.)</p>
<p><img class="alignnone" title="Screenshot #7" src="http://www.seedsofgenius.net/images/7_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p><img class="alignnone" title="Screenshot #8" src="http://www.seedsofgenius.net/images/8_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p><img class="alignnone" title="Screenshot #9" src="http://www.seedsofgenius.net/images/9_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p>Under Active Directory Users and Computers Right click the new user account and select Properties.  In the user&#8217;s properties window select the  <em>Unix Attributes</em> tab.</p>
<p>Select  the domain under &#8220;NIS Domain&#8221; and fill in the fields.</p>
<p><img class="alignnone" title="Screenshot #10" src="http://www.seedsofgenius.net/images/10_UNIX_AD_Auth.png" alt="" width="423" height="549" /></p>
<p>All other user properties  (secondary groups, RBAC roles/profiles/auths…) will come from the  standard file locations on the Solaris client systems- (/etc/group,  /etc/users, /etc/security/*attr)</p>
<p>Also, make sure that the user’s  password is not set to ‘<em>change at next login</em>.’  Solaris does not  have the hooks back into AD to do password management, so your user will  not be prompted to change their password and they will not be allowed  to login.  All they will see is a messages saying: “Login Incorrect.”</p>
<p style="padding-left: 30px;"><span style="color: #999999;"><span style="text-decoration: underline;">Create Kerberos  Keytab for Client System</span></span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">Although this step is given on both  of the sites provided above, I have found that it is not required to  create a functioning Solaris -&gt; AD authentication environment.  I do not know the security implication of not performing this step.<br />
On  the Windows system, create a user account for the Solaris system that  will be authenticating. In this example we are creating a user account  named host-keystone for the host keystone.  (Note: this is a user  account, not a computer account)</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;"><br />
</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">Once  this user is created you can disable it for security purposes.</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">The  purpose of this step is create the keytab file that will be transferred  to the /etc/krb5 directory of the Solaris system that will be  authenticating against AD.  In order to create the keytab file run the  following command from a CMD prompt on the domain controller.  (Make  appropriate changes for you local environment.)</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;"><span style="font-size: x-small;">C:\Users\Administrator&gt;  ktpass –princ HOST\keystone.test.sog.com@TEST.SOG.COM -mapuser  TEST\host-keystone –crypto DES-CBC-MD5 +DesOnly –pass p@ssword1 -ptype  KRB5_NT_PRINCIPAL –out Desktop\keystone.keytab</span></span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">Transfer  the file to the host keystone as /etc/krb5/krb5.keytab</span></p>
<p style="padding-left: 30px;">
<p><span style="text-decoration: underline;">Create  ProxyDN User Account</span></p>
<p>On the Windows system, create a user  account that will be the proxyDN.  Make this user a member of &#8220;Domain  Guests.&#8221;   Give it a password, and select ‘password never expires’<br />
This  will be the proxyDN username used when you run the ldapclient command  later on.  This account must remain enabled.<br />
In this test we  created a user account called “ProxyDNUser&#8221; with a password of  “p@ssword1”</p>
<p><img class="alignnone" title="Screenshot #11" src="http://www.seedsofgenius.net/images/11_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p><img class="alignnone" title="Screenshot #12" src="http://www.seedsofgenius.net/images/12_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p>Make sure  to use the Display Name under the General properties (Full Name when  creating the user) during the ldapclient step.  In this case the correct user to use during the ldapclient command will be ProxyDNUser.  Do not use the user  logon name.  We ran into a bit of a  problem when we kept trying to use the Windows logon name and we kept  getting messages saying:</p>
<p><span style="font-family: &quot;courier new&quot;;"><span style="font-size: x-small;">libsldap: Status: 49  Mesg: openConnection: simple bind failed  &#8211; Invalid credentials</span></span></p>
<p>It was a bit frustrating when  we were completely sure that we were using the right password and still  kept getting a messages saying ‘Invalid Credentials.’</p>
<p>Use  ADSIedit on your domain controller to see the full DN for the user  account if you keep getting the message above and you’re positive you  have the password correct.</p>
<p><span style="font-size: large;"><strong><span style="text-decoration: underline;">Solaris  Configuration</span></strong></span></p>
<p><span style="text-decoration: underline;">Client Side DNS  Configuration</span></p>
<p>Your Solaris system should be a member of the  DNS domain defined by your domain controller.   Make sure to create both  forward and reverse lookup records in the domain for the Solaris  system.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># cat /etc/resolv.conf<br />
domain test.sog.com<br />
nameserver 192.168.3.76</span></p>
<p>Make sure you have  the /etc/nsswitch.conf file setup to use DNS as a name service for  hosts.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># grep &#8216;^hosts&#8217; /etc/nsswitch.conf<br />
hosts        files dns</span></p>
<p>Verify that DNS works.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># nslookup `hostname`<br />
Server:         192.168.3.76<br />
Address:        192.168.3.76#53</p>
<p>Name:   keystone.test.sog.com<br />
Address: 192.168.3.66</span></p>
<p>The following nslookup commands should  produce output similar to the following.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># nslookup -querytype=any  _ldap._tcp<br />
Server:         192.168.3.76<br />
Address:         192.168.3.76#53</p>
<p>_ldap._tcp.test.sog.com service = 0 100 389  win2k8-dc.test.sog.com.</p>
<p># nslookup -querytype=any  _gc._tcp<br />
Server:         192.168.3.76<br />
Address:         192.168.3.76#53</p>
<p>_gc._tcp.test.sog.com   service = 0 100 3268  win2k8-dc.test.sog.com.</span></p>
<p><span style="text-decoration: underline;">Kerberos</span></p>
<p>Configure  the /etc/krb5/krb5.conf file on the Solaris client.  Make appropriate  changes required for your local environment.<br />
This is the /etc/krb5/krb5.conf that we used on our test system.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt">[libdefaults]<br />
default_realm =  TEST.SOG.COM<br />
dns_lookup_kdc = true<br />
verify_ap_req_nofail = false<br />
[realms]<br />
TEST.SOG.COM = {<br />
kdc =  WIN2K8-DC.TEST.SOG.COM<br />
default_domain = TEST<br />
admin_server = WIN2K8-DC.TEST.SOG.COM<br />
}<br />
[domain_realm]<br />
.test.sog.com =  TEST.SOG.COM<br />
test.sog.com = TEST.SOG.COM<br />
[logging]<br />
default =  FILE:/var/krb5/kdc.log<br />
kdc = FILE:/var/krb5/kdc.log<br />
kdc_rotate = {<br />
period =  1d<br />
versions = 10<br />
}<br />
[appdefaults]<br />
pam = {<br />
debug =  false<br />
ticket_lifetime = 36000<br />
renew_lifetime = 36000<br />
forwardable = true<br />
krb4_convert = false<br />
}<br />
kinit = {<br />
renewable  = true<br />
forwardable= true<br />
}</span></p>
<p>Run  the kinit command and enter the administrator’s password.  If the  command runs successfully, you will see no output.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># kinit administrator<br />
Password for  administrator@TEST.SOG.COM:</span></p>
<p><span style="text-decoration: underline;">LDAP</span></p>
<p>ldap  client initialization on Solaris host.  The part of the command in  orange needs to be modified for your environment.  The rest of the  command is standard across all configurations.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># ldapclient manual \<br />
-a credentialLevel=proxy \<br />
-a authenticationMethod=simple \<br />
<span style="color: #ff6600;">-a proxyDN=cn=&#8221;ProxyDNUser,cn=Users,dc=TEST,dc=SOG,dc=COM&#8221; \<br />
-a proxyPassword=p@ssword1 \<br />
-a defaultSearchBase=dc=TEST,dc=SOG,dc=COM \<br />
-a domainName=TEST.SOG.COM \<br />
-a &#8220;defaultServerList=192.168.3.76&#8243; \</span><br />
-a attributeMap=group:userpassword=userPassword \<br />
-a attributeMap=group:memberuid=memberUid \<br />
-a attributeMap=group:gidnumber=gidNumber \<br />
-a attributeMap=passwd:gecos=cn \<br />
-a attributeMap=passwd:gidnumber=gidNumber \<br />
-a attributeMap=passwd:uidnumber=uidNumber \<br />
-a attributeMap=passwd:homedirectory=unixHomeDirectory \<br />
-a attributeMap=passwd:loginshell=loginShell \<br />
-a attributeMap=shadow:shadowflag=shadowFlag \<br />
-a attributeMap=shadow:userpassword=userPassword \<br />
-a objectClassMap=group:posixGroup=group \<br />
-a objectClassMap=passwd:posixAccount=user \<br />
-a objectClassMap=shadow:shadowAccount=user \<br />
<span style="color: #ff6600;">-a serviceSearchDescriptor=passwd:dc=TEST,dc=SOG,dc=COM?sub \<br />
-a serviceSearchDescriptor=group:dc=TEST,dc=SOG,dc=COM?sub</span></p>
<p># cp /etc/nsswitch.files  /etc/nsswitch.conf</p>
<p># vi /etc/nsswitch.conf<br />
passwd  files ldap<br />
group     files ldap<br />
hosts      files dns</p>
<p># svcadm restart  ldap/client</span></p>
<p><span style="text-decoration: underline;">PAM</span></p>
<p>Edit  /etc/pam.conf to use Kerberos authentication.  Both sites provided at  the top of this article show the same modifications to pam.conf.  In our  tests we found that those entries caused problems, most notably that  the root user could not login from the console.  Here is the /etc/pam.conf that we found to work best.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># vi /etc/pam.conf<br />
# Authentication  management<br />
#<br />
# login service (explicit because of pam_dial_auth)<br />
#<br />
login   auth  requisite          pam_authtok_get.so.1<br />
login   auth  required           pam_dhkeys.so.1<br />
login   auth  required           pam_unix_cred.so.1<br />
<span style="color: #ff6600;"> login    auth sufficient         pam_krb5.so.1</span><br />
login   auth  required           pam_unix_auth.so.1<br />
login   auth  required           pam_dial_auth.so.1<br />
# Default definitions for  Authentication management<br />
# Used when service name is not explicitly  mentioned for authentication<br />
#<br />
other   auth  requisite          pam_authtok_get.so.1<br />
other   auth  required           pam_dhkeys.so.1<br />
other   auth  required           pam_unix_cred.so.1<br />
<span style="color: #ff6600;"> other    auth sufficient         pam_krb5.so.1</span><br />
other   auth  required           pam_unix_auth.so.1<br />
# Default definition for  Password management<br />
# Used when service name is not explicitly  mentioned for password management<br />
other   auth  requisite          pam_authtok_get.so.1<br />
other   auth  required           pam_dhkeys.so.1<br />
other   auth  required           pam_unix_cred.so.1<br />
<span style="color: #ff6600;"> other    auth sufficient         pam_krb5.so.1</span><br />
other   auth  required           pam_unix_auth.so.1<br />
</span></p>
<p>Create  home directory for user.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># mkdir -p  /export/home/john.doe<br />
# chown john.doe:staff /export/home/john.doe<br />
# chmod 700 /export/home/john.doe<br />
</span></p>
<p>You should now be able to log into your Solaris system with your AD user account.
<div id="apf_post_footer">
<h4>Related Articles:</h4>
<ul>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=411">Mounting ISO Images in Solaris vs. AIX</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=406">Modify a Solaris Jumpstart Miniroot for Fun and Profit</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=363">Solaris Tips: Flash Archive (FLAR) with Zones</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=349">Solaris Tips: Unencapsulate SVM root mirror</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=337">Solaris Tips: Repairing the Boot Archive</a></li>
</ul>
</div>
<p><!-- HTML Codes by Quackit.com --><br />
<span style="font-family:Arial;font-size:18px;font-style:italic;font-weight:bold;text-decoration:underline;text-transform:none;color:000066;background-color:ffffff;">ABOUT US</span><br />
<span style="font-family:Arial;font-size:14px;font-style:normal;font-weight:bold;text-decoration:none;text-transform:none;color:003366;background-color:ffffff;">Seeds of Genius, Inc. offers a full range of IT solutions including hardware and software products in addition to consulting, installation and support services. For more information, please visit our main web site at <a href="http://www.seedsofgenius.com">http://www.seedsofgenius.com</a> or contact our Technical Sales department at (410) 312-9806.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.seedsofgenius.net/solaris/solaris-authentication-login-with-active-directory/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solaris SVM: Mirroring Boot Drive</title>
		<link>http://www.seedsofgenius.net/solaris/solaris-svm-mirroring-boot-drive</link>
		<comments>http://www.seedsofgenius.net/solaris/solaris-svm-mirroring-boot-drive#comments</comments>
		<pubDate>Wed, 28 Oct 2009 22:32:59 +0000</pubDate>
		<dc:creator>bisbell</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Solaris]]></category>

		<guid isPermaLink="false">http://192.168.1.15/?p=20</guid>
		<description><![CDATA[This was written as a quick reference guide for setting up a mirrored (RAID 1) boot device. I used a Sun Fire V240 system for this article. The same principles [...]]]></description>
			<content:encoded><![CDATA[<p>In most  office environments users will have a Windows workstation on their  desktop; most locations do not have users&#8217; log into a Unix/Linux desktop  as their primary work environment.  In these environments a small  percentage of these users may have a need to connect to their Unix  servers in order to manage databases, application servers, web servers,  etc.  It becomes an administrative nightmare to manage multiple sets of  users for the Windows and the Unix systems.  The reason for this  nightmare is primarily password management. In a lot of cases, Windows  and Unix systems have different password requirements even though they  may be in the same environment.</p>
<p>Often  times, password requirements may differ between the two system types.   This means users will have to use a different password on Windows and  Unix.  Also, when password change dates are not synchronized between the  Windows and Unix systems you&#8217;ll end with users that forget their Unix  passwords on a very frequent basis.</p>
<p>This article is  meant to provide the basic procedures to allow a Solaris system to use  user information provided by Active Directory on a Windows 2008 server  as the authentication method for logging into Solaris.</p>
<p>The  following instructions are cobbled together from several locations on  the internet and from in house testing.<br />
We primarily used the  following two sites, which offer steps on configuration using Windows  2003 R2.  We then made changes where required.</p>
<p><a href="http://blog.scottlowe.org/2006/08/15/solaris-10-and-active-directory-integration/">Sun  Wikis<br />
Scott  Lowe&#8217;s Blog</a></p>
<p><strong><span style="text-decoration: underline;">Our Test Environment</span></strong></p>
<ul type="disc">
<li>Domain Controller Information
<ul type="circle">
<li>Windows  2008 R2</li>
<li>Hostname = win2k8-dc</li>
<li>IP Address = 192.168.3.76</li>
<li>Domain  = test.sog.com</li>
<li>Kerberos Realm = TEST.SOG.COM</li>
</ul>
</li>
<li>Client  Information
<ul type="circle">
<li>Solaris 10_u8 x86</li>
<li>Hostname  = keystone</li>
<li>IP Address = 192.168.3.66</li>
</ul>
</li>
</ul>
<p><span style="font-size: large;"><strong><span style="text-decoration: underline;">Windows Configuration</span></strong></span></p>
<p>It is assumed  that Active Directory is setup and that DNS is configured on the domain  controller.  The steps provided are what you need to do to add Unix  functionality to an already existing Windows AD environment.  The  Solaris clients should be added to the DNS records on the DC.</p>
<p>The  following steps are required to add all additional functionality to the  domain controller to allow for Solaris clients to authenticate against  AD.</p>
<p><strong><span style="text-decoration: underline;">Install UNIX Schema into Active Directory<br />
</span></strong></p>
<p>Open &#8220;Server Manager&#8221; and click on  &#8220;Roles&#8221; in the left pane.  Click on &#8220;Add Role Services&#8221; in the &#8220;Active  Directory Domain Services&#8221; section in the right pane.</p>
<p><img class="alignnone" title="Screenshot #1" src="http://www.seedsofgenius.net/images/1_UNIX_AD_Auth_small.png" alt="" width="717" height="516" /></p>
<hr />Click on the check box to add &#8220;Identitiy  Management for Unix.&#8221;  Remove Password Synchronization then click on &#8220;Next&#8221;</p>
<p><img class="alignnone" title="Screenshot #2" src="http://www.seedsofgenius.net/images/2_UNIX_AD_Auth_small.png" alt="" width="547" height="404" /></p>
<hr />When you  reach the &#8220;Confirm Installation&#8221; page click on &#8220;Install&#8221;</p>
<p><img class="alignnone" title="Screenshot #3" src="http://www.seedsofgenius.net/images/3_UNIX_AD_Auth_small.png" alt="" width="546" height="403" /></p>
<hr />Click on &#8220;Close&#8221; on the next screen.  Your Domain Controller will now reboot.</p>
<p><img class="alignnone" title="Screenshot #5" src="http://www.seedsofgenius.net/images/5_UNIX_AD_Auth_small.png" alt="" width="546" height="403" /></p>
<hr /><strong><span style="text-decoration: underline;">User  Configuration in AD</span></strong></p>
<p>Any users that you want to be able to use  Active Directory for Solaris logins must have the Unix Attributes set  under User Properties for that user.  These properties include the UID,  Primary GID, login shell, and home directory.  (The users’ GECOS will  come from the Display Name setting under the General tab of the users’  properties.)</p>
<p><img class="alignnone" title="Screenshot #7" src="http://www.seedsofgenius.net/images/7_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p><img class="alignnone" title="Screenshot #8" src="http://www.seedsofgenius.net/images/8_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p><img class="alignnone" title="Screenshot #9" src="http://www.seedsofgenius.net/images/9_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p>Under Active Directory Users and Computers Right click the new user account and select Properties.  In the user&#8217;s properties window select the  <em>Unix Attributes</em> tab.</p>
<p>Select  the domain under &#8220;NIS Domain&#8221; and fill in the fields.</p>
<p><img class="alignnone" title="Screenshot #10" src="http://www.seedsofgenius.net/images/10_UNIX_AD_Auth.png" alt="" width="423" height="549" /></p>
<p>All other user properties  (secondary groups, RBAC roles/profiles/auths…) will come from the  standard file locations on the Solaris client systems- (/etc/group,  /etc/users, /etc/security/*attr)</p>
<p>Also, make sure that the user’s  password is not set to ‘<em>change at next login</em>.’  Solaris does not  have the hooks back into AD to do password management, so your user will  not be prompted to change their password and they will not be allowed  to login.  All they will see is a messages saying: “Login Incorrect.”</p>
<p style="padding-left: 30px;"><span style="color: #999999;"><span style="text-decoration: underline;">Create Kerberos  Keytab for Client System</span></span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">Although this step is given on both  of the sites provided above, I have found that it is not required to  create a functioning Solaris -&gt; AD authentication environment.  I do not know the security implication of not performing this step.<br />
On  the Windows system, create a user account for the Solaris system that  will be authenticating. In this example we are creating a user account  named host-keystone for the host keystone.  (Note: this is a user  account, not a computer account)</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;"><br />
</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">Once  this user is created you can disable it for security purposes.</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">The  purpose of this step is create the keytab file that will be transferred  to the /etc/krb5 directory of the Solaris system that will be  authenticating against AD.  In order to create the keytab file run the  following command from a CMD prompt on the domain controller.  (Make  appropriate changes for you local environment.)</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;"><span style="font-size: x-small;">C:\Users\Administrator&gt;  ktpass –princ HOST\keystone.test.sog.com@TEST.SOG.COM -mapuser  TEST\host-keystone –crypto DES-CBC-MD5 +DesOnly –pass p@ssword1 -ptype  KRB5_NT_PRINCIPAL –out Desktop\keystone.keytab</span></span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">Transfer  the file to the host keystone as /etc/krb5/krb5.keytab</span></p>
<p style="padding-left: 30px;">
<p><span style="text-decoration: underline;">Create  ProxyDN User Account</span></p>
<p>On the Windows system, create a user  account that will be the proxyDN.  Make this user a member of &#8220;Domain  Guests.&#8221;   Give it a password, and select ‘password never expires’<br />
This  will be the proxyDN username used when you run the ldapclient command  later on.  This account must remain enabled.<br />
In this test we  created a user account called “ProxyDNUser&#8221; with a password of  “p@ssword1”</p>
<p><img class="alignnone" title="Screenshot #11" src="http://www.seedsofgenius.net/images/11_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p><img class="alignnone" title="Screenshot #12" src="http://www.seedsofgenius.net/images/12_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p>Make sure  to use the Display Name under the General properties (Full Name when  creating the user) during the ldapclient step.  In this case the correct user to use during the ldapclient command will be ProxyDNUser.  Do not use the user  logon name.  We ran into a bit of a  problem when we kept trying to use the Windows logon name and we kept  getting messages saying:</p>
<p><span style="font-family: &quot;courier new&quot;;"><span style="font-size: x-small;">libsldap: Status: 49  Mesg: openConnection: simple bind failed  &#8211; Invalid credentials</span></span></p>
<p>It was a bit frustrating when  we were completely sure that we were using the right password and still  kept getting a messages saying ‘Invalid Credentials.’</p>
<p>Use  ADSIedit on your domain controller to see the full DN for the user  account if you keep getting the message above and you’re positive you  have the password correct.</p>
<p><span style="font-size: large;"><strong><span style="text-decoration: underline;">Solaris  Configuration</span></strong></span></p>
<p><span style="text-decoration: underline;">Client Side DNS  Configuration</span></p>
<p>Your Solaris system should be a member of the  DNS domain defined by your domain controller.   Make sure to create both  forward and reverse lookup records in the domain for the Solaris  system.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># cat /etc/resolv.conf<br />
domain test.sog.com<br />
nameserver 192.168.3.76</span></p>
<p>Make sure you have  the /etc/nsswitch.conf file setup to use DNS as a name service for  hosts.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># grep &#8216;^hosts&#8217; /etc/nsswitch.conf<br />
hosts        files dns</span></p>
<p>Verify that DNS works.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># nslookup `hostname`<br />
Server:         192.168.3.76<br />
Address:        192.168.3.76#53</p>
<p>Name:   keystone.test.sog.com<br />
Address: 192.168.3.66</span></p>
<p>The following nslookup commands should  produce output similar to the following.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># nslookup -querytype=any  _ldap._tcp<br />
Server:         192.168.3.76<br />
Address:         192.168.3.76#53</p>
<p>_ldap._tcp.test.sog.com service = 0 100 389  win2k8-dc.test.sog.com.</p>
<p># nslookup -querytype=any  _gc._tcp<br />
Server:         192.168.3.76<br />
Address:         192.168.3.76#53</p>
<p>_gc._tcp.test.sog.com   service = 0 100 3268  win2k8-dc.test.sog.com.</span></p>
<p><span style="text-decoration: underline;">Kerberos</span></p>
<p>Configure  the /etc/krb5/krb5.conf file on the Solaris client.  Make appropriate  changes required for your local environment.<br />
This is the /etc/krb5/krb5.conf that we used on our test system.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt">[libdefaults]<br />
default_realm =  TEST.SOG.COM<br />
dns_lookup_kdc = true<br />
verify_ap_req_nofail = false<br />
[realms]<br />
TEST.SOG.COM = {<br />
kdc =  WIN2K8-DC.TEST.SOG.COM<br />
default_domain = TEST<br />
admin_server = WIN2K8-DC.TEST.SOG.COM<br />
}<br />
[domain_realm]<br />
.test.sog.com =  TEST.SOG.COM<br />
test.sog.com = TEST.SOG.COM<br />
[logging]<br />
default =  FILE:/var/krb5/kdc.log<br />
kdc = FILE:/var/krb5/kdc.log<br />
kdc_rotate = {<br />
period =  1d<br />
versions = 10<br />
}<br />
[appdefaults]<br />
pam = {<br />
debug =  false<br />
ticket_lifetime = 36000<br />
renew_lifetime = 36000<br />
forwardable = true<br />
krb4_convert = false<br />
}<br />
kinit = {<br />
renewable  = true<br />
forwardable= true<br />
}</span></p>
<p>Run  the kinit command and enter the administrator’s password.  If the  command runs successfully, you will see no output.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># kinit administrator<br />
Password for  administrator@TEST.SOG.COM:</span></p>
<p><span style="text-decoration: underline;">LDAP</span></p>
<p>ldap  client initialization on Solaris host.  The part of the command in  orange needs to be modified for your environment.  The rest of the  command is standard across all configurations.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># ldapclient manual \<br />
-a credentialLevel=proxy \<br />
-a authenticationMethod=simple \<br />
<span style="color: #ff6600;">-a proxyDN=cn=&#8221;ProxyDNUser,cn=Users,dc=TEST,dc=SOG,dc=COM&#8221; \<br />
-a proxyPassword=p@ssword1 \<br />
-a defaultSearchBase=dc=TEST,dc=SOG,dc=COM \<br />
-a domainName=TEST.SOG.COM \<br />
-a &#8220;defaultServerList=192.168.3.76&#8243; \</span><br />
-a attributeMap=group:userpassword=userPassword \<br />
-a attributeMap=group:memberuid=memberUid \<br />
-a attributeMap=group:gidnumber=gidNumber \<br />
-a attributeMap=passwd:gecos=cn \<br />
-a attributeMap=passwd:gidnumber=gidNumber \<br />
-a attributeMap=passwd:uidnumber=uidNumber \<br />
-a attributeMap=passwd:homedirectory=unixHomeDirectory \<br />
-a attributeMap=passwd:loginshell=loginShell \<br />
-a attributeMap=shadow:shadowflag=shadowFlag \<br />
-a attributeMap=shadow:userpassword=userPassword \<br />
-a objectClassMap=group:posixGroup=group \<br />
-a objectClassMap=passwd:posixAccount=user \<br />
-a objectClassMap=shadow:shadowAccount=user \<br />
<span style="color: #ff6600;">-a serviceSearchDescriptor=passwd:dc=TEST,dc=SOG,dc=COM?sub \<br />
-a serviceSearchDescriptor=group:dc=TEST,dc=SOG,dc=COM?sub</span></p>
<p># cp /etc/nsswitch.files  /etc/nsswitch.conf</p>
<p># vi /etc/nsswitch.conf<br />
passwd  files ldap<br />
group     files ldap<br />
hosts      files dns</p>
<p># svcadm restart  ldap/client</span></p>
<p><span style="text-decoration: underline;">PAM</span></p>
<p>Edit  /etc/pam.conf to use Kerberos authentication.  Both sites provided at  the top of this article show the same modifications to pam.conf.  In our  tests we found that those entries caused problems, most notably that  the root user could not login from the console.  Here is the /etc/pam.conf that we found to work best.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># vi /etc/pam.conf<br />
# Authentication  management<br />
#<br />
# login service (explicit because of pam_dial_auth)<br />
#<br />
login   auth  requisite          pam_authtok_get.so.1<br />
login   auth  required           pam_dhkeys.so.1<br />
login   auth  required           pam_unix_cred.so.1<br />
<span style="color: #ff6600;"> login    auth sufficient         pam_krb5.so.1</span><br />
login   auth  required           pam_unix_auth.so.1<br />
login   auth  required           pam_dial_auth.so.1<br />
# Default definitions for  Authentication management<br />
# Used when service name is not explicitly  mentioned for authentication<br />
#<br />
other   auth  requisite          pam_authtok_get.so.1<br />
other   auth  required           pam_dhkeys.so.1<br />
other   auth  required           pam_unix_cred.so.1<br />
<span style="color: #ff6600;"> other    auth sufficient         pam_krb5.so.1</span><br />
other   auth  required           pam_unix_auth.so.1<br />
# Default definition for  Password management<br />
# Used when service name is not explicitly  mentioned for password management<br />
other   auth  requisite          pam_authtok_get.so.1<br />
other   auth  required           pam_dhkeys.so.1<br />
other   auth  required           pam_unix_cred.so.1<br />
<span style="color: #ff6600;"> other    auth sufficient         pam_krb5.so.1</span><br />
other   auth  required           pam_unix_auth.so.1<br />
</span></p>
<p>Create  home directory for user.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># mkdir -p  /export/home/john.doe<br />
# chown john.doe:staff /export/home/john.doe<br />
# chmod 700 /export/home/john.doe<br />
</span></p>
<p>You should now be able to log into your Solaris system with your AD user account.
<div id="apf_post_footer">
<h4>Related Articles:</h4>
<ul>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=411">Mounting ISO Images in Solaris vs. AIX</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=406">Modify a Solaris Jumpstart Miniroot for Fun and Profit</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=363">Solaris Tips: Flash Archive (FLAR) with Zones</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=349">Solaris Tips: Unencapsulate SVM root mirror</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=337">Solaris Tips: Repairing the Boot Archive</a></li>
</ul>
</div>
<p><!-- HTML Codes by Quackit.com --><br />
<span style="font-family:Arial;font-size:18px;font-style:italic;font-weight:bold;text-decoration:underline;text-transform:none;color:000066;background-color:ffffff;">ABOUT US</span><br />
<span style="font-family:Arial;font-size:14px;font-style:normal;font-weight:bold;text-decoration:none;text-transform:none;color:003366;background-color:ffffff;">Seeds of Genius, Inc. offers a full range of IT solutions including hardware and software products in addition to consulting, installation and support services. For more information, please visit our main web site at <a href="http://www.seedsofgenius.com">http://www.seedsofgenius.com</a> or contact our Technical Sales department at (410) 312-9806.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.seedsofgenius.net/solaris/solaris-authentication-login-with-active-directory/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sun ILOM and Active Directory</title>
		<link>http://www.seedsofgenius.net/hardware/ilom/sun-ilom-and-active-directory</link>
		<comments>http://www.seedsofgenius.net/hardware/ilom/sun-ilom-and-active-directory#comments</comments>
		<pubDate>Wed, 28 Oct 2009 22:13:17 +0000</pubDate>
		<dc:creator>fcaton</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[ILOM]]></category>

		<guid isPermaLink="false">http://192.168.1.15/?p=14</guid>
		<description><![CDATA[This article explains how to configure the ILOM (Integratred Lights Out Manager) of a Sun Microsystems server to authenticate against a Windows Active Directory user account. To use AD accounts [...]]]></description>
			<content:encoded><![CDATA[<p>In most  office environments users will have a Windows workstation on their  desktop; most locations do not have users&#8217; log into a Unix/Linux desktop  as their primary work environment.  In these environments a small  percentage of these users may have a need to connect to their Unix  servers in order to manage databases, application servers, web servers,  etc.  It becomes an administrative nightmare to manage multiple sets of  users for the Windows and the Unix systems.  The reason for this  nightmare is primarily password management. In a lot of cases, Windows  and Unix systems have different password requirements even though they  may be in the same environment.</p>
<p>Often  times, password requirements may differ between the two system types.   This means users will have to use a different password on Windows and  Unix.  Also, when password change dates are not synchronized between the  Windows and Unix systems you&#8217;ll end with users that forget their Unix  passwords on a very frequent basis.</p>
<p>This article is  meant to provide the basic procedures to allow a Solaris system to use  user information provided by Active Directory on a Windows 2008 server  as the authentication method for logging into Solaris.</p>
<p>The  following instructions are cobbled together from several locations on  the internet and from in house testing.<br />
We primarily used the  following two sites, which offer steps on configuration using Windows  2003 R2.  We then made changes where required.</p>
<p><a href="http://blog.scottlowe.org/2006/08/15/solaris-10-and-active-directory-integration/">Sun  Wikis<br />
Scott  Lowe&#8217;s Blog</a></p>
<p><strong><span style="text-decoration: underline;">Our Test Environment</span></strong></p>
<ul type="disc">
<li>Domain Controller Information
<ul type="circle">
<li>Windows  2008 R2</li>
<li>Hostname = win2k8-dc</li>
<li>IP Address = 192.168.3.76</li>
<li>Domain  = test.sog.com</li>
<li>Kerberos Realm = TEST.SOG.COM</li>
</ul>
</li>
<li>Client  Information
<ul type="circle">
<li>Solaris 10_u8 x86</li>
<li>Hostname  = keystone</li>
<li>IP Address = 192.168.3.66</li>
</ul>
</li>
</ul>
<p><span style="font-size: large;"><strong><span style="text-decoration: underline;">Windows Configuration</span></strong></span></p>
<p>It is assumed  that Active Directory is setup and that DNS is configured on the domain  controller.  The steps provided are what you need to do to add Unix  functionality to an already existing Windows AD environment.  The  Solaris clients should be added to the DNS records on the DC.</p>
<p>The  following steps are required to add all additional functionality to the  domain controller to allow for Solaris clients to authenticate against  AD.</p>
<p><strong><span style="text-decoration: underline;">Install UNIX Schema into Active Directory<br />
</span></strong></p>
<p>Open &#8220;Server Manager&#8221; and click on  &#8220;Roles&#8221; in the left pane.  Click on &#8220;Add Role Services&#8221; in the &#8220;Active  Directory Domain Services&#8221; section in the right pane.</p>
<p><img class="alignnone" title="Screenshot #1" src="http://www.seedsofgenius.net/images/1_UNIX_AD_Auth_small.png" alt="" width="717" height="516" /></p>
<hr />Click on the check box to add &#8220;Identitiy  Management for Unix.&#8221;  Remove Password Synchronization then click on &#8220;Next&#8221;</p>
<p><img class="alignnone" title="Screenshot #2" src="http://www.seedsofgenius.net/images/2_UNIX_AD_Auth_small.png" alt="" width="547" height="404" /></p>
<hr />When you  reach the &#8220;Confirm Installation&#8221; page click on &#8220;Install&#8221;</p>
<p><img class="alignnone" title="Screenshot #3" src="http://www.seedsofgenius.net/images/3_UNIX_AD_Auth_small.png" alt="" width="546" height="403" /></p>
<hr />Click on &#8220;Close&#8221; on the next screen.  Your Domain Controller will now reboot.</p>
<p><img class="alignnone" title="Screenshot #5" src="http://www.seedsofgenius.net/images/5_UNIX_AD_Auth_small.png" alt="" width="546" height="403" /></p>
<hr /><strong><span style="text-decoration: underline;">User  Configuration in AD</span></strong></p>
<p>Any users that you want to be able to use  Active Directory for Solaris logins must have the Unix Attributes set  under User Properties for that user.  These properties include the UID,  Primary GID, login shell, and home directory.  (The users’ GECOS will  come from the Display Name setting under the General tab of the users’  properties.)</p>
<p><img class="alignnone" title="Screenshot #7" src="http://www.seedsofgenius.net/images/7_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p><img class="alignnone" title="Screenshot #8" src="http://www.seedsofgenius.net/images/8_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p><img class="alignnone" title="Screenshot #9" src="http://www.seedsofgenius.net/images/9_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p>Under Active Directory Users and Computers Right click the new user account and select Properties.  In the user&#8217;s properties window select the  <em>Unix Attributes</em> tab.</p>
<p>Select  the domain under &#8220;NIS Domain&#8221; and fill in the fields.</p>
<p><img class="alignnone" title="Screenshot #10" src="http://www.seedsofgenius.net/images/10_UNIX_AD_Auth.png" alt="" width="423" height="549" /></p>
<p>All other user properties  (secondary groups, RBAC roles/profiles/auths…) will come from the  standard file locations on the Solaris client systems- (/etc/group,  /etc/users, /etc/security/*attr)</p>
<p>Also, make sure that the user’s  password is not set to ‘<em>change at next login</em>.’  Solaris does not  have the hooks back into AD to do password management, so your user will  not be prompted to change their password and they will not be allowed  to login.  All they will see is a messages saying: “Login Incorrect.”</p>
<p style="padding-left: 30px;"><span style="color: #999999;"><span style="text-decoration: underline;">Create Kerberos  Keytab for Client System</span></span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">Although this step is given on both  of the sites provided above, I have found that it is not required to  create a functioning Solaris -&gt; AD authentication environment.  I do not know the security implication of not performing this step.<br />
On  the Windows system, create a user account for the Solaris system that  will be authenticating. In this example we are creating a user account  named host-keystone for the host keystone.  (Note: this is a user  account, not a computer account)</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;"><br />
</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">Once  this user is created you can disable it for security purposes.</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">The  purpose of this step is create the keytab file that will be transferred  to the /etc/krb5 directory of the Solaris system that will be  authenticating against AD.  In order to create the keytab file run the  following command from a CMD prompt on the domain controller.  (Make  appropriate changes for you local environment.)</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;"><span style="font-size: x-small;">C:\Users\Administrator&gt;  ktpass –princ HOST\keystone.test.sog.com@TEST.SOG.COM -mapuser  TEST\host-keystone –crypto DES-CBC-MD5 +DesOnly –pass p@ssword1 -ptype  KRB5_NT_PRINCIPAL –out Desktop\keystone.keytab</span></span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">Transfer  the file to the host keystone as /etc/krb5/krb5.keytab</span></p>
<p style="padding-left: 30px;">
<p><span style="text-decoration: underline;">Create  ProxyDN User Account</span></p>
<p>On the Windows system, create a user  account that will be the proxyDN.  Make this user a member of &#8220;Domain  Guests.&#8221;   Give it a password, and select ‘password never expires’<br />
This  will be the proxyDN username used when you run the ldapclient command  later on.  This account must remain enabled.<br />
In this test we  created a user account called “ProxyDNUser&#8221; with a password of  “p@ssword1”</p>
<p><img class="alignnone" title="Screenshot #11" src="http://www.seedsofgenius.net/images/11_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p><img class="alignnone" title="Screenshot #12" src="http://www.seedsofgenius.net/images/12_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p>Make sure  to use the Display Name under the General properties (Full Name when  creating the user) during the ldapclient step.  In this case the correct user to use during the ldapclient command will be ProxyDNUser.  Do not use the user  logon name.  We ran into a bit of a  problem when we kept trying to use the Windows logon name and we kept  getting messages saying:</p>
<p><span style="font-family: &quot;courier new&quot;;"><span style="font-size: x-small;">libsldap: Status: 49  Mesg: openConnection: simple bind failed  &#8211; Invalid credentials</span></span></p>
<p>It was a bit frustrating when  we were completely sure that we were using the right password and still  kept getting a messages saying ‘Invalid Credentials.’</p>
<p>Use  ADSIedit on your domain controller to see the full DN for the user  account if you keep getting the message above and you’re positive you  have the password correct.</p>
<p><span style="font-size: large;"><strong><span style="text-decoration: underline;">Solaris  Configuration</span></strong></span></p>
<p><span style="text-decoration: underline;">Client Side DNS  Configuration</span></p>
<p>Your Solaris system should be a member of the  DNS domain defined by your domain controller.   Make sure to create both  forward and reverse lookup records in the domain for the Solaris  system.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># cat /etc/resolv.conf<br />
domain test.sog.com<br />
nameserver 192.168.3.76</span></p>
<p>Make sure you have  the /etc/nsswitch.conf file setup to use DNS as a name service for  hosts.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># grep &#8216;^hosts&#8217; /etc/nsswitch.conf<br />
hosts        files dns</span></p>
<p>Verify that DNS works.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># nslookup `hostname`<br />
Server:         192.168.3.76<br />
Address:        192.168.3.76#53</p>
<p>Name:   keystone.test.sog.com<br />
Address: 192.168.3.66</span></p>
<p>The following nslookup commands should  produce output similar to the following.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># nslookup -querytype=any  _ldap._tcp<br />
Server:         192.168.3.76<br />
Address:         192.168.3.76#53</p>
<p>_ldap._tcp.test.sog.com service = 0 100 389  win2k8-dc.test.sog.com.</p>
<p># nslookup -querytype=any  _gc._tcp<br />
Server:         192.168.3.76<br />
Address:         192.168.3.76#53</p>
<p>_gc._tcp.test.sog.com   service = 0 100 3268  win2k8-dc.test.sog.com.</span></p>
<p><span style="text-decoration: underline;">Kerberos</span></p>
<p>Configure  the /etc/krb5/krb5.conf file on the Solaris client.  Make appropriate  changes required for your local environment.<br />
This is the /etc/krb5/krb5.conf that we used on our test system.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt">[libdefaults]<br />
default_realm =  TEST.SOG.COM<br />
dns_lookup_kdc = true<br />
verify_ap_req_nofail = false<br />
[realms]<br />
TEST.SOG.COM = {<br />
kdc =  WIN2K8-DC.TEST.SOG.COM<br />
default_domain = TEST<br />
admin_server = WIN2K8-DC.TEST.SOG.COM<br />
}<br />
[domain_realm]<br />
.test.sog.com =  TEST.SOG.COM<br />
test.sog.com = TEST.SOG.COM<br />
[logging]<br />
default =  FILE:/var/krb5/kdc.log<br />
kdc = FILE:/var/krb5/kdc.log<br />
kdc_rotate = {<br />
period =  1d<br />
versions = 10<br />
}<br />
[appdefaults]<br />
pam = {<br />
debug =  false<br />
ticket_lifetime = 36000<br />
renew_lifetime = 36000<br />
forwardable = true<br />
krb4_convert = false<br />
}<br />
kinit = {<br />
renewable  = true<br />
forwardable= true<br />
}</span></p>
<p>Run  the kinit command and enter the administrator’s password.  If the  command runs successfully, you will see no output.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># kinit administrator<br />
Password for  administrator@TEST.SOG.COM:</span></p>
<p><span style="text-decoration: underline;">LDAP</span></p>
<p>ldap  client initialization on Solaris host.  The part of the command in  orange needs to be modified for your environment.  The rest of the  command is standard across all configurations.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># ldapclient manual \<br />
-a credentialLevel=proxy \<br />
-a authenticationMethod=simple \<br />
<span style="color: #ff6600;">-a proxyDN=cn=&#8221;ProxyDNUser,cn=Users,dc=TEST,dc=SOG,dc=COM&#8221; \<br />
-a proxyPassword=p@ssword1 \<br />
-a defaultSearchBase=dc=TEST,dc=SOG,dc=COM \<br />
-a domainName=TEST.SOG.COM \<br />
-a &#8220;defaultServerList=192.168.3.76&#8243; \</span><br />
-a attributeMap=group:userpassword=userPassword \<br />
-a attributeMap=group:memberuid=memberUid \<br />
-a attributeMap=group:gidnumber=gidNumber \<br />
-a attributeMap=passwd:gecos=cn \<br />
-a attributeMap=passwd:gidnumber=gidNumber \<br />
-a attributeMap=passwd:uidnumber=uidNumber \<br />
-a attributeMap=passwd:homedirectory=unixHomeDirectory \<br />
-a attributeMap=passwd:loginshell=loginShell \<br />
-a attributeMap=shadow:shadowflag=shadowFlag \<br />
-a attributeMap=shadow:userpassword=userPassword \<br />
-a objectClassMap=group:posixGroup=group \<br />
-a objectClassMap=passwd:posixAccount=user \<br />
-a objectClassMap=shadow:shadowAccount=user \<br />
<span style="color: #ff6600;">-a serviceSearchDescriptor=passwd:dc=TEST,dc=SOG,dc=COM?sub \<br />
-a serviceSearchDescriptor=group:dc=TEST,dc=SOG,dc=COM?sub</span></p>
<p># cp /etc/nsswitch.files  /etc/nsswitch.conf</p>
<p># vi /etc/nsswitch.conf<br />
passwd  files ldap<br />
group     files ldap<br />
hosts      files dns</p>
<p># svcadm restart  ldap/client</span></p>
<p><span style="text-decoration: underline;">PAM</span></p>
<p>Edit  /etc/pam.conf to use Kerberos authentication.  Both sites provided at  the top of this article show the same modifications to pam.conf.  In our  tests we found that those entries caused problems, most notably that  the root user could not login from the console.  Here is the /etc/pam.conf that we found to work best.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># vi /etc/pam.conf<br />
# Authentication  management<br />
#<br />
# login service (explicit because of pam_dial_auth)<br />
#<br />
login   auth  requisite          pam_authtok_get.so.1<br />
login   auth  required           pam_dhkeys.so.1<br />
login   auth  required           pam_unix_cred.so.1<br />
<span style="color: #ff6600;"> login    auth sufficient         pam_krb5.so.1</span><br />
login   auth  required           pam_unix_auth.so.1<br />
login   auth  required           pam_dial_auth.so.1<br />
# Default definitions for  Authentication management<br />
# Used when service name is not explicitly  mentioned for authentication<br />
#<br />
other   auth  requisite          pam_authtok_get.so.1<br />
other   auth  required           pam_dhkeys.so.1<br />
other   auth  required           pam_unix_cred.so.1<br />
<span style="color: #ff6600;"> other    auth sufficient         pam_krb5.so.1</span><br />
other   auth  required           pam_unix_auth.so.1<br />
# Default definition for  Password management<br />
# Used when service name is not explicitly  mentioned for password management<br />
other   auth  requisite          pam_authtok_get.so.1<br />
other   auth  required           pam_dhkeys.so.1<br />
other   auth  required           pam_unix_cred.so.1<br />
<span style="color: #ff6600;"> other    auth sufficient         pam_krb5.so.1</span><br />
other   auth  required           pam_unix_auth.so.1<br />
</span></p>
<p>Create  home directory for user.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># mkdir -p  /export/home/john.doe<br />
# chown john.doe:staff /export/home/john.doe<br />
# chmod 700 /export/home/john.doe<br />
</span></p>
<p>You should now be able to log into your Solaris system with your AD user account.
<div id="apf_post_footer">
<h4>Related Articles:</h4>
<ul>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=411">Mounting ISO Images in Solaris vs. AIX</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=406">Modify a Solaris Jumpstart Miniroot for Fun and Profit</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=363">Solaris Tips: Flash Archive (FLAR) with Zones</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=349">Solaris Tips: Unencapsulate SVM root mirror</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=337">Solaris Tips: Repairing the Boot Archive</a></li>
</ul>
</div>
<p><!-- HTML Codes by Quackit.com --><br />
<span style="font-family:Arial;font-size:18px;font-style:italic;font-weight:bold;text-decoration:underline;text-transform:none;color:000066;background-color:ffffff;">ABOUT US</span><br />
<span style="font-family:Arial;font-size:14px;font-style:normal;font-weight:bold;text-decoration:none;text-transform:none;color:003366;background-color:ffffff;">Seeds of Genius, Inc. offers a full range of IT solutions including hardware and software products in addition to consulting, installation and support services. For more information, please visit our main web site at <a href="http://www.seedsofgenius.com">http://www.seedsofgenius.com</a> or contact our Technical Sales department at (410) 312-9806.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.seedsofgenius.net/solaris/solaris-authentication-login-with-active-directory/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating Solaris Zones</title>
		<link>http://www.seedsofgenius.net/solaris/zones/creating-solaris-zones</link>
		<comments>http://www.seedsofgenius.net/solaris/zones/creating-solaris-zones#comments</comments>
		<pubDate>Wed, 28 Oct 2009 21:51:38 +0000</pubDate>
		<dc:creator>bisbell</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Zones]]></category>

		<guid isPermaLink="false">http://192.168.1.15/?p=11</guid>
		<description><![CDATA[Solaris provides an effective and simple method of creating virtual Solaris hosts- Solaris Zones. This article provides the procedures to create and run Solaris Zones under a Solaris 10 environment. [...]]]></description>
			<content:encoded><![CDATA[<p>In most  office environments users will have a Windows workstation on their  desktop; most locations do not have users&#8217; log into a Unix/Linux desktop  as their primary work environment.  In these environments a small  percentage of these users may have a need to connect to their Unix  servers in order to manage databases, application servers, web servers,  etc.  It becomes an administrative nightmare to manage multiple sets of  users for the Windows and the Unix systems.  The reason for this  nightmare is primarily password management. In a lot of cases, Windows  and Unix systems have different password requirements even though they  may be in the same environment.</p>
<p>Often  times, password requirements may differ between the two system types.   This means users will have to use a different password on Windows and  Unix.  Also, when password change dates are not synchronized between the  Windows and Unix systems you&#8217;ll end with users that forget their Unix  passwords on a very frequent basis.</p>
<p>This article is  meant to provide the basic procedures to allow a Solaris system to use  user information provided by Active Directory on a Windows 2008 server  as the authentication method for logging into Solaris.</p>
<p>The  following instructions are cobbled together from several locations on  the internet and from in house testing.<br />
We primarily used the  following two sites, which offer steps on configuration using Windows  2003 R2.  We then made changes where required.</p>
<p><a href="http://blog.scottlowe.org/2006/08/15/solaris-10-and-active-directory-integration/">Sun  Wikis<br />
Scott  Lowe&#8217;s Blog</a></p>
<p><strong><span style="text-decoration: underline;">Our Test Environment</span></strong></p>
<ul type="disc">
<li>Domain Controller Information
<ul type="circle">
<li>Windows  2008 R2</li>
<li>Hostname = win2k8-dc</li>
<li>IP Address = 192.168.3.76</li>
<li>Domain  = test.sog.com</li>
<li>Kerberos Realm = TEST.SOG.COM</li>
</ul>
</li>
<li>Client  Information
<ul type="circle">
<li>Solaris 10_u8 x86</li>
<li>Hostname  = keystone</li>
<li>IP Address = 192.168.3.66</li>
</ul>
</li>
</ul>
<p><span style="font-size: large;"><strong><span style="text-decoration: underline;">Windows Configuration</span></strong></span></p>
<p>It is assumed  that Active Directory is setup and that DNS is configured on the domain  controller.  The steps provided are what you need to do to add Unix  functionality to an already existing Windows AD environment.  The  Solaris clients should be added to the DNS records on the DC.</p>
<p>The  following steps are required to add all additional functionality to the  domain controller to allow for Solaris clients to authenticate against  AD.</p>
<p><strong><span style="text-decoration: underline;">Install UNIX Schema into Active Directory<br />
</span></strong></p>
<p>Open &#8220;Server Manager&#8221; and click on  &#8220;Roles&#8221; in the left pane.  Click on &#8220;Add Role Services&#8221; in the &#8220;Active  Directory Domain Services&#8221; section in the right pane.</p>
<p><img class="alignnone" title="Screenshot #1" src="http://www.seedsofgenius.net/images/1_UNIX_AD_Auth_small.png" alt="" width="717" height="516" /></p>
<hr />Click on the check box to add &#8220;Identitiy  Management for Unix.&#8221;  Remove Password Synchronization then click on &#8220;Next&#8221;</p>
<p><img class="alignnone" title="Screenshot #2" src="http://www.seedsofgenius.net/images/2_UNIX_AD_Auth_small.png" alt="" width="547" height="404" /></p>
<hr />When you  reach the &#8220;Confirm Installation&#8221; page click on &#8220;Install&#8221;</p>
<p><img class="alignnone" title="Screenshot #3" src="http://www.seedsofgenius.net/images/3_UNIX_AD_Auth_small.png" alt="" width="546" height="403" /></p>
<hr />Click on &#8220;Close&#8221; on the next screen.  Your Domain Controller will now reboot.</p>
<p><img class="alignnone" title="Screenshot #5" src="http://www.seedsofgenius.net/images/5_UNIX_AD_Auth_small.png" alt="" width="546" height="403" /></p>
<hr /><strong><span style="text-decoration: underline;">User  Configuration in AD</span></strong></p>
<p>Any users that you want to be able to use  Active Directory for Solaris logins must have the Unix Attributes set  under User Properties for that user.  These properties include the UID,  Primary GID, login shell, and home directory.  (The users’ GECOS will  come from the Display Name setting under the General tab of the users’  properties.)</p>
<p><img class="alignnone" title="Screenshot #7" src="http://www.seedsofgenius.net/images/7_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p><img class="alignnone" title="Screenshot #8" src="http://www.seedsofgenius.net/images/8_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p><img class="alignnone" title="Screenshot #9" src="http://www.seedsofgenius.net/images/9_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p>Under Active Directory Users and Computers Right click the new user account and select Properties.  In the user&#8217;s properties window select the  <em>Unix Attributes</em> tab.</p>
<p>Select  the domain under &#8220;NIS Domain&#8221; and fill in the fields.</p>
<p><img class="alignnone" title="Screenshot #10" src="http://www.seedsofgenius.net/images/10_UNIX_AD_Auth.png" alt="" width="423" height="549" /></p>
<p>All other user properties  (secondary groups, RBAC roles/profiles/auths…) will come from the  standard file locations on the Solaris client systems- (/etc/group,  /etc/users, /etc/security/*attr)</p>
<p>Also, make sure that the user’s  password is not set to ‘<em>change at next login</em>.’  Solaris does not  have the hooks back into AD to do password management, so your user will  not be prompted to change their password and they will not be allowed  to login.  All they will see is a messages saying: “Login Incorrect.”</p>
<p style="padding-left: 30px;"><span style="color: #999999;"><span style="text-decoration: underline;">Create Kerberos  Keytab for Client System</span></span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">Although this step is given on both  of the sites provided above, I have found that it is not required to  create a functioning Solaris -&gt; AD authentication environment.  I do not know the security implication of not performing this step.<br />
On  the Windows system, create a user account for the Solaris system that  will be authenticating. In this example we are creating a user account  named host-keystone for the host keystone.  (Note: this is a user  account, not a computer account)</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;"><br />
</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">Once  this user is created you can disable it for security purposes.</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">The  purpose of this step is create the keytab file that will be transferred  to the /etc/krb5 directory of the Solaris system that will be  authenticating against AD.  In order to create the keytab file run the  following command from a CMD prompt on the domain controller.  (Make  appropriate changes for you local environment.)</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;"><span style="font-size: x-small;">C:\Users\Administrator&gt;  ktpass –princ HOST\keystone.test.sog.com@TEST.SOG.COM -mapuser  TEST\host-keystone –crypto DES-CBC-MD5 +DesOnly –pass p@ssword1 -ptype  KRB5_NT_PRINCIPAL –out Desktop\keystone.keytab</span></span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">Transfer  the file to the host keystone as /etc/krb5/krb5.keytab</span></p>
<p style="padding-left: 30px;">
<p><span style="text-decoration: underline;">Create  ProxyDN User Account</span></p>
<p>On the Windows system, create a user  account that will be the proxyDN.  Make this user a member of &#8220;Domain  Guests.&#8221;   Give it a password, and select ‘password never expires’<br />
This  will be the proxyDN username used when you run the ldapclient command  later on.  This account must remain enabled.<br />
In this test we  created a user account called “ProxyDNUser&#8221; with a password of  “p@ssword1”</p>
<p><img class="alignnone" title="Screenshot #11" src="http://www.seedsofgenius.net/images/11_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p><img class="alignnone" title="Screenshot #12" src="http://www.seedsofgenius.net/images/12_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p>Make sure  to use the Display Name under the General properties (Full Name when  creating the user) during the ldapclient step.  In this case the correct user to use during the ldapclient command will be ProxyDNUser.  Do not use the user  logon name.  We ran into a bit of a  problem when we kept trying to use the Windows logon name and we kept  getting messages saying:</p>
<p><span style="font-family: &quot;courier new&quot;;"><span style="font-size: x-small;">libsldap: Status: 49  Mesg: openConnection: simple bind failed  &#8211; Invalid credentials</span></span></p>
<p>It was a bit frustrating when  we were completely sure that we were using the right password and still  kept getting a messages saying ‘Invalid Credentials.’</p>
<p>Use  ADSIedit on your domain controller to see the full DN for the user  account if you keep getting the message above and you’re positive you  have the password correct.</p>
<p><span style="font-size: large;"><strong><span style="text-decoration: underline;">Solaris  Configuration</span></strong></span></p>
<p><span style="text-decoration: underline;">Client Side DNS  Configuration</span></p>
<p>Your Solaris system should be a member of the  DNS domain defined by your domain controller.   Make sure to create both  forward and reverse lookup records in the domain for the Solaris  system.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># cat /etc/resolv.conf<br />
domain test.sog.com<br />
nameserver 192.168.3.76</span></p>
<p>Make sure you have  the /etc/nsswitch.conf file setup to use DNS as a name service for  hosts.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># grep &#8216;^hosts&#8217; /etc/nsswitch.conf<br />
hosts        files dns</span></p>
<p>Verify that DNS works.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># nslookup `hostname`<br />
Server:         192.168.3.76<br />
Address:        192.168.3.76#53</p>
<p>Name:   keystone.test.sog.com<br />
Address: 192.168.3.66</span></p>
<p>The following nslookup commands should  produce output similar to the following.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># nslookup -querytype=any  _ldap._tcp<br />
Server:         192.168.3.76<br />
Address:         192.168.3.76#53</p>
<p>_ldap._tcp.test.sog.com service = 0 100 389  win2k8-dc.test.sog.com.</p>
<p># nslookup -querytype=any  _gc._tcp<br />
Server:         192.168.3.76<br />
Address:         192.168.3.76#53</p>
<p>_gc._tcp.test.sog.com   service = 0 100 3268  win2k8-dc.test.sog.com.</span></p>
<p><span style="text-decoration: underline;">Kerberos</span></p>
<p>Configure  the /etc/krb5/krb5.conf file on the Solaris client.  Make appropriate  changes required for your local environment.<br />
This is the /etc/krb5/krb5.conf that we used on our test system.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt">[libdefaults]<br />
default_realm =  TEST.SOG.COM<br />
dns_lookup_kdc = true<br />
verify_ap_req_nofail = false<br />
[realms]<br />
TEST.SOG.COM = {<br />
kdc =  WIN2K8-DC.TEST.SOG.COM<br />
default_domain = TEST<br />
admin_server = WIN2K8-DC.TEST.SOG.COM<br />
}<br />
[domain_realm]<br />
.test.sog.com =  TEST.SOG.COM<br />
test.sog.com = TEST.SOG.COM<br />
[logging]<br />
default =  FILE:/var/krb5/kdc.log<br />
kdc = FILE:/var/krb5/kdc.log<br />
kdc_rotate = {<br />
period =  1d<br />
versions = 10<br />
}<br />
[appdefaults]<br />
pam = {<br />
debug =  false<br />
ticket_lifetime = 36000<br />
renew_lifetime = 36000<br />
forwardable = true<br />
krb4_convert = false<br />
}<br />
kinit = {<br />
renewable  = true<br />
forwardable= true<br />
}</span></p>
<p>Run  the kinit command and enter the administrator’s password.  If the  command runs successfully, you will see no output.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># kinit administrator<br />
Password for  administrator@TEST.SOG.COM:</span></p>
<p><span style="text-decoration: underline;">LDAP</span></p>
<p>ldap  client initialization on Solaris host.  The part of the command in  orange needs to be modified for your environment.  The rest of the  command is standard across all configurations.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># ldapclient manual \<br />
-a credentialLevel=proxy \<br />
-a authenticationMethod=simple \<br />
<span style="color: #ff6600;">-a proxyDN=cn=&#8221;ProxyDNUser,cn=Users,dc=TEST,dc=SOG,dc=COM&#8221; \<br />
-a proxyPassword=p@ssword1 \<br />
-a defaultSearchBase=dc=TEST,dc=SOG,dc=COM \<br />
-a domainName=TEST.SOG.COM \<br />
-a &#8220;defaultServerList=192.168.3.76&#8243; \</span><br />
-a attributeMap=group:userpassword=userPassword \<br />
-a attributeMap=group:memberuid=memberUid \<br />
-a attributeMap=group:gidnumber=gidNumber \<br />
-a attributeMap=passwd:gecos=cn \<br />
-a attributeMap=passwd:gidnumber=gidNumber \<br />
-a attributeMap=passwd:uidnumber=uidNumber \<br />
-a attributeMap=passwd:homedirectory=unixHomeDirectory \<br />
-a attributeMap=passwd:loginshell=loginShell \<br />
-a attributeMap=shadow:shadowflag=shadowFlag \<br />
-a attributeMap=shadow:userpassword=userPassword \<br />
-a objectClassMap=group:posixGroup=group \<br />
-a objectClassMap=passwd:posixAccount=user \<br />
-a objectClassMap=shadow:shadowAccount=user \<br />
<span style="color: #ff6600;">-a serviceSearchDescriptor=passwd:dc=TEST,dc=SOG,dc=COM?sub \<br />
-a serviceSearchDescriptor=group:dc=TEST,dc=SOG,dc=COM?sub</span></p>
<p># cp /etc/nsswitch.files  /etc/nsswitch.conf</p>
<p># vi /etc/nsswitch.conf<br />
passwd  files ldap<br />
group     files ldap<br />
hosts      files dns</p>
<p># svcadm restart  ldap/client</span></p>
<p><span style="text-decoration: underline;">PAM</span></p>
<p>Edit  /etc/pam.conf to use Kerberos authentication.  Both sites provided at  the top of this article show the same modifications to pam.conf.  In our  tests we found that those entries caused problems, most notably that  the root user could not login from the console.  Here is the /etc/pam.conf that we found to work best.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># vi /etc/pam.conf<br />
# Authentication  management<br />
#<br />
# login service (explicit because of pam_dial_auth)<br />
#<br />
login   auth  requisite          pam_authtok_get.so.1<br />
login   auth  required           pam_dhkeys.so.1<br />
login   auth  required           pam_unix_cred.so.1<br />
<span style="color: #ff6600;"> login    auth sufficient         pam_krb5.so.1</span><br />
login   auth  required           pam_unix_auth.so.1<br />
login   auth  required           pam_dial_auth.so.1<br />
# Default definitions for  Authentication management<br />
# Used when service name is not explicitly  mentioned for authentication<br />
#<br />
other   auth  requisite          pam_authtok_get.so.1<br />
other   auth  required           pam_dhkeys.so.1<br />
other   auth  required           pam_unix_cred.so.1<br />
<span style="color: #ff6600;"> other    auth sufficient         pam_krb5.so.1</span><br />
other   auth  required           pam_unix_auth.so.1<br />
# Default definition for  Password management<br />
# Used when service name is not explicitly  mentioned for password management<br />
other   auth  requisite          pam_authtok_get.so.1<br />
other   auth  required           pam_dhkeys.so.1<br />
other   auth  required           pam_unix_cred.so.1<br />
<span style="color: #ff6600;"> other    auth sufficient         pam_krb5.so.1</span><br />
other   auth  required           pam_unix_auth.so.1<br />
</span></p>
<p>Create  home directory for user.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># mkdir -p  /export/home/john.doe<br />
# chown john.doe:staff /export/home/john.doe<br />
# chmod 700 /export/home/john.doe<br />
</span></p>
<p>You should now be able to log into your Solaris system with your AD user account.
<div id="apf_post_footer">
<h4>Related Articles:</h4>
<ul>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=411">Mounting ISO Images in Solaris vs. AIX</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=406">Modify a Solaris Jumpstart Miniroot for Fun and Profit</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=363">Solaris Tips: Flash Archive (FLAR) with Zones</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=349">Solaris Tips: Unencapsulate SVM root mirror</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=337">Solaris Tips: Repairing the Boot Archive</a></li>
</ul>
</div>
<p><!-- HTML Codes by Quackit.com --><br />
<span style="font-family:Arial;font-size:18px;font-style:italic;font-weight:bold;text-decoration:underline;text-transform:none;color:000066;background-color:ffffff;">ABOUT US</span><br />
<span style="font-family:Arial;font-size:14px;font-style:normal;font-weight:bold;text-decoration:none;text-transform:none;color:003366;background-color:ffffff;">Seeds of Genius, Inc. offers a full range of IT solutions including hardware and software products in addition to consulting, installation and support services. For more information, please visit our main web site at <a href="http://www.seedsofgenius.com">http://www.seedsofgenius.com</a> or contact our Technical Sales department at (410) 312-9806.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.seedsofgenius.net/solaris/solaris-authentication-login-with-active-directory/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a Jumpstart Server</title>
		<link>http://www.seedsofgenius.net/solaris/install/creating-a-jumpstart-server</link>
		<comments>http://www.seedsofgenius.net/solaris/install/creating-a-jumpstart-server#comments</comments>
		<pubDate>Wed, 28 Oct 2009 21:19:29 +0000</pubDate>
		<dc:creator>bisbell</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Installation]]></category>

		<guid isPermaLink="false">http://192.168.1.15/?p=3</guid>
		<description><![CDATA[This is meant to provide a step-by-step walk-through on how to build a simple JumpStart server. For more details on further capabilities of JumpStart and other advanced installation topics please [...]]]></description>
			<content:encoded><![CDATA[<p>In most  office environments users will have a Windows workstation on their  desktop; most locations do not have users&#8217; log into a Unix/Linux desktop  as their primary work environment.  In these environments a small  percentage of these users may have a need to connect to their Unix  servers in order to manage databases, application servers, web servers,  etc.  It becomes an administrative nightmare to manage multiple sets of  users for the Windows and the Unix systems.  The reason for this  nightmare is primarily password management. In a lot of cases, Windows  and Unix systems have different password requirements even though they  may be in the same environment.</p>
<p>Often  times, password requirements may differ between the two system types.   This means users will have to use a different password on Windows and  Unix.  Also, when password change dates are not synchronized between the  Windows and Unix systems you&#8217;ll end with users that forget their Unix  passwords on a very frequent basis.</p>
<p>This article is  meant to provide the basic procedures to allow a Solaris system to use  user information provided by Active Directory on a Windows 2008 server  as the authentication method for logging into Solaris.</p>
<p>The  following instructions are cobbled together from several locations on  the internet and from in house testing.<br />
We primarily used the  following two sites, which offer steps on configuration using Windows  2003 R2.  We then made changes where required.</p>
<p><a href="http://blog.scottlowe.org/2006/08/15/solaris-10-and-active-directory-integration/">Sun  Wikis<br />
Scott  Lowe&#8217;s Blog</a></p>
<p><strong><span style="text-decoration: underline;">Our Test Environment</span></strong></p>
<ul type="disc">
<li>Domain Controller Information
<ul type="circle">
<li>Windows  2008 R2</li>
<li>Hostname = win2k8-dc</li>
<li>IP Address = 192.168.3.76</li>
<li>Domain  = test.sog.com</li>
<li>Kerberos Realm = TEST.SOG.COM</li>
</ul>
</li>
<li>Client  Information
<ul type="circle">
<li>Solaris 10_u8 x86</li>
<li>Hostname  = keystone</li>
<li>IP Address = 192.168.3.66</li>
</ul>
</li>
</ul>
<p><span style="font-size: large;"><strong><span style="text-decoration: underline;">Windows Configuration</span></strong></span></p>
<p>It is assumed  that Active Directory is setup and that DNS is configured on the domain  controller.  The steps provided are what you need to do to add Unix  functionality to an already existing Windows AD environment.  The  Solaris clients should be added to the DNS records on the DC.</p>
<p>The  following steps are required to add all additional functionality to the  domain controller to allow for Solaris clients to authenticate against  AD.</p>
<p><strong><span style="text-decoration: underline;">Install UNIX Schema into Active Directory<br />
</span></strong></p>
<p>Open &#8220;Server Manager&#8221; and click on  &#8220;Roles&#8221; in the left pane.  Click on &#8220;Add Role Services&#8221; in the &#8220;Active  Directory Domain Services&#8221; section in the right pane.</p>
<p><img class="alignnone" title="Screenshot #1" src="http://www.seedsofgenius.net/images/1_UNIX_AD_Auth_small.png" alt="" width="717" height="516" /></p>
<hr />Click on the check box to add &#8220;Identitiy  Management for Unix.&#8221;  Remove Password Synchronization then click on &#8220;Next&#8221;</p>
<p><img class="alignnone" title="Screenshot #2" src="http://www.seedsofgenius.net/images/2_UNIX_AD_Auth_small.png" alt="" width="547" height="404" /></p>
<hr />When you  reach the &#8220;Confirm Installation&#8221; page click on &#8220;Install&#8221;</p>
<p><img class="alignnone" title="Screenshot #3" src="http://www.seedsofgenius.net/images/3_UNIX_AD_Auth_small.png" alt="" width="546" height="403" /></p>
<hr />Click on &#8220;Close&#8221; on the next screen.  Your Domain Controller will now reboot.</p>
<p><img class="alignnone" title="Screenshot #5" src="http://www.seedsofgenius.net/images/5_UNIX_AD_Auth_small.png" alt="" width="546" height="403" /></p>
<hr /><strong><span style="text-decoration: underline;">User  Configuration in AD</span></strong></p>
<p>Any users that you want to be able to use  Active Directory for Solaris logins must have the Unix Attributes set  under User Properties for that user.  These properties include the UID,  Primary GID, login shell, and home directory.  (The users’ GECOS will  come from the Display Name setting under the General tab of the users’  properties.)</p>
<p><img class="alignnone" title="Screenshot #7" src="http://www.seedsofgenius.net/images/7_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p><img class="alignnone" title="Screenshot #8" src="http://www.seedsofgenius.net/images/8_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p><img class="alignnone" title="Screenshot #9" src="http://www.seedsofgenius.net/images/9_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p>Under Active Directory Users and Computers Right click the new user account and select Properties.  In the user&#8217;s properties window select the  <em>Unix Attributes</em> tab.</p>
<p>Select  the domain under &#8220;NIS Domain&#8221; and fill in the fields.</p>
<p><img class="alignnone" title="Screenshot #10" src="http://www.seedsofgenius.net/images/10_UNIX_AD_Auth.png" alt="" width="423" height="549" /></p>
<p>All other user properties  (secondary groups, RBAC roles/profiles/auths…) will come from the  standard file locations on the Solaris client systems- (/etc/group,  /etc/users, /etc/security/*attr)</p>
<p>Also, make sure that the user’s  password is not set to ‘<em>change at next login</em>.’  Solaris does not  have the hooks back into AD to do password management, so your user will  not be prompted to change their password and they will not be allowed  to login.  All they will see is a messages saying: “Login Incorrect.”</p>
<p style="padding-left: 30px;"><span style="color: #999999;"><span style="text-decoration: underline;">Create Kerberos  Keytab for Client System</span></span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">Although this step is given on both  of the sites provided above, I have found that it is not required to  create a functioning Solaris -&gt; AD authentication environment.  I do not know the security implication of not performing this step.<br />
On  the Windows system, create a user account for the Solaris system that  will be authenticating. In this example we are creating a user account  named host-keystone for the host keystone.  (Note: this is a user  account, not a computer account)</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;"><br />
</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">Once  this user is created you can disable it for security purposes.</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">The  purpose of this step is create the keytab file that will be transferred  to the /etc/krb5 directory of the Solaris system that will be  authenticating against AD.  In order to create the keytab file run the  following command from a CMD prompt on the domain controller.  (Make  appropriate changes for you local environment.)</span></p>
<p style="padding-left: 30px;"><span style="color: #999999;"><span style="font-size: x-small;">C:\Users\Administrator&gt;  ktpass –princ HOST\keystone.test.sog.com@TEST.SOG.COM -mapuser  TEST\host-keystone –crypto DES-CBC-MD5 +DesOnly –pass p@ssword1 -ptype  KRB5_NT_PRINCIPAL –out Desktop\keystone.keytab</span></span></p>
<p style="padding-left: 30px;"><span style="color: #999999;">Transfer  the file to the host keystone as /etc/krb5/krb5.keytab</span></p>
<p style="padding-left: 30px;">
<p><span style="text-decoration: underline;">Create  ProxyDN User Account</span></p>
<p>On the Windows system, create a user  account that will be the proxyDN.  Make this user a member of &#8220;Domain  Guests.&#8221;   Give it a password, and select ‘password never expires’<br />
This  will be the proxyDN username used when you run the ldapclient command  later on.  This account must remain enabled.<br />
In this test we  created a user account called “ProxyDNUser&#8221; with a password of  “p@ssword1”</p>
<p><img class="alignnone" title="Screenshot #11" src="http://www.seedsofgenius.net/images/11_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p><img class="alignnone" title="Screenshot #12" src="http://www.seedsofgenius.net/images/12_UNIX_AD_Auth.png" alt="" width="440" height="370" /></p>
<p>Make sure  to use the Display Name under the General properties (Full Name when  creating the user) during the ldapclient step.  In this case the correct user to use during the ldapclient command will be ProxyDNUser.  Do not use the user  logon name.  We ran into a bit of a  problem when we kept trying to use the Windows logon name and we kept  getting messages saying:</p>
<p><span style="font-family: &quot;courier new&quot;;"><span style="font-size: x-small;">libsldap: Status: 49  Mesg: openConnection: simple bind failed  &#8211; Invalid credentials</span></span></p>
<p>It was a bit frustrating when  we were completely sure that we were using the right password and still  kept getting a messages saying ‘Invalid Credentials.’</p>
<p>Use  ADSIedit on your domain controller to see the full DN for the user  account if you keep getting the message above and you’re positive you  have the password correct.</p>
<p><span style="font-size: large;"><strong><span style="text-decoration: underline;">Solaris  Configuration</span></strong></span></p>
<p><span style="text-decoration: underline;">Client Side DNS  Configuration</span></p>
<p>Your Solaris system should be a member of the  DNS domain defined by your domain controller.   Make sure to create both  forward and reverse lookup records in the domain for the Solaris  system.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># cat /etc/resolv.conf<br />
domain test.sog.com<br />
nameserver 192.168.3.76</span></p>
<p>Make sure you have  the /etc/nsswitch.conf file setup to use DNS as a name service for  hosts.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># grep &#8216;^hosts&#8217; /etc/nsswitch.conf<br />
hosts        files dns</span></p>
<p>Verify that DNS works.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># nslookup `hostname`<br />
Server:         192.168.3.76<br />
Address:        192.168.3.76#53</p>
<p>Name:   keystone.test.sog.com<br />
Address: 192.168.3.66</span></p>
<p>The following nslookup commands should  produce output similar to the following.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># nslookup -querytype=any  _ldap._tcp<br />
Server:         192.168.3.76<br />
Address:         192.168.3.76#53</p>
<p>_ldap._tcp.test.sog.com service = 0 100 389  win2k8-dc.test.sog.com.</p>
<p># nslookup -querytype=any  _gc._tcp<br />
Server:         192.168.3.76<br />
Address:         192.168.3.76#53</p>
<p>_gc._tcp.test.sog.com   service = 0 100 3268  win2k8-dc.test.sog.com.</span></p>
<p><span style="text-decoration: underline;">Kerberos</span></p>
<p>Configure  the /etc/krb5/krb5.conf file on the Solaris client.  Make appropriate  changes required for your local environment.<br />
This is the /etc/krb5/krb5.conf that we used on our test system.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt">[libdefaults]<br />
default_realm =  TEST.SOG.COM<br />
dns_lookup_kdc = true<br />
verify_ap_req_nofail = false<br />
[realms]<br />
TEST.SOG.COM = {<br />
kdc =  WIN2K8-DC.TEST.SOG.COM<br />
default_domain = TEST<br />
admin_server = WIN2K8-DC.TEST.SOG.COM<br />
}<br />
[domain_realm]<br />
.test.sog.com =  TEST.SOG.COM<br />
test.sog.com = TEST.SOG.COM<br />
[logging]<br />
default =  FILE:/var/krb5/kdc.log<br />
kdc = FILE:/var/krb5/kdc.log<br />
kdc_rotate = {<br />
period =  1d<br />
versions = 10<br />
}<br />
[appdefaults]<br />
pam = {<br />
debug =  false<br />
ticket_lifetime = 36000<br />
renew_lifetime = 36000<br />
forwardable = true<br />
krb4_convert = false<br />
}<br />
kinit = {<br />
renewable  = true<br />
forwardable= true<br />
}</span></p>
<p>Run  the kinit command and enter the administrator’s password.  If the  command runs successfully, you will see no output.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># kinit administrator<br />
Password for  administrator@TEST.SOG.COM:</span></p>
<p><span style="text-decoration: underline;">LDAP</span></p>
<p>ldap  client initialization on Solaris host.  The part of the command in  orange needs to be modified for your environment.  The rest of the  command is standard across all configurations.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># ldapclient manual \<br />
-a credentialLevel=proxy \<br />
-a authenticationMethod=simple \<br />
<span style="color: #ff6600;">-a proxyDN=cn=&#8221;ProxyDNUser,cn=Users,dc=TEST,dc=SOG,dc=COM&#8221; \<br />
-a proxyPassword=p@ssword1 \<br />
-a defaultSearchBase=dc=TEST,dc=SOG,dc=COM \<br />
-a domainName=TEST.SOG.COM \<br />
-a &#8220;defaultServerList=192.168.3.76&#8243; \</span><br />
-a attributeMap=group:userpassword=userPassword \<br />
-a attributeMap=group:memberuid=memberUid \<br />
-a attributeMap=group:gidnumber=gidNumber \<br />
-a attributeMap=passwd:gecos=cn \<br />
-a attributeMap=passwd:gidnumber=gidNumber \<br />
-a attributeMap=passwd:uidnumber=uidNumber \<br />
-a attributeMap=passwd:homedirectory=unixHomeDirectory \<br />
-a attributeMap=passwd:loginshell=loginShell \<br />
-a attributeMap=shadow:shadowflag=shadowFlag \<br />
-a attributeMap=shadow:userpassword=userPassword \<br />
-a objectClassMap=group:posixGroup=group \<br />
-a objectClassMap=passwd:posixAccount=user \<br />
-a objectClassMap=shadow:shadowAccount=user \<br />
<span style="color: #ff6600;">-a serviceSearchDescriptor=passwd:dc=TEST,dc=SOG,dc=COM?sub \<br />
-a serviceSearchDescriptor=group:dc=TEST,dc=SOG,dc=COM?sub</span></p>
<p># cp /etc/nsswitch.files  /etc/nsswitch.conf</p>
<p># vi /etc/nsswitch.conf<br />
passwd  files ldap<br />
group     files ldap<br />
hosts      files dns</p>
<p># svcadm restart  ldap/client</span></p>
<p><span style="text-decoration: underline;">PAM</span></p>
<p>Edit  /etc/pam.conf to use Kerberos authentication.  Both sites provided at  the top of this article show the same modifications to pam.conf.  In our  tests we found that those entries caused problems, most notably that  the root user could not login from the console.  Here is the /etc/pam.conf that we found to work best.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># vi /etc/pam.conf<br />
# Authentication  management<br />
#<br />
# login service (explicit because of pam_dial_auth)<br />
#<br />
login   auth  requisite          pam_authtok_get.so.1<br />
login   auth  required           pam_dhkeys.so.1<br />
login   auth  required           pam_unix_cred.so.1<br />
<span style="color: #ff6600;"> login    auth sufficient         pam_krb5.so.1</span><br />
login   auth  required           pam_unix_auth.so.1<br />
login   auth  required           pam_dial_auth.so.1<br />
# Default definitions for  Authentication management<br />
# Used when service name is not explicitly  mentioned for authentication<br />
#<br />
other   auth  requisite          pam_authtok_get.so.1<br />
other   auth  required           pam_dhkeys.so.1<br />
other   auth  required           pam_unix_cred.so.1<br />
<span style="color: #ff6600;"> other    auth sufficient         pam_krb5.so.1</span><br />
other   auth  required           pam_unix_auth.so.1<br />
# Default definition for  Password management<br />
# Used when service name is not explicitly  mentioned for password management<br />
other   auth  requisite          pam_authtok_get.so.1<br />
other   auth  required           pam_dhkeys.so.1<br />
other   auth  required           pam_unix_cred.so.1<br />
<span style="color: #ff6600;"> other    auth sufficient         pam_krb5.so.1</span><br />
other   auth  required           pam_unix_auth.so.1<br />
</span></p>
<p>Create  home directory for user.</p>
<p style="padding-left: 30px;"><span style="font-family: courier new; font-size: 8pt"># mkdir -p  /export/home/john.doe<br />
# chown john.doe:staff /export/home/john.doe<br />
# chmod 700 /export/home/john.doe<br />
</span></p>
<p>You should now be able to log into your Solaris system with your AD user account.
<div id="apf_post_footer">
<h4>Related Articles:</h4>
<ul>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=411">Mounting ISO Images in Solaris vs. AIX</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=406">Modify a Solaris Jumpstart Miniroot for Fun and Profit</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=363">Solaris Tips: Flash Archive (FLAR) with Zones</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=349">Solaris Tips: Unencapsulate SVM root mirror</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=337">Solaris Tips: Repairing the Boot Archive</a></li>
</ul>
</div>
<p><!-- HTML Codes by Quackit.com --><br />
<span style="font-family:Arial;font-size:18px;font-style:italic;font-weight:bold;text-decoration:underline;text-transform:none;color:000066;background-color:ffffff;">ABOUT US</span><br />
<span style="font-family:Arial;font-size:14px;font-style:normal;font-weight:bold;text-decoration:none;text-transform:none;color:003366;background-color:ffffff;">Seeds of Genius, Inc. offers a full range of IT solutions including hardware and software products in addition to consulting, installation and support services. For more information, please visit our main web site at <a href="http://www.seedsofgenius.com">http://www.seedsofgenius.com</a> or contact our Technical Sales department at (410) 312-9806.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.seedsofgenius.net/solaris/solaris-authentication-login-with-active-directory/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

