<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Auto mounting a Samba share in Linux</title>
	<atom:link href="http://www.ghacks.net/2009/04/19/auto-mounting-a-samba-share-in-linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ghacks.net/2009/04/19/auto-mounting-a-samba-share-in-linux/</link>
	<description>A technology blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description>
	<lastBuildDate>Mon, 23 Nov 2009 23:06:45 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Thomas</title>
		<link>http://www.ghacks.net/2009/04/19/auto-mounting-a-samba-share-in-linux/#comment-853976</link>
		<dc:creator>Thomas</dc:creator>
		<pubDate>Fri, 17 Jul 2009 08:37:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.ghacks.net/2009/04/19/auto-mounting-a-samba-share-in-linux/#comment-853976</guid>
		<description>can the value in

password=value 

by encrypted instead of plain text? Thanks.</description>
		<content:encoded><![CDATA[<p>can the value in</p>
<p>password=value </p>
<p>by encrypted instead of plain text? Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: furicle</title>
		<link>http://www.ghacks.net/2009/04/19/auto-mounting-a-samba-share-in-linux/#comment-735522</link>
		<dc:creator>furicle</dc:creator>
		<pubDate>Mon, 20 Apr 2009 15:15:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.ghacks.net/2009/04/19/auto-mounting-a-samba-share-in-linux/#comment-735522</guid>
		<description>You might want to mention that you can put the username and password information in a file, and put that file in /root or somewhere similar.  That way your username and password isn&#039;t out in the open for all to see.

Just make it //IP_TO_SAMBA_SERVER/SAMBA_SHARE /data cifs credentials=/root/.smbpasswords 0 0

From the man page

credentials=filename
              specifies a file that contains a username and/or  password.  The
              format of the file is:

                        username=value
                        password=value
              This is preferred over having passwords in plaintext in a shared
              file, such as /etc/fstab. Be sure  to  protect  any  credentials
              file properly.</description>
		<content:encoded><![CDATA[<p>You might want to mention that you can put the username and password information in a file, and put that file in /root or somewhere similar.  That way your username and password isn&#8217;t out in the open for all to see.</p>
<p>Just make it //IP_TO_SAMBA_SERVER/SAMBA_SHARE /data cifs credentials=/root/.smbpasswords 0 0</p>
<p>From the man page</p>
<p>credentials=filename<br />
              specifies a file that contains a username and/or  password.  The<br />
              format of the file is:</p>
<p>                        username=value<br />
                        password=value<br />
              This is preferred over having passwords in plaintext in a shared<br />
              file, such as /etc/fstab. Be sure  to  protect  any  credentials<br />
              file properly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Olli</title>
		<link>http://www.ghacks.net/2009/04/19/auto-mounting-a-samba-share-in-linux/#comment-735379</link>
		<dc:creator>Olli</dc:creator>
		<pubDate>Mon, 20 Apr 2009 12:43:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.ghacks.net/2009/04/19/auto-mounting-a-samba-share-in-linux/#comment-735379</guid>
		<description>And I&#039;d also suggest not putting the username/password details in the fstab file. On many systems this file is world readable and could expose unnecessary information about your network.

I usually work with credential files. These are plain text files containing username and password for that particular share. I usually store them in the /etc/samba directory named like SAMBA_SHARE_credentials.

So the steps would be (as root or with sudo):

touch /etc/samba/SAMBA_SHARE_credentials
chown root.root /etc/samba/SAMBA_SHARE_credentials
chmod 600 /etc/samba/SAMBA_SHARE_credentials

Edited this file with your favourite editor and add two lines with your the username/password combination for that share:
username=SHARE_USERNAME
password=SHARE_PASSWORD

If you use password with spaces make sure you put your password between quotes like
password=&quot;MY PASSWORD&quot;

Save the file and add a fstab entry like this:

//IP_TO_SAMBA_SERVER/SAMBA_SHARE /data cifs credentials=/etc/samba/SAMBA_SHARE_credentials, 0 0</description>
		<content:encoded><![CDATA[<p>And I&#8217;d also suggest not putting the username/password details in the fstab file. On many systems this file is world readable and could expose unnecessary information about your network.</p>
<p>I usually work with credential files. These are plain text files containing username and password for that particular share. I usually store them in the /etc/samba directory named like SAMBA_SHARE_credentials.</p>
<p>So the steps would be (as root or with sudo):</p>
<p>touch /etc/samba/SAMBA_SHARE_credentials<br />
chown root.root /etc/samba/SAMBA_SHARE_credentials<br />
chmod 600 /etc/samba/SAMBA_SHARE_credentials</p>
<p>Edited this file with your favourite editor and add two lines with your the username/password combination for that share:<br />
username=SHARE_USERNAME<br />
password=SHARE_PASSWORD</p>
<p>If you use password with spaces make sure you put your password between quotes like<br />
password=&#8221;MY PASSWORD&#8221;</p>
<p>Save the file and add a fstab entry like this:</p>
<p>//IP_TO_SAMBA_SERVER/SAMBA_SHARE /data cifs credentials=/etc/samba/SAMBA_SHARE_credentials, 0 0</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jack</title>
		<link>http://www.ghacks.net/2009/04/19/auto-mounting-a-samba-share-in-linux/#comment-735347</link>
		<dc:creator>jack</dc:creator>
		<pubDate>Mon, 20 Apr 2009 12:02:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.ghacks.net/2009/04/19/auto-mounting-a-samba-share-in-linux/#comment-735347</guid>
		<description>Olli: You are correct. Out of many years of habit I seem to still default to old tricks. In the /etc/fstab you can edit the entry to look like this:

//IP_TO_SAMBA_SERVER/SAMBA_SHARE  /data cifs username=USERNAME,password=PASSWORD, 0 0</description>
		<content:encoded><![CDATA[<p>Olli: You are correct. Out of many years of habit I seem to still default to old tricks. In the /etc/fstab you can edit the entry to look like this:</p>
<p>//IP_TO_SAMBA_SERVER/SAMBA_SHARE  /data cifs username=USERNAME,password=PASSWORD, 0 0</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Olli</title>
		<link>http://www.ghacks.net/2009/04/19/auto-mounting-a-samba-share-in-linux/#comment-735339</link>
		<dc:creator>Olli</dc:creator>
		<pubDate>Mon, 20 Apr 2009 11:53:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.ghacks.net/2009/04/19/auto-mounting-a-samba-share-in-linux/#comment-735339</guid>
		<description>Hi Jack, I think smbfs is deprecated for a while now, although still in the kernel, the preferred way is to use cifs, which is maintained unlike smbfs, much more stable and probably even faster. smbfs has been tagged for removal since 2.6.17 (I think, could be wrong though).

It doesn&#039;t change much about the way you mount it, but replace the parts it mentions smbfs with cifs and it&#039;ll work.</description>
		<content:encoded><![CDATA[<p>Hi Jack, I think smbfs is deprecated for a while now, although still in the kernel, the preferred way is to use cifs, which is maintained unlike smbfs, much more stable and probably even faster. smbfs has been tagged for removal since 2.6.17 (I think, could be wrong though).</p>
<p>It doesn&#8217;t change much about the way you mount it, but replace the parts it mentions smbfs with cifs and it&#8217;ll work.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
