<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: vRA7.1 - RHEL 6 blueprint - using software component to config kerberos and join AD (weird problem) in VMware Aria Automation Tools Discussions</title>
    <link>https://communities.vmware.com/t5/VMware-Aria-Automation-Tools/vRA7-1-RHEL-6-blueprint-using-software-component-to-config/m-p/1377109#M8922</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Software components run as a named user called darwin.&amp;nbsp;&amp;nbsp; Assuming you installed the boot strap agent.&amp;nbsp;&amp;nbsp; Have you investigated that route?&amp;nbsp; What errors do you see on the domain controller?&amp;nbsp; what account do you run the script as when connecting via vRO? Interesting one for sure.&amp;nbsp; Previous roles I've done MS and AD, not so much on the linux side (but am learning now)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 04 Feb 2017 12:48:06 GMT</pubDate>
    <dc:creator>SteveCSchofield</dc:creator>
    <dc:date>2017-02-04T12:48:06Z</dc:date>
    <item>
      <title>vRA7.1 - RHEL 6 blueprint - using software component to config kerberos and join AD (weird problem)</title>
      <link>https://communities.vmware.com/t5/VMware-Aria-Automation-Tools/vRA7-1-RHEL-6-blueprint-using-software-component-to-config/m-p/1377108#M8921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two blueprints:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. RHEL6 blueprint with a script "living" on the guest OS that configs Kerberos and integrate with AD. Lets call it AD-Join. There is also a text file with the password to the service account we use for Kerberos authentication. The AD-Join script it is executed by a vRO workflow within the blueprint.&lt;/P&gt;&lt;P&gt;2. RHEL 6 blueprint with no scripts or text file "living" on the guest OS. I have a software component that runs AD-Join with secure string property for the service account password.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blueprint #1 runs without issues and users can log into that server using AD credentials.&lt;/P&gt;&lt;P&gt;Blueprint #2 runs, but I get issues with the AD-Join script within the software component. I have a function in the AD-Join script for the specific task of joining AD (other functions within the script prep for AD join, plus other things.) which is where I've isolated the problem to. For context, here is the function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The broken function:&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14859721005732795 jive_text_macro" jivemacro_uid="_14859721005732795" modifiedtitle="true"&gt;
&lt;P&gt;echo $password | kinit $username&lt;/P&gt;
&lt;P&gt;klist&lt;/P&gt;
&lt;P&gt;host=`hostname`&lt;/P&gt;
&lt;P&gt;host=$host\$&lt;/P&gt;
&lt;P&gt;sleep 20s&lt;/P&gt;
&lt;P&gt;net ads join -k&lt;/P&gt;
&lt;P&gt;sleep 30s&lt;/P&gt;
&lt;P&gt;kinit -k $host&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;This produces the following error message:&lt;/P&gt;&lt;P&gt;net ads join -k: Failed to join domain: failed to join domain &amp;lt;domain&amp;gt; over rpc: Access denied&lt;/P&gt;&lt;P&gt;kinit -k $host: kinit: Generic preauthentication failure while getting initial credentials&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For troubleshooting I added klist so I can see the output. I was able to verify that the ticket was created and is valid.&lt;/P&gt;&lt;P&gt;If I log into the server and run these commands manually, everything works. I thought maybe the Kerberos ticket wasn't replicated across my DCs, so I increased the sleep commands to 5mins each just to be sure, and no difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*NOTE* Just to be clear, the broken function works perfectly, as written above, in blueprint #1 (where the AD-Join script "lives" on the host). This error only happens when running the AD-Join script in a software component.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After lots of research I was able to solve my issue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the working function:&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14859726788935724 jive_text_macro" jivemacro_uid="_14859726788935724" modifiedtitle="true"&gt;
&lt;P&gt;echo $password | kinit $username&lt;/P&gt;
&lt;P&gt;klist&lt;/P&gt;
&lt;P&gt;host=`hostname`&lt;/P&gt;
&lt;P&gt;host=$host\$&lt;/P&gt;
&lt;P&gt;sleep 20s&lt;/P&gt;
&lt;P&gt;net ads join -k -U $username%$password&lt;/P&gt;
&lt;P&gt;sleep 30s&lt;/P&gt;
&lt;P&gt;kinit -k $host&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;This did not produce any errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to understand why I need to specify the -U $username%$password when using a software component to run the script versus running the script within the guest OS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2017 18:58:46 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-Aria-Automation-Tools/vRA7-1-RHEL-6-blueprint-using-software-component-to-config/m-p/1377108#M8921</guid>
      <dc:creator>TimR26</dc:creator>
      <dc:date>2017-02-01T18:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: vRA7.1 - RHEL 6 blueprint - using software component to config kerberos and join AD (weird problem)</title>
      <link>https://communities.vmware.com/t5/VMware-Aria-Automation-Tools/vRA7-1-RHEL-6-blueprint-using-software-component-to-config/m-p/1377109#M8922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Software components run as a named user called darwin.&amp;nbsp;&amp;nbsp; Assuming you installed the boot strap agent.&amp;nbsp;&amp;nbsp; Have you investigated that route?&amp;nbsp; What errors do you see on the domain controller?&amp;nbsp; what account do you run the script as when connecting via vRO? Interesting one for sure.&amp;nbsp; Previous roles I've done MS and AD, not so much on the linux side (but am learning now)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Feb 2017 12:48:06 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-Aria-Automation-Tools/vRA7-1-RHEL-6-blueprint-using-software-component-to-config/m-p/1377109#M8922</guid>
      <dc:creator>SteveCSchofield</dc:creator>
      <dc:date>2017-02-04T12:48:06Z</dc:date>
    </item>
  </channel>
</rss>

