<?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>gHacks Technology News &#124; Latest Tech News, Software And Tutorials &#187; samba shares</title> <atom:link href="http://www.ghacks.net/tag/samba-shares/feed/" rel="self" type="application/rss+xml" /><link>http://www.ghacks.net</link> <description>A technology news blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description> <lastBuildDate>Sat, 11 Feb 2012 17:32:23 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/> <item><title>Configure Samba shares in CentOS</title><link>http://www.ghacks.net/2010/12/13/configure-samba-shares-in-centos/</link> <comments>http://www.ghacks.net/2010/12/13/configure-samba-shares-in-centos/#comments</comments> <pubDate>Sun, 12 Dec 2010 23:13:01 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Desktop Manager]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Networks]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Operating Systems]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[CentOS]]></category> <category><![CDATA[samba]]></category> <category><![CDATA[samba shares]]></category> <category><![CDATA[Windows Shares]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=37893</guid> <description><![CDATA[Server OSes, such as CentOS, Red Hat Enterprise Linux, and SUSE Linux Enterprise do not enjoy the same simplicity as does the modern Linux desktop when it comes to issues like sharing out directories (even though they share the same default desktops). You can see how easy it is to share out folders in my [...]]]></description> <content:encoded><![CDATA[<p>Server OSes, such as CentOS, Red Hat Enterprise Linux, and SUSE Linux Enterprise do not enjoy the same simplicity as does the modern Linux desktop when it comes to issues like sharing out directories (even though they share the same default desktops). You can see how easy it is to share out folders in my article &#8220;<a
title="Easy folder sharing in GNOME" href="http://www.ghacks.net/2010/02/23/easy-folder-sharing-in-gnome/" target="_blank">Easy folder sharing in GNOME</a>&#8220;.</p><p>The server OSes justifiably make this task a bit more challenging to keep administrators from inadvertently sharing out folders that shouldn&#8217;t be shared or causing security holes to pop up on their servers. But that does not mean the task is impossible&#8230;in fact it&#8217;s not that much more difficult than it is on their brethren desktop. Let&#8217;s take a look at how this is done on CentOS.</p><p><span
id="more-37893"></span><strong>The tool</strong></p><div
id="attachment_37896" class="wp-caption alignleft" style="width: 340px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/12/system_config_samba.png"><img
class="size-medium wp-image-37896 " src="http://www.ghacks.net/wp-content/uploads/2010/12/system_config_samba-550x386.png" alt="" width="330" height="232" /></a><p
class="wp-caption-text">Figure 1</p></div><p>Fortunately, there is a GUI tool for just about everything. This too goes for configuring Samba. In the CentOS distribution, the task of administering Samba shares is handled by <em>system-config-samba</em>. This tool is easy to use, but must be run as the root user. If you do not have access to the root user, you will have no luck starting the tool. But with that coveted root user password you can start up the Samba admin tool with the command <em>system-config-samba</em>.</p><p>Once the tool has started you will find a very user-friendly GUI (see Figure 1). By default nothing has been shared out&#8230;and before you do share anything, you will need to configure Samba. To do this click <strong>Preferences &gt; Server Settings</strong>. This new window has two tabs:</p><ul><li>Basic: Configure the name of your workgroup and a description of said workgroup.</li><li>Security: Configure the security of your Samba server.</li></ul><p>NOTE: The more important tab is the security tab. Here  you will configure the authentication mode.</p><div
id="attachment_37897" class="wp-caption alignright" style="width: 368px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/12/samba_users.png"><img
class="size-full wp-image-37897" src="http://www.ghacks.net/wp-content/uploads/2010/12/samba_users.png" alt="" width="358" height="237" /></a><p
class="wp-caption-text">Figure 2</p></div><p>Once you have the server configured click on <strong>Preferences &gt; Users</strong>. You must add users here before anyone can authenticate (if you select Security = users). Figure 2 shows how users are added. Make sure you select the correct Unix username from the dropdown. After you add that username click OK to be returned to the original window.</p><p>You are now ready to connect to your newly added share. You might, however find that you can not connect to that share. If so, the most likely reason is the firewall. Click on <strong>System &gt; Administration &gt; Security Level and Firewall</strong>. In this window (see Figure 3) you will need to make sure that Samba is checked, but also add ports 137 – 139 and 445.</p><div
id="attachment_37898" class="wp-caption alignleft" style="width: 237px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/12/samba_firewall.png"><img
class="size-full wp-image-37898 " src="http://www.ghacks.net/wp-content/uploads/2010/12/samba_firewall.png" alt="" width="227" height="287" /></a><p
class="wp-caption-text">Figure 3</p></div><p>After you have added all the necessary ports you should be able to connect to that share without a problem. Although you may be tempted to drop your firewall all together (in order to let Samba connections through) it is imperative that you do not simply drop your firewall. Remember, CentOS is a server OS and should be protected.</p><p><strong>Final thoughts</strong></p><p>It&#8217;s nice to see that even on the server distributions that Samba has become an incredibly easy system to administer. The system-config-samba tool makes sharing out server directories as easy as if you were on the desktop. Kudos to CentOS, Red Hat, and GNOME!</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/12/13/configure-samba-shares-in-centos/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Connect to your Samba server from Linux</title><link>http://www.ghacks.net/2009/11/04/connect-to-your-samba-server-from-linux/</link> <comments>http://www.ghacks.net/2009/11/04/connect-to-your-samba-server-from-linux/#comments</comments> <pubDate>Tue, 03 Nov 2009 23:03:42 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Advanced]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[GNOME]]></category> <category><![CDATA[samba]]></category> <category><![CDATA[samba shares]]></category> <category><![CDATA[smb.conf]]></category> <category><![CDATA[smbclient]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=18072</guid> <description><![CDATA[I have written a few articles on Samba here on Ghacks. And most people know how to connect to Samba shares via Windows. Generally speaking (when all is set up correctly) it&#8217;s just a matter of opening up Explorer and entering \\ADDRESS_OF_SAMBA_SERVER\SHARENAME to get to your Samba shares. But what about in Linux? How do [...]]]></description> <content:encoded><![CDATA[<p>I have written a few articles on Samba here on Ghacks. And most people know how to connect to Samba shares via Windows. Generally speaking (when all is set up correctly) it&#8217;s just a matter of opening up Explorer and entering \\ADDRESS_OF_SAMBA_SERVER\SHARENAME to get to your Samba shares. But what about in Linux? How do you go about connecting to Samba shares with the same operating system that is running the Samba server?</p><p>One would think that an easy task. It actually is, once you know how it is done.  And in this article I am going to show you two different ways of making the connection to your Samba server. You will need to have a working knowledge of how the Samba server is set up as well as a username/password configured on the Samba server. There are also a few steps to take on the desktop for one certain method of connection.</p><p>The two methods I will describe are: Using GNOME&#8217;s Connect To Server dialog and the command line. The latter will be used to show you how to set up auto mounting for Samba.</p><p><span
id="more-18072"></span></p><p><strong>The graphical method</strong></p><div
id="attachment_18074" class="wp-caption alignleft" style="width: 190px"><a
rel="attachment wp-att-18074" href="http://www.ghacks.net/2009/11/04/connect-to-your-samba-server-from-linux/connect_to_server/"><img
class="size-thumbnail wp-image-18074 " src="http://www.ghacks.net/wp-content/uploads/2009/11/connect_to_server-300x300.png" alt="Figure 1" width="180" height="180" /></a><p
class="wp-caption-text">Figure 1</p></div><p>If you take a look at the GNOME Places menu you will see an entry labeled &#8220;Connect to server&#8230;&#8221;. This is what you want to use in order to connect to your Samba server. When you click on that a new window will open. From the Service type drop-down select &#8220;Windows share&#8221; (see Figure 1).</p><p>When you select that entry some of the configuration options will change. As you can see (in Figure 1), I have entered the necessary options to connect to a Samba server on my internal network. You will want to replace the information so it reflects your needs. The only tricky bit of information might be the Folder entry. If you are connecting to the root directory on the share you will not need to enter anything there. Say, for instance, you share is <strong>/media/samba/user<em>. </em><span
style="font-weight: normal">If you want to connect to that directory leave the Folder entry blank. Say, however, you want to connect directly to a sub-folder within that share &#8211; you can enter that folder here. This, of course, isn&#8217;t needed because you can always traverse the sub-directories with simple navigation. <span
style="background-color: #ffffff"><strong><span
style="font-weight: normal">You can also choose to add a bookmark instantly, from in this window. </span></strong></span></span></strong></p><p><strong><span
style="font-weight: normal"><span
style="background-color: #ffffff"><strong><span
style="font-weight: normal"> </span></strong></span></span></strong></p><p><strong><strong> </strong></strong></p><p><strong><strong> </strong></strong></p><div
id="attachment_18075" class="wp-caption alignright" style="width: 190px"><a
rel="attachment wp-att-18075" href="http://www.ghacks.net/2009/11/04/connect-to-your-samba-server-from-linux/connect_to_server_password/"><img
class="size-thumbnail wp-image-18075 " src="http://www.ghacks.net/wp-content/uploads/2009/11/connect_to_server_password-300x300.png" alt="Figure 2" width="180" height="180" /></a><p
class="wp-caption-text">Figure 2</p></div><p>Once you have all of the information entered click Connect and you will be greeted with a new window that requires you to enter a password. Also, if you do not supply a Domain name in the previous window, you will be required to enter it here.</p><p>You can also set this up to remember your password either until you logout or until, well, forever. Once you have entered the password/domain click the Connect button and a new Nautilus window will open inside of your Samba Share.</p><p><strong>Using the command line</strong></p><p>Now we&#8217;re going to use the command line to accomplish a similar goal. The biggest difference is that we are going to actually mount the Samba share into another directory, very much the same way we would mount a second hard drive.</p><p>There are a few pieces to put together before we actually take care of the mounting. First let&#8217;s create a directory that the Samba share will be mounted to. So from the terminal window issue the following command:</p><p><em>sudo mkdir /media/samba</em></p><p>Now let&#8217;s make sure our users can read/write to this directory with the command:</p><p><em>sudo chmod -R u+rw /media/samba</em></p><p>Okay now let&#8217;s make sure we can see the Samba shares from the command line. We&#8217;ll do that with the <em>smbclient </em>command like so:</p><p><em>smbclient -L //SAMBA_SERVER_ADDRESS</em></p><p>Where <em>SAMBA_SERVER_ADDRESS</em> is the actual IP address of the Samba server.</p><div
id="attachment_18089" class="wp-caption alignleft" style="width: 190px"><a
rel="attachment wp-att-18089" href="http://www.ghacks.net/2009/11/04/connect-to-your-samba-server-from-linux/smbclient/"><img
class="size-thumbnail wp-image-18089 " src="http://www.ghacks.net/wp-content/uploads/2009/11/smbclient-300x300.png" alt="Figure 3" width="180" height="180" /></a><p
class="wp-caption-text">Figure 3</p></div><p>You will be prompted for your username and password. If you get an error it could be that the usernames don&#8217;t match on each end. If that&#8217;s the case you could add the <em>-U </em>switch to the command like so:</p><p><em>smbclient &#8211;user=jlwallen -L  //SAMBA_SERVER_ADDRESS</em></p><p>You should see output similar to that shown in Figure 3.</p><p>Now it&#8217;s time to try to mount the Samba share to the <strong>/media/samba</strong> directory. To do this issue the command:</p><p><em>sudo mount -t cifs //SAMBA_SERVER_ADDRESS/SHARE -o username=USERNAME /media/samba/</em></p><p>Where:</p><ul><li><span
style="background-color: #ffffff">SAMBA_SERVER_ADDRESS is the IP address of the Samba server.</span></li><li><span
style="background-color: #ffffff">SHARE is the share name.</span></li><li><span
style="background-color: #ffffff">USERNAME is the username to connect with.</span></li></ul><p>If that works you can now make this an automated mount by adding the following line to your <strong>/etc/fstab</strong> file:</p><p><code>//SAMBA_SERVER_ADDRESS/SHARE     /media/samba    cifs  credentials=/etc/samba/user.cred 0 0 </code></p><p>Where SAMBA_SERVER_ADDRESS is the IP address of the Samba server and SHARE is the share name.</p><p>Notice the user.cred file. This is one last thing we need to create. With your text editor create this file and place into it:</p><p><em>username=USER</em></p><p><em>password=PASSWORD</em></p><p>Where USER is the username to log in with and PASSWORD is the password to use for authentication. The final step is the give this new file the proper permissions with the command:</p><p>sudo chmod 600 /etc/samba/user.cred</p><p>You can ensure this works by issuing the command <em>mount -a</em> which should mount your Samba share.</p><p><strong>Final thoughts</strong></p><p>You should now have an auto-mounting Samba share &#8211; or the ability to easily connect your GNOME desktop to a Samba share. Samba is a very powerful tool that not only can share files with Windows machines, but with Linux machines as well.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/11/04/connect-to-your-samba-server-from-linux/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> </channel> </rss>
