<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Chris Danielson&#039;s Blog &#187; mount</title>
	<atom:link href="http://www.chrisdanielson.com/tag/mount/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chrisdanielson.com</link>
	<description>Trials and Tribulations of a Software Developer</description>
	<lastBuildDate>Wed, 14 Sep 2011 00:00:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Mounting MobileMe iDisk Using WebDav and Linux</title>
		<link>http://www.chrisdanielson.com/2009/08/13/mounting-mobileme-idisk-using-webdav-and-linux/</link>
		<comments>http://www.chrisdanielson.com/2009/08/13/mounting-mobileme-idisk-using-webdav-and-linux/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 15:39:07 +0000</pubDate>
		<dc:creator>Chris Danielson</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[davfs]]></category>
		<category><![CDATA[davfs2]]></category>
		<category><![CDATA[iDisk]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MobileMe]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[WebDav]]></category>

		<guid isPermaLink="false">http://www.chrisdanielson.com/?p=124</guid>
		<description><![CDATA[Anyone have a MobileMe account and wondered if you can access the iDisk from a mount command in your Linux environment? It&#8217;s handy for backing up your data and general file sharing. This simple step by step process will allow you to gain read and write access to your MobileMe user account&#8217;s iDisk drive space. [...]]]></description>
			<content:encoded><![CDATA[<p>Anyone have a MobileMe account and wondered if you can access the iDisk from a mount command in your Linux environment?  It&#8217;s handy for backing up your data and general file sharing.</p>
<p>This simple step by step process will allow you to gain read and write access to your MobileMe user account&#8217;s iDisk drive space.  The first pre-cursor you need to fulfill is that you need the <strong>davfs</strong> (on debian/ubuntu flavors just run: <em>apt-get install davfs2</em>) package installed.</p>
<p>Next we&#8217;re going to create a mount point that will be used as a point of reference for the iDisk drive.</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p124code4'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p1244"><td class="code" id="p124code4"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>idisk</pre></td></tr></table></div>

<p>Using the root user account, modify your /etc/fstab file by adding the following at the bottom.  Just change the {account_name} section below:</p>
<pre>https://idisk.mac.com/{account_name}    /mnt/idisk      davfs   rw,noauto,user  0       0</pre>
<p>Now that you&#8217;ve completed the modification of the mount.  Let&#8217;s run a test.</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p124code5'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p1245"><td class="code" id="p124code5"><pre class="bash" style="font-family:monospace;">mydev:<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #666666; font-style: italic;"># mount /mnt/idisk</span>
&nbsp;
Please enter the username to authenticate with server
  https:<span style="color: #000000; font-weight: bold;">//</span>idisk.mac.com<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>acccount_name<span style="color: #7a0874; font-weight: bold;">&#125;</span>
or hit enter <span style="color: #000000; font-weight: bold;">for</span> none.
Username: <span style="color: #7a0874; font-weight: bold;">&#123;</span>acccount_name<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
Please enter the password to authenticate <span style="color: #7a0874; font-weight: bold;">&#123;</span>acccount_name<span style="color: #7a0874; font-weight: bold;">&#125;</span> with server
  https:<span style="color: #000000; font-weight: bold;">//</span>idisk.me.com<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>acccount_name<span style="color: #7a0874; font-weight: bold;">&#125;</span>
or hit enter <span style="color: #000000; font-weight: bold;">for</span> none.
Password:
mydev:<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #666666; font-style: italic;"># ls -al /mnt/idisk</span>
total <span style="color: #000000;">11</span>
drwxr-xr-x <span style="color: #000000;">15</span> root root  <span style="color: #000000;">256</span> <span style="color: #000000;">2009</span>-08-<span style="color: #000000;">13</span> 08:<span style="color: #000000;">11</span> .
drwxr-xr-x  <span style="color: #000000;">4</span> root root <span style="color: #000000;">4096</span> <span style="color: #000000;">2009</span>-08-<span style="color: #000000;">13</span> 07:<span style="color: #000000;">59</span> ..
drwxr-xr-x  <span style="color: #000000;">2</span> root root   <span style="color: #000000;">68</span> <span style="color: #000000;">2009</span>-06-<span style="color: #000000;">16</span> <span style="color: #000000;">14</span>:<span style="color: #000000;">33</span> Backup
drwxr-xr-x  <span style="color: #000000;">2</span> root root   <span style="color: #000000;">36</span> <span style="color: #000000;">2009</span>-06-<span style="color: #000000;">16</span> <span style="color: #000000;">14</span>:<span style="color: #000000;">33</span> Documents
drwxr-xr-x  <span style="color: #000000;">2</span> root root   <span style="color: #000000;">68</span> <span style="color: #000000;">2009</span>-06-<span style="color: #000000;">17</span> 07:<span style="color: #000000;">14</span> Groups
drwxr-xr-x  <span style="color: #000000;">5</span> root root  <span style="color: #000000;">132</span> <span style="color: #000000;">2009</span>-07-02 09:<span style="color: #000000;">11</span> iPhone Development
drwxr-xr-x  <span style="color: #000000;">5</span> root root  <span style="color: #000000;">100</span> <span style="color: #000000;">2009</span>-06-<span style="color: #000000;">17</span> 07:<span style="color: #000000;">48</span> Library
drwx------  <span style="color: #000000;">2</span> root root   <span style="color: #000000;">36</span> <span style="color: #000000;">2009</span>-08-<span style="color: #000000;">13</span> 08:<span style="color: #000000;">11</span> lost+found
drwxr-xr-x  <span style="color: #000000;">2</span> root root   <span style="color: #000000;">36</span> <span style="color: #000000;">2009</span>-06-<span style="color: #000000;">16</span> <span style="color: #000000;">14</span>:<span style="color: #000000;">33</span> Movies
drwxr-xr-x  <span style="color: #000000;">2</span> root root   <span style="color: #000000;">36</span> <span style="color: #000000;">2009</span>-06-<span style="color: #000000;">16</span> <span style="color: #000000;">14</span>:<span style="color: #000000;">33</span> Music
drwxr-xr-x  <span style="color: #000000;">2</span> root root   <span style="color: #000000;">36</span> <span style="color: #000000;">2009</span>-06-<span style="color: #000000;">16</span> <span style="color: #000000;">14</span>:<span style="color: #000000;">33</span> Pictures
drwxr-xr-x  <span style="color: #000000;">2</span> root root   <span style="color: #000000;">36</span> <span style="color: #000000;">2009</span>-06-<span style="color: #000000;">17</span> 07:<span style="color: #000000;">49</span> Public
drwxr-xr-x  <span style="color: #000000;">2</span> root root   <span style="color: #000000;">36</span> <span style="color: #000000;">2009</span>-06-<span style="color: #000000;">16</span> <span style="color: #000000;">14</span>:<span style="color: #000000;">33</span> Sites
drwxr-xr-x  <span style="color: #000000;">3</span> root root   <span style="color: #000000;">88</span> <span style="color: #000000;">2008</span>-07-<span style="color: #000000;">10</span> 01:<span style="color: #000000;">11</span> Software
drwxr-xr-x  <span style="color: #000000;">3</span> root root   <span style="color: #000000;">52</span> <span style="color: #000000;">2009</span>-06-<span style="color: #000000;">17</span> 07:<span style="color: #000000;">53</span> Web</pre></td></tr></table></div>

<p>That&#8217;s great isn&#8217;t it?  Now the only trouble is it keeps on prompting you for your username and password.  In my situation I want this automated.  Luckily for us, davfs has a mechanism built into it for managing this.  It&#8217;s located in the /etc/davfs2/secrets file.  So as the root user run the following commands.</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p124code6'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p1246"><td class="code" id="p124code6"><pre class="bash" style="font-family:monospace;">mydev:<span style="color: #000000; font-weight: bold;">/</span><span style="color: #666666; font-style: italic;"># umount /mnt/idisk</span>
mydev:<span style="color: #000000; font-weight: bold;">/</span><span style="color: #666666; font-style: italic;"># echo &quot;https://idisk.mac.com/{account_name}   {account_name}   {account_password}&quot; &gt;&gt; /etc/davfs2/secrets</span>
mydev:<span style="color: #000000; font-weight: bold;">/</span><span style="color: #666666; font-style: italic;"># mount /mnt/idisk</span>
mydev:<span style="color: #000000; font-weight: bold;">/</span><span style="color: #666666; font-style: italic;"># ls -al /mnt/idisk</span>
total <span style="color: #000000;">11</span>
drwxr-xr-x <span style="color: #000000;">15</span> root root  <span style="color: #000000;">256</span> <span style="color: #000000;">2009</span>-08-<span style="color: #000000;">13</span> 08:<span style="color: #000000;">11</span> .
drwxr-xr-x  <span style="color: #000000;">4</span> root root <span style="color: #000000;">4096</span> <span style="color: #000000;">2009</span>-08-<span style="color: #000000;">13</span> 07:<span style="color: #000000;">59</span> ..
drwxr-xr-x  <span style="color: #000000;">2</span> root root   <span style="color: #000000;">68</span> <span style="color: #000000;">2009</span>-06-<span style="color: #000000;">16</span> <span style="color: #000000;">14</span>:<span style="color: #000000;">33</span> Backup
drwxr-xr-x  <span style="color: #000000;">2</span> root root   <span style="color: #000000;">36</span> <span style="color: #000000;">2009</span>-06-<span style="color: #000000;">16</span> <span style="color: #000000;">14</span>:<span style="color: #000000;">33</span> Documents
drwxr-xr-x  <span style="color: #000000;">2</span> root root   <span style="color: #000000;">68</span> <span style="color: #000000;">2009</span>-06-<span style="color: #000000;">17</span> 07:<span style="color: #000000;">14</span> Groups
drwxr-xr-x  <span style="color: #000000;">5</span> root root  <span style="color: #000000;">132</span> <span style="color: #000000;">2009</span>-07-02 09:<span style="color: #000000;">11</span> iPhone Development
drwxr-xr-x  <span style="color: #000000;">5</span> root root  <span style="color: #000000;">100</span> <span style="color: #000000;">2009</span>-06-<span style="color: #000000;">17</span> 07:<span style="color: #000000;">48</span> Library
drwx------  <span style="color: #000000;">2</span> root root   <span style="color: #000000;">36</span> <span style="color: #000000;">2009</span>-08-<span style="color: #000000;">13</span> 08:<span style="color: #000000;">11</span> lost+found
drwxr-xr-x  <span style="color: #000000;">2</span> root root   <span style="color: #000000;">36</span> <span style="color: #000000;">2009</span>-06-<span style="color: #000000;">16</span> <span style="color: #000000;">14</span>:<span style="color: #000000;">33</span> Movies
drwxr-xr-x  <span style="color: #000000;">2</span> root root   <span style="color: #000000;">36</span> <span style="color: #000000;">2009</span>-06-<span style="color: #000000;">16</span> <span style="color: #000000;">14</span>:<span style="color: #000000;">33</span> Music
drwxr-xr-x  <span style="color: #000000;">2</span> root root   <span style="color: #000000;">36</span> <span style="color: #000000;">2009</span>-06-<span style="color: #000000;">16</span> <span style="color: #000000;">14</span>:<span style="color: #000000;">33</span> Pictures
drwxr-xr-x  <span style="color: #000000;">2</span> root root   <span style="color: #000000;">36</span> <span style="color: #000000;">2009</span>-06-<span style="color: #000000;">17</span> 07:<span style="color: #000000;">49</span> Public
drwxr-xr-x  <span style="color: #000000;">2</span> root root   <span style="color: #000000;">36</span> <span style="color: #000000;">2009</span>-06-<span style="color: #000000;">16</span> <span style="color: #000000;">14</span>:<span style="color: #000000;">33</span> Sites
drwxr-xr-x  <span style="color: #000000;">3</span> root root   <span style="color: #000000;">88</span> <span style="color: #000000;">2008</span>-07-<span style="color: #000000;">10</span> 01:<span style="color: #000000;">11</span> Software
drwxr-xr-x  <span style="color: #000000;">3</span> root root   <span style="color: #000000;">52</span> <span style="color: #000000;">2009</span>-06-<span style="color: #000000;">17</span> 07:<span style="color: #000000;">53</span> Web
mydev:<span style="color: #000000; font-weight: bold;">/</span><span style="color: #666666; font-style: italic;"># umount /mnt/idisk</span></pre></td></tr></table></div>

<p>And that is it!  No more prompting for the username and password.  Pretty simple implementation and we&#8217;re off to the races.</p>
<p>EDIT NOTES: Thanks DaveDaveDave for the comment, I changed the <em>https://idisk.me.com</em> to the new and functional <em>https://idisk.mac.com </em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisdanielson.com/2009/08/13/mounting-mobileme-idisk-using-webdav-and-linux/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
	</channel>
</rss>

