<div dir="ltr"><div class="gmail_extra">On Tue, Jun 17, 2014 at 6:57 PM, Dan Tenenbaum <span dir="ltr">&lt;<a href="mailto:dtenenba@fhcrc.org" target="_blank">dtenenba@fhcrc.org</a>&gt;</span> wrote:<br><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanks. I booted up an instance but the Get System Log action did not show any output.</blockquote><div>
<br></div><div>It can take up to 10 mins (sometimes even more!) for the log to propagate to the web console.<br><br>Rayson<br><br>==================================================<br>Open Grid Scheduler - The Official Open Source Grid Engine<br>
<a href="http://gridscheduler.sourceforge.net/" target="_blank">http://gridscheduler.sourceforge.net/</a><br><a href="http://gridscheduler.sourceforge.net/GridEngine/GridEngineCloud.html" target="_blank">http://gridscheduler.sourceforge.net/GridEngine/GridEngineCloud.html</a><br>
</div><div><br><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> Is this available in some other way, like with dmesg or something? (I looked briefly at the dmesg output but did not see anything suggesting the password was reset).<br>

<br>
I think I have come up with a workaround, which is to use something like this in root&#39;s crontab:<br>
<br>
@reboot echo &quot;ubuntu:foobar&quot; | /usr/sbin/chpasswd &gt; /tmp/chpasswd.result 2&gt;&amp;1<br>
<br>
Of course, this is completely insecure. Luckily, in this context, I don&#39;t actually care about security, and in fact I want this password to be publicly known by users of the AMI. So this still might need to be fixed at the cloud-init level sometime down the line, when me or someone else runs across this and needs a secure solution.<br>

