<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Alex Tcherniakhovski - Security : AD Interop</title><link>http://blogs.msdn.com/alextch/archive/tags/AD+Interop/default.aspx</link><description>Tags: AD Interop</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Accessing ILM WMI Inteface from non-windows host</title><link>http://blogs.msdn.com/alextch/archive/2007/11/09/accessing-ilm-wmi-inteface-from-non-windows-host.aspx</link><pubDate>Fri, 09 Nov 2007 20:24:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6022913</guid><dc:creator>alextch</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/alextch/comments/6022913.aspx</comments><wfw:commentRss>http://blogs.msdn.com/alextch/commentrss.aspx?PostID=6022913</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal" minmax_bound="true"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'" minmax_bound="true"&gt;This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at &lt;A href="http://www.microsoft.com/info/cpyright.htm" minmax_bound="true" mce_href="http://www.microsoft.com/info/cpyright.htm"&gt;&lt;SPAN style="COLOR: #0033cc; mso-bidi-font-size: 11.0pt" minmax_bound="true"&gt;http://www.microsoft.com/info/cpyright.htm &lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal" minmax_bound="true"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'" minmax_bound="true"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal" minmax_bound="true"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'" minmax_bound="true"&gt;This screencast explores a scenario of calling WMI interface of ILM 2007 (MIIS component) from a non-Windows host, by utilizing Java.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal" minmax_bound="true"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'" minmax_bound="true"&gt;Specifically middle-ware provided by &lt;A class="" href="http://j-integra.intrinsyc.com/" mce_href="http://j-integra.intrinsyc.com/"&gt;Jintegra&lt;/A&gt; is utilized to access WMI from a Linux server.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal" minmax_bound="true"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'" minmax_bound="true"&gt;This approach could be utilized when there is a requirement to remotely from a non-Windows host trigger functionality of ILM server exposed via WMI. In this screencast we will examine a scenario of calling setPassword method of MIIS_CsObject class in order to reset Active Directory Password from Linux via ILM.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal" minmax_bound="true"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'" minmax_bound="true"&gt;&lt;A class="" href="http://alextch.members.winisp.net/javawmi/javawmi.wmv" mce_href="http://alextch.members.winisp.net/javawmi/javawmi.wmv"&gt;Please, follow this link to see the screencast.&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal" minmax_bound="true"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'" minmax_bound="true"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal" minmax_bound="true"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'" minmax_bound="true"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal" minmax_bound="true"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'" minmax_bound="true"&gt;References:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal" minmax_bound="true"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'" minmax_bound="true"&gt;&lt;A class="" href="http://j-integra.intrinsyc.com/support/com/doc/other_examples/WMI_Scripting_from_Java.htm" mce_href="http://j-integra.intrinsyc.com/support/com/doc/other_examples/WMI_Scripting_from_Java.htm"&gt;Accessing Windows Management Instrumentation (WMI) from Java&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal" minmax_bound="true"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'" minmax_bound="true"&gt;&lt;A class="" href="http://j-integra.intrinsyc.com/support/com/doc/remoteaccess.html" mce_href="http://j-integra.intrinsyc.com/support/com/doc/remoteaccess.html"&gt;Configuring DCOM for Remote Access&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal" minmax_bound="true"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'" minmax_bound="true"&gt;&lt;A class="" href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=113758" mce_href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=113758"&gt;Mapping VB Code to Java Code&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal" minmax_bound="true"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'" minmax_bound="true"&gt;&lt;A class="" href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=56925" mce_href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=56925"&gt;Shutting Down a Managed Windows Machine Using WMI&amp;nbsp;in Java&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal" minmax_bound="true"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'" minmax_bound="true"&gt;&lt;A class="" href="http://j-integra.intrinsyc.com/support/com/doc/#install.html" mce_href="http://j-integra.intrinsyc.com/support/com/doc/#install.html"&gt;J-Integra® Product Installation Instructions&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6022913" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/alextch/attachment/6022913.ashx" length="946849" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/alextch/archive/tags/MIIS/default.aspx">MIIS</category><category domain="http://blogs.msdn.com/alextch/archive/tags/AD+Interop/default.aspx">AD Interop</category><category domain="http://blogs.msdn.com/alextch/archive/tags/ILM+2007/default.aspx">ILM 2007</category></item><item><title>Configuring Tomcat to authenticate against Active Directory</title><link>http://blogs.msdn.com/alextch/archive/2007/06/25/configuring-tomcat-to-authenticate-against-active-directory.aspx</link><pubDate>Tue, 26 Jun 2007 00:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3529319</guid><dc:creator>alextch</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/alextch/comments/3529319.aspx</comments><wfw:commentRss>http://blogs.msdn.com/alextch/commentrss.aspx?PostID=3529319</wfw:commentRss><description>&lt;P minmax_bound="true"&gt;This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at &lt;A href="http://www.microsoft.com/info/cpyright.htm" minmax_bound="true" mce_href="http://www.microsoft.com/info/cpyright.htm"&gt;&lt;FONT color=#0033cc minmax_bound="true"&gt;http://www.microsoft.com/info/cpyright.htm&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;I quite often see application developers building their own authentication and authorization mechanisms into their applications. Of course, in some situations this approach may be required if the platform provided mechanisms are not meeting the requirements, but for the most part the built-in approach should be considered first for the following reasons:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpFirst style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;1.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Better security since access control is handled by the platform&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;2.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Less code to write (let the platform do the work)&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;3.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Ease of migration from one authentication source to another (no code changes required, only configuration file modifications)&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpLast style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;4.&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri size=3&gt;Adherence to standards, which leads to possible SSO scenarios by utilizing Kerberos or Federation technologies&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;In this walkthrough I will demonstrate how to configure Apache Tomcat to utilize Active Directory for user authentication, and also how to leverage Active Directory groups for controlling access within Java applications.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Please, follow this &lt;A class="" href="http://alextch.members.winisp.net/TomcatAndAD/TomcatAndAD.html" mce_href="http://alextch.members.winisp.net/TomcatAndAD/TomcatAndAD.html"&gt;link to see the walkthrough&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Resources:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;A href="http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html"&gt;&lt;FONT face=Calibri size=3&gt;Apache Tomcat Realm How-to&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P minmax_bound="true" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3529319" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/alextch/attachment/3529319.ashx" length="3510" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/alextch/archive/tags/AD+Interop/default.aspx">AD Interop</category></item><item><title>Sample Java application that retrieves group membership of an Active Directory user account.</title><link>http://blogs.msdn.com/alextch/archive/2007/06/18/sample-java-application-that-retrieves-group-membership-of-an-active-directory-user-account.aspx</link><pubDate>Tue, 19 Jun 2007 00:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3391254</guid><dc:creator>alextch</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/alextch/comments/3391254.aspx</comments><wfw:commentRss>http://blogs.msdn.com/alextch/commentrss.aspx?PostID=3391254</wfw:commentRss><description>&lt;P minmax_bound="true"&gt;This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at &lt;A href="http://www.microsoft.com/info/cpyright.htm" minmax_bound="true" mce_href="http://www.microsoft.com/info/cpyright.htm"&gt;&lt;FONT color=#0033cc minmax_bound="true"&gt;http://www.microsoft.com/info/cpyright.htm&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;This is a sample Java application that utilizes JNDI to access Active Directory and retrieves group membership of a user. This application uses computed tokenGroups attribute of a user object in order to get complete list of groups a user belongs to, including membership acquired through nested groups and built-in groups (ex. Domain Users).&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Credits&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;There is almost no my code in this sample. I constructed this application by pulling together snippets from various posts on the &lt;/FONT&gt;&lt;A href="http://forum.java.sun.com/forum.jspa?forumID=51"&gt;&lt;FONT face=Calibri size=3&gt;Naming and Directory (JNDI) Forum&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; , but since it took me a while to pull this all together I think there may be a value of having such useful sample all in one place.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Specifically I used the post (see link below) by &lt;/FONT&gt;&lt;A href="http://forum.java.sun.com/profile.jspa?userID=488701"&gt;&lt;FONT face=Calibri size=3&gt;Steven Adler&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt;. &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;Steven also provided me with a function to convert binary value of a SID into its string representation. I needed this function since tokenGroups stores group SIDs in binary format.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;A href="http://forum.java.sun.com/thread.jspa?threadID=581444&amp;amp;tstart=150"&gt;http://forum.java.sun.com/thread.jspa?threadID=581444&amp;amp;tstart=150&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P minmax_bound="true" mce_keep="true"&gt;
&lt;P minmax_bound="true"&gt;package adconnection;&lt;/P&gt;
&lt;P minmax_bound="true"&gt;import java.util.Hashtable;&lt;BR&gt;import javax.naming.*;&lt;BR&gt;import javax.naming.ldap.*;&lt;BR&gt;import javax.naming.directory.*;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;public class memberof&amp;nbsp;{&lt;BR&gt;&amp;nbsp;public static void main (String[] args)&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;Hashtable env = new Hashtable();&lt;BR&gt;&amp;nbsp;&amp;nbsp;String adminName = "CN=Administrator,CN=Users,DC=ADATUM,DC=COM";&lt;BR&gt;&amp;nbsp;&amp;nbsp;String adminPassword = "XXXXXXXXXXX";&lt;BR&gt;&amp;nbsp;&amp;nbsp;String ldapURL = "&lt;A href="ldap://adfsaccount.adatum.com:389/"&gt;ldap://adfsaccount.adatum.com:389&lt;/A&gt;";&lt;BR&gt;&amp;nbsp;&amp;nbsp;env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");&lt;BR&gt;&amp;nbsp;&amp;nbsp;//set security credentials, note using simple cleartext authentication&lt;BR&gt;&amp;nbsp;&amp;nbsp;env.put(Context.SECURITY_AUTHENTICATION,"simple");&lt;BR&gt;&amp;nbsp;&amp;nbsp;env.put(Context.SECURITY_PRINCIPAL,adminName);&lt;BR&gt;&amp;nbsp;&amp;nbsp;env.put(Context.SECURITY_CREDENTIALS,adminPassword);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;//connect to my domain controller&lt;BR&gt;&amp;nbsp;&amp;nbsp;env.put(Context.PROVIDER_URL,ldapURL);&lt;BR&gt;&amp;nbsp;&amp;nbsp;//specify attributes to be returned in binary format&lt;BR&gt;&amp;nbsp;&amp;nbsp;env.put("java.naming.ldap.attributes.binary","tokenGroups");&lt;/P&gt;
&lt;P minmax_bound="true"&gt;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;try {&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Create the initial directory context&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;LdapContext ctx = new InitialLdapContext(env,null);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Create the search controls &amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;SearchControls userSearchCtls = new SearchControls();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Specify the search scope&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;userSearchCtls.setSearchScope(SearchControls.OBJECT_SCOPE);&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//specify the LDAP search filter to find the user in question&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;String userSearchFilter = "(objectClass=user)";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp; //paceholder for an LDAP filter that will store SIDs of the groups the user belongs to&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;StringBuffer groupsSearchFilter = new StringBuffer();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;groupsSearchFilter.append("(|");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Specify the Base for the search&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;String userSearchBase = "CN=Alex Tcherni,CN=Users,DC=adatum,DC=com";&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Specify the attributes to return&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;String userReturnedAtts[]={"tokenGroups"};&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;userSearchCtls.setReturningAttributes(userReturnedAtts);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Search for objects using the filter&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;NamingEnumeration userAnswer = ctx.search(userSearchBase, userSearchFilter, userSearchCtls);&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Loop through the search results&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;while (userAnswer.hasMoreElements()) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SearchResult sr = (SearchResult)userAnswer.next();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Attributes attrs = sr.getAttributes();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (attrs != null) {&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;try {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for (NamingEnumeration ae = attrs.getAll();ae.hasMore();) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Attribute attr = (Attribute)ae.next();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for (NamingEnumeration e = attr.getAll();e.hasMore();) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; byte[] sid = (byte[])e.next();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; groupsSearchFilter.append("(objectSid=" + binarySidToStringSid(sid) + ")");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; groupsSearchFilter.append(")");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;catch (NamingException e)&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.err.println("Problem listing membership: " + e);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Search for groups the user belongs to in order to get their names&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Create the search controls &amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;SearchControls groupsSearchCtls = new SearchControls();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Specify the search scope&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;groupsSearchCtls.setSearchScope(SearchControls.SUBTREE_SCOPE);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Specify the Base for the search&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;String groupsSearchBase = "DC=adatum,DC=com";&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Specify the attributes to return&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;String groupsReturnedAtts[]={"sAMAccountName"};&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;groupsSearchCtls.setReturningAttributes(groupsReturnedAtts);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Search for objects using the filter&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;NamingEnumeration groupsAnswer = ctx.search(groupsSearchBase, groupsSearchFilter.toString(), groupsSearchCtls);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Loop through the search results&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;while (groupsAnswer.hasMoreElements()) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SearchResult sr = (SearchResult)groupsAnswer.next();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Attributes attrs = sr.getAttributes();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (attrs != null) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.out.println(attrs.get("sAMAccountName").get());&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;ctx.close();&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;} &lt;BR&gt;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;catch (NamingException e) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.err.println("Problem searching directory: " + e);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static final String binarySidToStringSid( byte[] SID ) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;String strSID = ""; &lt;/P&gt;
&lt;P minmax_bound="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //convert the SID into string format&lt;/P&gt;
&lt;P minmax_bound="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; long version;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; long authority;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; long count;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; long rid;&lt;/P&gt;
&lt;P minmax_bound="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strSID = "S";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; version = SID[0];&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strSID = strSID + "-" + Long.toString(version);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; authority = SID[4];&lt;/P&gt;
&lt;P minmax_bound="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (int i = 0;i&amp;lt;4;i++) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; authority &amp;lt;&amp;lt;= 8;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; authority += SID[4+i] &amp;amp; 0xFF;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P minmax_bound="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strSID = strSID + "-" + Long.toString(authority);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count = SID[2];&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count &amp;lt;&amp;lt;= 8;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count += SID[1] &amp;amp; 0xFF;&lt;/P&gt;
&lt;P minmax_bound="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (int j=0;j&amp;lt;count;j++) {&lt;/P&gt;
&lt;P minmax_bound="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rid = SID[11 + (j*4)] &amp;amp; 0xFF;&lt;/P&gt;
&lt;P minmax_bound="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (int k=1;k&amp;lt;4;k++) {&lt;/P&gt;
&lt;P minmax_bound="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rid &amp;lt;&amp;lt;= 8;&lt;/P&gt;
&lt;P minmax_bound="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rid += SID[11-k + (j*4)] &amp;amp; 0xFF;&lt;/P&gt;
&lt;P minmax_bound="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P minmax_bound="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strSID = strSID + "-" + Long.toString(rid);&lt;/P&gt;
&lt;P minmax_bound="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P minmax_bound="true"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return strSID;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P minmax_bound="true"&gt;}&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3391254" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/alextch/attachment/3391254.ashx" length="6027" type="text/plain" /><category domain="http://blogs.msdn.com/alextch/archive/tags/AD+Interop/default.aspx">AD Interop</category></item><item><title>Active Directory Schema Design Considerations and Auxiliary Classes</title><link>http://blogs.msdn.com/alextch/archive/2007/05/16/active-directory-schema-design-considerations-and-auxiliary-classes.aspx</link><pubDate>Wed, 16 May 2007 22:03:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2678425</guid><dc:creator>alextch</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/alextch/comments/2678425.aspx</comments><wfw:commentRss>http://blogs.msdn.com/alextch/commentrss.aspx?PostID=2678425</wfw:commentRss><description>&lt;P&gt;This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at &lt;A href="http://www.microsoft.com/info/cpyright.htm" mce_href="http://www.microsoft.com/info/cpyright.htm"&gt;http://www.microsoft.com/info/cpyright.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;This blog addresses one very specific but important issue around rules of creating auxiliary classes, and as most of my blogs, is based on something I stumbled upon while working on one of my projects.&lt;BR&gt;The scenario I am working on involves extending Active Directory schema for the purposes of storing Oracle related information in Active Directory. For more details on the approach of synchronizing AD and Oracle security information see my previous blog on this subject: &lt;A href="http://blogs.msdn.com/alextch/archive/2006/06/05/ADtoOra.aspx" mce_href="http://blogs.msdn.com/alextch/archive/2006/06/05/ADtoOra.aspx"&gt;http://blogs.msdn.com/alextch/archive/2006/06/05/ADtoOra.aspx&lt;/A&gt;&lt;BR&gt;For the purposes of this discussion what is important is that we need to store additional information in the AD user class that pertains to Oracle specific attributes.&amp;nbsp; The best practice around extending AD schema suggests creating an auxiliary class to store such information as opposed to modifying directly schema classes provided by Microsoft. The idea here is to create OracleSecurityPrincipal auxiliary class, which contains Oracle specific attributes and then later add this class as an auxiliary class to the User schema class. In this way we encapsulated all of the Oracle related information in a separate class but still have the ability to store these attributes in AD user object. &lt;BR&gt;So I followed this guidance and created an LDIF import file that would create the required structure. &lt;BR&gt;Below you can see an excerpt from that LDIF file.&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;dn: CN=codePlex-OraDefaultTableSpace,CN=Schema,CN=Configuration,DC=fabrikam,DC=msft&lt;BR&gt;changetype: add&lt;BR&gt;adminDisplayName: codePlex-OraDefaultTableSpace&lt;BR&gt;attributeID: 1.2.840.113556.1.4.7000.159.24.10.66&lt;BR&gt;attributeSyntax: 2.5.5.12&lt;BR&gt;cn: codePlex-OraDefaultTableSpace&lt;BR&gt;description: Specifies Oracle Default TableSpace&lt;BR&gt;isMemberOfPartialAttributeSet: FALSE&lt;BR&gt;isSingleValued: TRUE&lt;BR&gt;lDAPDisplayName: codePlex-OraDefaultTableSpace&lt;BR&gt;distinguishedName: CN=codePlex-OraDefaultTableSpace,CN=Schema,CN=Configuration,DC=fabrikam,DC=msft&lt;BR&gt;objectCategory: CN=Attribute-Schema,CN=Schema,CN=Configuration,DC=fabrikam,DC=msft&lt;BR&gt;objectClass: attributeSchema&lt;BR&gt;oMSyntax: 64&lt;BR&gt;name: codePlex-OraDefaultTableSpace&lt;BR&gt;searchFlags: 0&lt;/P&gt;
&lt;P&gt;dn: CN=codePlex-OraProfile,CN=Schema,CN=Configuration,DC=fabrikam,DC=msft&lt;BR&gt;changetype: add&lt;BR&gt;adminDisplayName: codePlex-OraProfile&lt;BR&gt;attributeID: 1.2.840.113556.1.4.7000.159.24.10.68&lt;BR&gt;attributeSyntax: 2.5.5.12&lt;BR&gt;cn: codePlex-OraProfile&lt;BR&gt;description: Specifies Oracle Profile Name&lt;BR&gt;isMemberOfPartialAttributeSet: FALSE&lt;BR&gt;isSingleValued: TRUE&lt;BR&gt;lDAPDisplayName: codePlex-OraProfile&lt;BR&gt;distinguishedName: CN=codePlex-OraProfile,CN=Schema,CN=Configuration,DC=fabrikam,DC=msft&lt;BR&gt;objectCategory: CN=Attribute-Schema,CN=Schema,CN=Configuration,DC=fabrikam,DC=msft&lt;BR&gt;objectClass: attributeSchema&lt;BR&gt;oMSyntax: 64&lt;BR&gt;name: codePlex-OraProfile&lt;BR&gt;searchFlags: 0&lt;/P&gt;
&lt;P&gt;DN:&lt;BR&gt;changetype: modify&lt;BR&gt;add: schemaUpdateNow&lt;BR&gt;schemaUpdateNow: 1&lt;BR&gt;-&lt;/P&gt;
&lt;P&gt;dn: CN=codePlex-OraSecurityPrincipal,CN=Schema,CN=Configuration,DC=Fabrikam,DC=msft&lt;BR&gt;changetype: add&lt;BR&gt;adminDisplayName: codePlex-OraSecurityPrincipal&lt;BR&gt;description: adds Oracle related attributes to the user class&lt;BR&gt;objectCategory: CN=Class-Schema,CN=Schema,CN=Configuration,DC=Fabrikam,DC=msft&lt;BR&gt;objectClass: classSchema&lt;BR&gt;lDAPDisplayName: codePlex-OraSecurityPrincipal&lt;BR&gt;governsID: 1.2.840.113556.1.4.7000.159.24.10.611.11&lt;BR&gt;instanceType: 4&lt;BR&gt;objectClassCategory: 3&lt;BR&gt;subClassOf: top&lt;BR&gt;mustContain: codePlex-OraDefaultTableSpace&lt;BR&gt;mayContain: codePlex-OraProfile&lt;/P&gt;
&lt;P&gt;DN:&lt;BR&gt;changetype: modify&lt;BR&gt;add: schemaUpdateNow&lt;BR&gt;schemaUpdateNow: 1&lt;BR&gt;-&lt;/P&gt;
&lt;P&gt;dn: CN=User,CN=Schema,CN=Configuration,DC=fabrikam,DC=msft&lt;BR&gt;changetype: ntdsSchemaModify&lt;BR&gt;add: auxiliaryClass&lt;BR&gt;auxiliaryClass: codePlex-OraSecurityPrincipal&lt;BR&gt;-&lt;/P&gt;
&lt;P&gt;DN:&lt;BR&gt;changetype: modify&lt;BR&gt;add: schemaUpdateNow&lt;BR&gt;schemaUpdateNow: 1&lt;BR&gt;-&lt;/P&gt;
&lt;P&gt;So let’s quickly walk through this LDIF file. &lt;BR&gt;Firstly, we created several Oracle related attributes (there are many more required attributes, but I removed them to conserve space).&lt;BR&gt;Secondly, an auxiliary schema class is created and the attributes created in step 1 are attached to it via mustContain and mayContain attributes of this class. We will come back to those two attributes shortly.&lt;BR&gt;Thirdly, we add the auxiliary class created in step to 2 to the user schema object.&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;When I put together this LDIF file it seemed pretty logical to me, but when I ran this file against my test environment I got the following error message “Unwilling to perform. The server side error is 8505.” This error occurred while trying to add the OracleSecurityPrincipal auxiliary class into User structured class.&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;After conducting some research I realized that the issue was around the mandatory attributes defined as part of the auxiliary class via mustContain attribute. During addition of an auxiliary class AD checks if there are any existing objects of the structured class that we are modifying (in our case we are dealing with the User class, and of course any AD deployment would have existing user objects), but since I defined codePlex-oraDefaultTableSpace as a mandatory attribute, this would create an integrity issue within AD where some object that were created previously would be missing some mandatory attributes, and therefore AD refused this change.&lt;BR&gt;So now that we understand the issue at hand, the only way to fix this issue is to make all of the auxiliary class attributes optional, by specifying them as mayContain.&lt;BR&gt;mustContain: codePlex-OraDefaultTableSpace&lt;BR&gt;mayContain: codePlex-OraProfile&lt;BR&gt;Even though from the logic of the OracleSecurityPrincipal class the OraProfile attribute may be considered optional and OraDefaultTableSpace mandatory. &lt;BR&gt;This was not intuitive to me at the beginning, but I suppose this is something that we need to keep in mind when working with auxiliary classes, especially if we plan to add them into the structured classes that already have objects in AD.&lt;BR&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2678425" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/alextch/archive/tags/AD+Interop/default.aspx">AD Interop</category><category domain="http://blogs.msdn.com/alextch/archive/tags/Active+Directory+Programming/default.aspx">Active Directory Programming</category></item><item><title>UNIX/LINUX Kerberos Authentication from the point of view of Windows Administrators</title><link>http://blogs.msdn.com/alextch/archive/2006/08/01/lnxauth.aspx</link><pubDate>Tue, 01 Aug 2006 16:58:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:685249</guid><dc:creator>alextch</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/alextch/comments/685249.aspx</comments><wfw:commentRss>http://blogs.msdn.com/alextch/commentrss.aspx?PostID=685249</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at &lt;A href="http://www.microsoft.com/info/cpyright.htm%20"&gt;http://www.microsoft.com/info/cpyright.htm &lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;First &lt;B style="mso-bidi-font-weight: normal"&gt;small disclaimer&lt;/B&gt;: This blog is not intended to provide a reader with detailed knowledge of UNIX/LINUX authentication and authorization mechanisms, but rather aimed to highlight some points that may not be apparent to IT professionals whose background mainly involves working in Microsoft based environments.&lt;/P&gt;
&lt;H2 style="MARGIN: 12pt 0in 3pt"&gt;&lt;EM&gt;&lt;FONT face=Arial&gt;Why should Windows Administrators care?&lt;/FONT&gt;&lt;/EM&gt;&lt;/H2&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;With the wide spread of Active Directory and increasing desire of IT managers to simplify their computing environments many companies are looking at ways to centralize authentication of Windows and UNIX users/hosts against a single directory. Since Active Directory natively supports such critical standards as Kerberos and LDAP and is widely used for authentication by Windows clients it is viewed as a natural choice for bringing other platforms (ex. UNIX/LINUX) under its umbrella. &lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;By providing centralized source of authentication IT managers achieve single-sign-on environments between disparate platforms, reduce administrative overhead of managing multiple identities and position themselves better to meet audit requirements.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Having said that, more and more Active Directory administrators are now involved in tasks of integrating UNIX/LINUX into Active Directory environments, therefore some knowledge of UNIX/LINUX authentication and authorization mechanism may become a mandatory skill for a lot of Windows Administrators, hence this small article. &lt;/P&gt;
&lt;H2 style="MARGIN: 12pt 0in 3pt"&gt;&lt;EM&gt;&lt;FONT face=Arial&gt;Differences in Kerberos implementations between Active Directory/Windows and MIT Kerberos/UNIX&lt;/FONT&gt;&lt;/EM&gt;&lt;/H2&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Despite the fact that Kerberos is an industry standard protocol, its specifications allow for vendor extensions in order to improve its functionality. Microsoft has done a lot of work in making Kerberos an underpinning of Windows security infrastructure, and in doing so several protocol extensions were implemented, which were submitted as standards.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;One of such extensions that is important for this discussion is PAC (Privilege Access Certificate). &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;In the Microsoft implementation of Kerberos, a token issued by KDC contains information about user’s group membership, which allows for using Kerberos not only for authentication but also for authorization. The authorization is possible, since the service accepting a Kerberos token can determine from the group list in the PAC portion of the token whether access should be allowed to a resource based on ACL applied to the resource in question. &lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;On the other hand, MIT implementation of Kerberos which is widely used in UNIX environments does not have such a facility, which limits the use of Kerberos only to authentication purposes. This is a very critical difference between Microsoft and MIT implementation which has some consequences on how UNIX/LINUX servers are configured in Kerberos environments. What does this really mean in terms of configuration? This may sound very strange for Windows Administrators: In a typical UNIX/LINUX environment a user is typically authenticated against one database (ex. Kerberos KDC database) and his or her account information (ex. UID, GID, group membership) is pulled from a different directory (ex. LDAP, &lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;st1:place w:st="on"&gt;&lt;st1:City w:st="on"&gt;NIS&lt;/st1:City&gt;&lt;/st1:place&gt;, local password files).&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;In other words, when setting up a UNIX/LINUX box two separate configuration tasks need to be performed: authentication and authorization. We will explore these UNIX/LINUX facilities in the next two sections. Of course, in Active Directory environment authentication and authorization information is stored in one place, which greatly simplifies administration and also improves performance since Kerberos has access to authorization data and packs it into the issued tokens, whereas in UNIX/LINUX environments additional network queries need to be performed outside Kerberos exchange to determine authorization attributes of a user. &lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;H2 style="MARGIN: 12pt 0in 3pt"&gt;&lt;EM&gt;&lt;FONT face=Arial&gt;What is PAM?&lt;/FONT&gt;&lt;/EM&gt;&lt;/H2&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;PAM stands for Pluggable Authentication Module, and is an API that allows the system administrator to configure authentication mechanisms rather than having authentication mechanisms hardcoded into the application. PAM is supported on Linux, HP-UX, AIX 5.1 and above, and Solaris. Administrators can customize an application's authentication system by making changes to /etc/pam.conf or an application specific file in the /etc/pam.d/ directory. &lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;PAM modules are shared libraries that add support for a specific authentication mechanism. UNIX platforms that support PAM normally have a PAM module called pam_unix for standard UNIX local file authentication.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;So from a perspective of a Windows Administrator how is PAM different let’s say from Windows GINA?&lt;/P&gt;
&lt;OL style="MARGIN-TOP: 0in" type=1&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; tab-stops: list .5in; mso-list: l0 level1 lfo1"&gt;By using PAM different applications can be configured to use different authentication sources. For example gdm (Gnome graphical login) could be configured to use MIT Kerberos pam_krb5 module, and let’s say telnet could be configured to use local UNIX password files pam_unix. Again, this quite different from a typical Windows environment where a user is typically authenticated once during login and against a single source. Obviously, this is a very important point to keep in mind when configuring a UNIX/LINUX box to authenticate against Active Directory. You need to ensure that all applications in question (ex. Graphical login, telnet, ssh, rlogin) are configured to authenticate against Active Directory. &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; tab-stops: list .5in; mso-list: l0 level1 lfo1"&gt;An application could be configured to authenticate against multiple sources. In other words, authentication could be chained. For example, graphical login could be configured to first try local UNIX password file, then MIT Kerberos, then &lt;st1:City w:st="on"&gt;&lt;st1:place w:st="on"&gt;NIS&lt;/st1:place&gt;&lt;/st1:City&gt;, and only then Active Directory. Obviously, we need to pay special attention to the sequence in which those authentication sources are configured, since you may get unexpected results if, for example, a user account with which you are logging-in is first found in local UNIX file, but really you meant to authenticate against Active Directory. So pay attention to the order of authentication sequence. If AD is the primary source of authentication, then move it to the beginning of the pam configuration file for the application in question.&lt;/LI&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; tab-stops: list .5in; mso-list: l0 level1 lfo1"&gt;Within PAM paradigm it is possible to require for multiple authentication sources to succeed in order to allow user to gain access to an application. This is something that Windows Administrators are not really accustomed to, therefore carefully examine the pam configuration files, especially for the authentication sources marked as required, and ensure that nothing blocks a user from accessing an application if he or she is successfully authenticated against AD, of course unless your intentions are to require additional authentication on top of AD. We will examine a sample PAM configuration file later on in this document in order to provide you with a practical example.&lt;/LI&gt;&lt;/OL&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;H2 style="MARGIN: 12pt 0in 3pt"&gt;&lt;EM&gt;&lt;FONT face=Arial&gt;What is NSS?&lt;/FONT&gt;&lt;/EM&gt;&lt;/H2&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;UNIX/LINUX operating systems use various “databases” to obtain information about users, groups and so forth. Traditionally, these databases were stored as flat text files in the /etc directory. For example, user information is stored in /etc/passwd and group information is stored in /etc/group. The Name Service Switch (NSS) is a subsystem built directly into the C runtime library (libc) and allows user and group identity information to be obtained from a variety of backend sources—not just the text files in the /etc directory. System administrators can change the NSS configuration by modifying the /etc/nsswitch.conf file. NSS modules are shared libraries that add support for user and group identity information to be retrieved from a specific backend data source. Common NSS modules are for &lt;st1:place w:st="on"&gt;&lt;st1:City w:st="on"&gt;nis&lt;/st1:City&gt;&lt;/st1:place&gt;, files, and db backends.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;NSS is probably a completely new concept for a Windows Administrator. Since authorization data is packaged into Kerberos tokens, Windows Administrators usually do not need to perform tasks around retrieval of authorization data. I myself was initially caught by surprise when configuring a LINUX workstation for authentication against AD. After I completed configuration of pam modules for AD, I tried to login to the workstation by providing my AD credentials, but was not able to pass through login screen. I examined the logs and saw messages about successful authentication, so why I could not login? Well, after examining the logs further I saw a message about unsuccessful attempt to retrieve my account information (at that point I did not properly configure nssswitch.conf yet). That was a very good lesson which made me realize that login process on UNIX/LINUX consists of two completely separate processes: authentication and user information retrieval. Both processes need to succeed in order to login. Another probably strange thing, from a Windows Administrator point of view, is the fact that authentication information and user account information are typically stored in separate databases, in contrast to AD where everything is stored in a single database.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;H2 style="MARGIN: 12pt 0in 3pt"&gt;&lt;EM&gt;&lt;FONT face=Arial&gt;Configuration Example: Vintela Authentication Services&lt;/FONT&gt;&lt;/EM&gt;&lt;/H2&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;So let’s walk through a configuration example that should outline some of the concepts that we discussed in the article. In this example we will examine a configuration of LINUX workstation configured to authenticate against Active Directory. For the purposes of this example I will use Vintela Authentication (VAS) Services package, provided by Quest, which allows seamless integration of UNIX/LINUX operating systems with AD. &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;This example assumes that VAS is already installed and configured.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;For details on VAS see this link: &lt;A href="http://www.quest.com/Vintela_Authentication_Services/"&gt;http://www.quest.com/Vintela_Authentication_Services/&lt;/A&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;As an example we will take a look at configuring Gnome Graphical Login (GDM) to use AD as authentication source. So by switching to the /etc/pam.d directory and editing gdm file as shown below we will configure this application to among other things authenticate against AD.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;auth&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;[ignore=ignore success=done default=die]&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;pam_vas3.so&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;create_homedir get_tgt&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;auth&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;sufficient&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;/lib/security/$ISA/pam_unix.so likeauth nullok&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;auth&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;sufficient&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;/lib/security/$ISA/pam_krb5.so use_first_pass&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;auth&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;required&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;/lib/security/$ISA/pam_deny.so&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;account&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;[ignore=ignore success=done default=die]&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;pam_vas3.so&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;account&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;required&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;/lib/security/$ISA/pam_unix.so broken_shadow&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;account&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;sufficient&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;/lib/security/$ISA/pam_succeed_if.so uid &amp;lt; 100 quiet&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;account&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;[default=bad success=ok user_unknown=ignore] /lib/security/$ISA/pam_krb5.so&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;account&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;required&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;/lib/security/$ISA/pam_permit.so&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;password&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;[ignore=ignore success=done default=die]&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;pam_vas3.so&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;password&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;requisite&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;/lib/security/$ISA/pam_cracklib.so retry=3&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;password&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;sufficient&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;/lib/security/$ISA/pam_unix.so nullok use_authtok md5 shadow&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;password&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;sufficient&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;/lib/security/$ISA/pam_krb5.so use_authtok&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;password&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;required&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;/lib/security/$ISA/pam_deny.so&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;So let’s attempt to decipher this configuration file. &lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;First of all, you will notice that the file is divided into three sections: auth, account and password.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;auth – In this section we configure pam module’s sequence and parameters for performing validation of submitted user names and passwords&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;account – In this section we configure pam module’s sequence and parameters for performing account validation (account againg, expiration, etc)&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;password -&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;In this section we configure pam module’s sequence and parameters with respect to dealing with password policies&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Now let’s walk through the auth section. There are four pam modules specified there, and as explained earlier their sequence is important. So in our case VAS module will have precedence over all other modules, therefore user credentials will be first checked against AD. If credentials are validated successfully then no other pam modules in the auth section will be invoked (success=done assures us of that). You need to consult the VAS documentation to fully understand all options available to you when configuring this module (by the way, the same is true for any other pam module).&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Should AD authentication fail, then pam_unix (local UNIX password file) will be tried, should this pam fail as well then pam_krb5 (MIT Kerberos implementation) will be tried. If none of the first 3 pam modules succeed then pam_deny will force login failure.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;The remaining account and password sections are almost identical to auth section, therefore will not be discussed here.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Now let’s take a look at nsswitch.conf configuration file. To conserve space I only provide the relevant portion of the file here.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;passwd:&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;files vas3&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;shadow:&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;files&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;group:&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;files vas3&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;As you can see, this file is quite simple. It simply lists the order in which the system will attempt to gather user account information. For example, for a given user the system will first try to determine his or her group membership by looking at /etc/passwd identified by files keyword and then if that fails will switch to VAS, which it turn uses AD as a source of group membership.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=685249" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/alextch/archive/tags/AD+Interop/default.aspx">AD Interop</category></item><item><title>How to establish two-way trust relationship between MIT V5 Kerberos Realm and Active Directory using RC4 encryption</title><link>http://blogs.msdn.com/alextch/archive/2006/07/18/MITtoADRC4.aspx</link><pubDate>Tue, 18 Jul 2006 22:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:670102</guid><dc:creator>alextch</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/alextch/comments/670102.aspx</comments><wfw:commentRss>http://blogs.msdn.com/alextch/commentrss.aspx?PostID=670102</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt"&gt;This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 13.5pt"&gt;&lt;A href="http://www.microsoft.com/info/cpyright.htm"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #0033cc"&gt;http://www.microsoft.com/info/cpyright.htm&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;With the introduction of Windows 2003 SP1 it is now possible to use RC4 encryption for Kerberos exchanges between MIT V5 Realms and Active Directory as opposed, now considered to be week, DES protocol. Despite the fact that there a several good resource on the web that provide sufficient information on how to in principal establish trust between AD and MIT V5 Kerberos Realm, most of them were written prior to Windows 2003 SP1 and do not provide information on how to utilize RC4. &lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;This walk-through attempts to bridge this gap and provide some specifics as to how to configure the trust to use RC4 encryption.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Please, follow this &lt;SPAN style="FONT-SIZE: 14pt"&gt;&lt;A href="http://alextch.members.winisp.net/MITtoADTrustRC4/MITREALMTrustToAd.wmv"&gt;link&lt;/A&gt;&lt;/SPAN&gt; for the complete walkthrough.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=670102" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/alextch/archive/tags/AD+Interop/default.aspx">AD Interop</category></item><item><title>How to interpret encryption types definitions in krb5kdc.log on UNIX KDC, during configuration of trust relationship between MIT V5 Realm and Active Directory </title><link>http://blogs.msdn.com/alextch/archive/2006/07/18/etypes.aspx</link><pubDate>Tue, 18 Jul 2006 19:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:669805</guid><dc:creator>alextch</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/alextch/comments/669805.aspx</comments><wfw:commentRss>http://blogs.msdn.com/alextch/commentrss.aspx?PostID=669805</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt"&gt;This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 13.5pt"&gt;&lt;A href="http://www.microsoft.com/info/cpyright.htm"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #0033cc"&gt;http://www.microsoft.com/info/cpyright.htm&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;First of all why this is even important? Well, if you ever tried to configure a trust relationship between MIT V5 Realm and AD, I am sure you probably ran into some initial configuration issues and had to look into the krb5kdc.log file to figure out what the issue was. Basically a very typical issue to run into is the fact that AD and MIT Realm could not agree on mutual encryption types and krb5kdc is a good place to find out about this. Additionally, with introduction of Windows 2003 SP1 it is now possible to use RC4 encryption for Kerberos exchanges between MIT V5 Realms and Active Directory as opposed, now considered to be week, DES protocol. So by looking at the krb5kdc.log you can see what type of encryption is being used to ensure that RC4 is in fact&amp;nbsp;being utilized. One of the problems that I encountered during such troubleshooting sessions was the fact that encryption types displayed in the log file are not presented in an intuitive format.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Let’s take a look at a sample log entry from krb5kdc.log:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Jul 17 11:19:57 rh01.mit.contoso.com krb5kdc[1864](info): TGS_REQ (7 etypes {23 -133 -128 3 1 24 -135}) 192.168.15.103: ISSUE: authtime 1153149597, etypes {rep= 23 tkt=23 ses=23}, j&lt;A href="http://groups.google.ca/groups/unlock?msg=4f2a23a16c7e4002&amp;amp;_done=/group/comp.protocols.kerberos/browse_thread/thread/91a02b55bcd83818/4f2a23a16c7e4002" target=_parent&gt;&lt;FONT color=#0000cc&gt;...&lt;/FONT&gt;&lt;/A&gt;@MIT.CONTOSO.COM for krbtgt/MIT.CONTOSO.&lt;A href="http://groups.google.ca/groups/unlock?msg=4f2a23a16c7e4002&amp;amp;_done=/group/comp.protocols.kerberos/browse_thread/thread/91a02b55bcd83818/4f2a23a16c7e4002" target=_parent&gt;&lt;FONT color=#0000cc&gt;...&lt;/FONT&gt;&lt;/A&gt;@MIT.CONTOSO.COM&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;Let’s try to decipher this message. So first of all this is a TGS_REQ packet (client is requesting TGT) from client at IP 192.168.15.103. The client in the TGS_REQ is sending the encryption types that it supports in the following structure etypes {23 -133 -128 3 1 24 -135}. If you thought that the numbers in brackets represent corresponding encryption types then you are correct. The challenge for me was to find the translation from numbers to actual protocol names so that this message could have some meaning. After doing some digging and posting, I finally found that the translation table is defined in RFC 3961&lt;SPAN style="FONT-SIZE: 8.5pt; FONT-FAMILY: Arial"&gt; &lt;/SPAN&gt;Section 8&lt;SPAN style="FONT-SIZE: 8.5pt; FONT-FAMILY: Arial"&gt; &lt;A href="http://www.google.com/url?sa=D&amp;amp;q=http://www.ietf.org/rfc/rfc3961.txt" target=_blank&gt;http://www.ietf.org/rfc/rfc3961.txt&lt;/A&gt;. &lt;/SPAN&gt;For your convenience I pasted the table here as well&lt;SPAN style="FONT-SIZE: 8.5pt; FONT-FAMILY: Arial"&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;FONT size=2&gt;encryption type&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;etype&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;section or comment&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size=2&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;-----------------------------------------------------------------&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size=2&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;des-cbc-crc&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;1&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;6.2.3&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size=2&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;des-cbc-md4&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;2&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;6.2.2&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size=2&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;des-cbc-md5&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;3&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;6.2.1&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size=2&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;[reserved]&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;4&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size=2&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;des3-cbc-md5&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;5&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size=2&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;[reserved]&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;6&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size=2&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;des3-cbc-sha1&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;7&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size=2&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;dsaWithSHA1-CmsOID&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;9&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(pkinit)&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size=2&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;md5WithRSAEncryption-CmsOID&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;10&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(pkinit)&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size=2&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;sha1WithRSAEncryption-CmsOID&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;11&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(pkinit)&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size=2&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;rc2CBC-EnvOID&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;12&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;(pkinit)&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size=2&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;rsaEncryption-EnvOID&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;13&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(pkinit from PKCS#1 v1.5)&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size=2&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;rsaES-OAEP-ENV-OID&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;14&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(pkinit from PKCS#1 v2.0)&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size=2&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;des-ede3-cbc-Env-OID&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;15&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(pkinit)&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size=2&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;des3-cbc-sha1-kd&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;16&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;6.3&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size=2&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;aes128-cts-hmac-sha1-96&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;17&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;[KRB5-AES]&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size=2&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;aes256-cts-hmac-sha1-96&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;18&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;[KRB5-AES]&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size=2&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;rc4-hmac&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;23&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(Microsoft)&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size=2&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;rc4-hmac-exp&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;24&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;(Microsoft)&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT size=2&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;subkey-keymaterial&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;65&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(opaque; PacketCable)&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;So now we can see that the client requested &lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;etypes {RC4-hmac -133 -128 des-cbc-md5 des-cbc-crc RC4-hmac-exp -135}. A bit clearer, but what about those negative values? &lt;/SPAN&gt;Well negative values are reserved to implementers of protocol. Since the client in my case was XP workstation, then the negative values would be defined by Microsoft, and indeed in Microsoft Windows Platform SDK ntsecapi.h we can find:&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 8.5pt; FONT-FAMILY: Arial"&gt;#define KERB_ETYPE_RC4_MD4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-128 &amp;nbsp; &amp;nbsp;// FFFFFF80 &lt;BR&gt;#define KERB_ETYPE_RC4_PLAIN2 &amp;nbsp; &amp;nbsp; &amp;nbsp; -129 &lt;BR&gt;#define KERB_ETYPE_RC4_LM &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -130 &lt;BR&gt;#define KERB_ETYPE_RC4_SHA &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-131 &lt;BR&gt;#define KERB_ETYPE_DES_PLAIN &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-132 &lt;BR&gt;#define KERB_ETYPE_RC4_HMAC_OLD &amp;nbsp; &amp;nbsp; -133 &amp;nbsp; &amp;nbsp;// FFFFFF7B &lt;BR&gt;#define KERB_ETYPE_RC4_PLAIN_OLD &amp;nbsp; &amp;nbsp;-134 &lt;BR&gt;#define KERB_ETYPE_RC4_HMAC_OLD_EXP -135 &lt;BR&gt;#define KERB_ETYPE_RC4_PLAIN_OLD_EXP -136 &lt;BR&gt;#define KERB_ETYPE_RC4_PLAIN &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-140 &lt;BR&gt;#define KERB_ETYPE_RC4_PLAIN_EXP &amp;nbsp; &amp;nbsp;-141 &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;So now using those 2 sources we can completely interpret the message as:&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;{RC4-HMAC RC4-HMAC-OLD RC4-MD4 DES-CBC-MD5 DES-CBC-CRC RC4-HMAC-EXP RC4-HMAC_OLD_EXP}. &lt;/SPAN&gt;By the way the token was issued with etype = 23 which means RC4-HMAC, which is exactly what you want.&lt;/P&gt;
&lt;P&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=669805" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/alextch/archive/tags/AD+Interop/default.aspx">AD Interop</category></item><item><title>Active Directory and UNIX integration via Vintela line of products</title><link>http://blogs.msdn.com/alextch/archive/2005/11/03/ad-and-unix-interop.aspx</link><pubDate>Thu, 03 Nov 2005 22:21:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:488783</guid><dc:creator>alextch</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/alextch/comments/488783.aspx</comments><wfw:commentRss>http://blogs.msdn.com/alextch/commentrss.aspx?PostID=488783</wfw:commentRss><description>&lt;P&gt;&lt;FONT size=4&gt;Active Directory and UNIX integration via Vintela line of products&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at &lt;A href="http://www.microsoft.com/info/cpyright.htm"&gt;http://www.microsoft.com/info/cpyright.htm &lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Please, follow this &lt;A href="http://xpstream.winisp.net/alextch/Vintela.wmv"&gt;link &lt;/A&gt;to see a demo on integration capabilities (SSO, Management) between Active Directory and UNIX using &lt;A href="http://www.vintela.com"&gt;Vintela&lt;/A&gt; line of products (VAS, VGP, VMX)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=488783" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/alextch/archive/tags/AD+Interop/default.aspx">AD Interop</category></item><item><title>How to set Active Directory Password from Java application</title><link>http://blogs.msdn.com/alextch/archive/2005/06/15/set-ad-password-from-java.aspx</link><pubDate>Wed, 15 Jun 2005 22:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:429496</guid><dc:creator>alextch</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/alextch/comments/429496.aspx</comments><wfw:commentRss>http://blogs.msdn.com/alextch/commentrss.aspx?PostID=429496</wfw:commentRss><description>&lt;H1&gt;&lt;FONT size=4&gt;How to set Active Directory Password from Java application&lt;/FONT&gt;&lt;/H1&gt;
&lt;P&gt;This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at &lt;A href="http://www.microsoft.com/info/cpyright.htm"&gt;http://www.microsoft.com/info/cpyright.htm&lt;/A&gt;&lt;/P&gt;
&lt;H2&gt;Business Scenario&lt;/H2&gt;
&lt;P&gt;Many Java applications now utilize Active Directory as a source of authentication, in some situations it may be required to set Active Directory password from within Java applications. I encountered a scenario where majority of the users of a Java application were on Active Directory, but for a small percentage of users that do not log-in to Active Directory from their desktops we needed to provide a functionality within the application to set user passwords. &lt;/P&gt;
&lt;P&gt;Please, follow this &lt;A href="http://alextch.members.winisp.net/ResetADPasswordFromJava/SetADPasswordFromJava.htm"&gt;&lt;STRONG&gt;link&lt;/STRONG&gt;&lt;/A&gt; for a complete step-by-step guide&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=429496" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/alextch/archive/tags/AD+Interop/default.aspx">AD Interop</category></item></channel></rss>