<div class="im"><br>
Dan<br>
<br>
<br>
----- Original Message -----<br>
&gt; From: &quot;Rayson Ho&quot; &lt;<a href="mailto:raysonlogin@gmail.com">raysonlogin@gmail.com</a>&gt;<br>
&gt; To: &quot;Dan Tenenbaum&quot; &lt;<a href="mailto:dtenenba@fhcrc.org">dtenenba@fhcrc.org</a>&gt;<br>
&gt; Cc: <a href="mailto:starcluster@mit.edu">starcluster@mit.edu</a><br>
</div><div class=""><div class="h5">&gt; Sent: Tuesday, June 17, 2014 3:19:01 PM<br>
&gt; Subject: Re: [StarCluster] problem modifying starcluster AMI - ubuntu password change does not persist<br>
&gt;<br>
&gt;<br>
&gt; I believe it is cloud-init, which is installed by default on all the<br>
&gt; Ubuntu AMI images, that is changing your password for the ububtu<br>
&gt; user.<br>
&gt;<br>
&gt;<br>
&gt; So to verify, after you boot up an instance with your new AMI, get<br>
&gt; the instance&#39;s console output by using the &quot;Get System Log&quot; action.<br>
&gt; If there is a line like: Changing password for ubuntu, or anything<br>
&gt; related to password in the boot log, then we can fix that for you by<br>
&gt; changing the cloud-init behavior.<br>
&gt;<br>
&gt;<br>
&gt; Rayson<br>
&gt;<br>
&gt; ==================================================<br>
&gt; Open Grid Scheduler - The Official Open Source Grid Engine<br>
&gt; <a href="http://gridscheduler.sourceforge.net/" target="_blank">http://gridscheduler.sourceforge.net/</a><br>
&gt; <a href="http://gridscheduler.sourceforge.net/GridEngine/GridEngineCloud.html" target="_blank">http://gridscheduler.sourceforge.net/GridEngine/GridEngineCloud.html</a><br>
&gt;<br>
&gt;<br>
&gt; On Tue, Jun 17, 2014 at 5:16 PM, Dan Tenenbaum &lt; <a href="mailto:dtenenba@fhcrc.org">dtenenba@fhcrc.org</a> &gt;<br>
&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt; However, I just reproduced the problem in a few simpler steps:<br>
&gt;<br>
&gt; - launched an instance of the sc ami ami-3393a45a (in the aws<br>
&gt; console)<br>
&gt; - ssh&#39;d to it, changed ubuntu&#39;s password to foobar<br>
&gt; - verified that the change worked by doing &#39;su - ubuntu&#39;<br>
&gt; - created an image (again in the console) based on that instance<br>
&gt; - started a new instance of the image from the last step<br>
&gt; - ssh&#39;d in as ubuntu<br>
&gt; - &#39;su - ubuntu&#39; with the password I set fails.<br>
&gt;<br>
&gt;<br>
&gt; Dan<br>
&gt;<br>
&gt;<br>
&gt; ----- Original Message -----<br>
&gt;<br>
&gt; &gt; From: &quot;Dan Tenenbaum&quot; &lt; <a href="mailto:dtenenba@fhcrc.org">dtenenba@fhcrc.org</a> &gt;<br>
&gt; &gt; To: &quot;Rayson Ho&quot; &lt; <a href="mailto:raysonlogin@gmail.com">raysonlogin@gmail.com</a> &gt;<br>
&gt; &gt; Cc: <a href="mailto:starcluster@mit.edu">starcluster@mit.edu</a><br>
&gt;<br>
&gt;<br>
&gt; &gt; Sent: Tuesday, June 17, 2014 1:54:45 PM<br>
&gt; &gt; Subject: Re: [StarCluster] problem modifying starcluster AMI -<br>
&gt; &gt; ubuntu password change does not persist<br>
&gt; &gt;<br>
&gt; &gt; Hi Rayson,<br>
&gt; &gt;<br>
&gt; &gt; I went through a couple of iterations.<br>
&gt; &gt;<br>
&gt; &gt; I started by using launching the SC AMI with the command documented<br>
&gt; &gt; at<br>
&gt; &gt; <a href="http://star.mit.edu/cluster/docs/latest/manual/create_new_ami.html" target="_blank">http://star.mit.edu/cluster/docs/latest/manual/create_new_ami.html</a><br>
&gt; &gt; ( starcluster start -o -s 1 -I &lt;INSTANCE-TYPE&gt; -m &lt;BASE-AMI-ID&gt;<br>
&gt; &gt; imagehost)<br>
&gt; &gt;<br>
&gt; &gt; Then I added chef to the running instance (I did not change any<br>
&gt; &gt; passwords at this point).<br>
&gt; &gt;<br>
&gt; &gt; Then I created a new image from that using the starcluster ebimage<br>
&gt; &gt; command, and used vagrant (with the aws plugin) and chef to<br>
&gt; &gt; provision an instance of that image according to my needs and to<br>
&gt; &gt; change ubuntu&#39;s password.<br>
&gt; &gt;<br>
&gt; &gt; I&#39;m wondering if there are startup daemons, or NFS, or something,<br>
&gt; &gt; that somehow resets the /etc/passwd file or explicitly resets<br>
&gt; &gt; ubuntu&#39;s password?<br>
&gt; &gt;<br>
&gt; &gt; Thanks,<br>
&gt; &gt; Dan<br>
&gt; &gt;<br>
&gt; &gt; ----- Original Message -----<br>
&gt; &gt; &gt; From: &quot;Rayson Ho&quot; &lt; <a href="mailto:raysonlogin@gmail.com">raysonlogin@gmail.com</a> &gt;<br>
&gt; &gt; &gt; To: &quot;Dan Tenenbaum&quot; &lt; <a href="mailto:dtenenba@fhcrc.org">dtenenba@fhcrc.org</a> &gt;<br>
&gt; &gt; &gt; Cc: <a href="mailto:starcluster@mit.edu">starcluster@mit.edu</a><br>
&gt; &gt; &gt; Sent: Tuesday, June 17, 2014 1:31:07 PM<br>
&gt; &gt; &gt; Subject: Re: [StarCluster] problem modifying starcluster AMI -<br>
&gt; &gt; &gt; ubuntu password change does not persist<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; What tools did you use to create the AMI? Did you use the web<br>
&gt; &gt; &gt; console<br>
&gt; &gt; &gt; or you use the StarCluster command?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; If you use the SC ebsimage command, then did you change your<br>
&gt; &gt; &gt; password<br>
&gt; &gt; &gt; on the image host?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Rayson<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; ==================================================<br>
&gt; &gt; &gt; Open Grid Scheduler - The Official Open Source Grid Engine<br>
&gt; &gt; &gt; <a href="http://gridscheduler.sourceforge.net/" target="_blank">http://gridscheduler.sourceforge.net/</a><br>
&gt; &gt; &gt; <a href="http://gridscheduler.sourceforge.net/GridEngine/GridEngineCloud.html" target="_blank">http://gridscheduler.sourceforge.net/GridEngine/GridEngineCloud.html</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; On Tue, Jun 17, 2014 at 3:17 PM, Dan Tenenbaum &lt;<br>
&gt; &gt; &gt; <a href="mailto:dtenenba@fhcrc.org">dtenenba@fhcrc.org</a><br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; wrote:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Hello,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; This might sound like an EC2 question that has nothing to do with<br>
&gt; &gt; &gt; starcluster, and in fact I have asked it on some AWS forums<br>
&gt; &gt; &gt; (there&#39;ve been no answers). However, I have never encountered<br>
&gt; &gt; &gt; this<br>
&gt; &gt; &gt; problem before until I started modifying a starcluster AMI, so I<br>
&gt; &gt; &gt; wonder if it is related to what&#39;s on that AMI.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I made a custom AMI based on the starcluster AMI ami-3393a45a<br>
&gt; &gt; &gt; (us-east-1 starcluster-base-ubuntu-13.04-x86_64 (EBS))).<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I installed a bunch of additional software and I also set the<br>
&gt; &gt; &gt; password of the ubuntu user to (let&#39;s say) &#39;foobar&#39;.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; The reason I did that is that I installed a web app that uses<br>
&gt; &gt; &gt; unix<br>
&gt; &gt; &gt; usernames and passwords for authentication. So I needed the<br>
&gt; &gt; &gt; ubuntu<br>
&gt; &gt; &gt; user to have a known password.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I then made a new image based on my running instance. Then I<br>
&gt; &gt; &gt; started<br>
&gt; &gt; &gt; a new instance from that image.<br>
&gt; &gt; &gt; I ssh&#39;d to that instance as the ubuntu user and typed &#39;passwd&#39;. I<br>
&gt; &gt; &gt; was<br>
&gt; &gt; &gt; prompted for my existing password and entered &#39;foobar&#39;. I then<br>
&gt; &gt; &gt; got:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; passwd: Authentication token manipulation error<br>
&gt; &gt; &gt; passwd: password unchanged<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; This tells me that the password for ubuntu is not &#39;foobar&#39;.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Another way to test this is to try &#39;su - ubuntu&#39;. This prompts<br>
&gt; &gt; &gt; for<br>
&gt; &gt; &gt; the password, I enter &#39;foobar&#39; and it says &quot;su: Authentication<br>
&gt; &gt; &gt; failure&quot;.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; So...in a nutshell, when I change the ubuntu password, this<br>
&gt; &gt; &gt; change<br>
&gt; &gt; &gt; does not survive the process of creating a new AMI.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Could this be due to the way the starcluster AMI is configured?<br>
&gt; &gt; &gt; Is<br>
&gt; &gt; &gt; there some script that runs when it boots that re-sets that<br>
&gt; &gt; &gt; password? I&#39;m not passing any user-data when I start the<br>
&gt; &gt; &gt; instance.....(I also tried a crontab @reboot job that changes the<br>
&gt; &gt; &gt; password and that didn&#39;t work either....so maybe whatever is<br>
&gt; &gt; &gt; messing<br>
&gt; &gt; &gt; me up is happening after that job is run).<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Thanks,<br>
&gt; &gt; &gt; Dan<br>
&gt; &gt; &gt; _______________________________________________<br>
&gt; &gt; &gt; StarCluster mailing list<br>
&gt; &gt; &gt; <a href="mailto:StarCluster@mit.edu">StarCluster@mit.edu</a><br>
&gt; &gt; &gt; <a href="http://mailman.mit.edu/mailman/listinfo/starcluster" target="_blank">http://mailman.mit.edu/mailman/listinfo/starcluster</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; StarCluster mailing list<br>
&gt; &gt; <a href="mailto:StarCluster@mit.edu">StarCluster@mit.edu</a><br>
&gt; &gt; <a href="http://mailman.mit.edu/mailman/listinfo/starcluster" target="_blank">http://mailman.mit.edu/mailman/listinfo/starcluster</a><br>
&gt; &gt;<br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br></div></div>