<?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</title> <atom:link href="http://www.ghacks.net/tag/samba/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>Fri, 10 Feb 2012 16:53:42 +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>Adding folder sharing in Bodhi Linux</title><link>http://www.ghacks.net/2011/03/24/adding-folder-sharing-in-bodhi-linux/</link> <comments>http://www.ghacks.net/2011/03/24/adding-folder-sharing-in-bodhi-linux/#comments</comments> <pubDate>Thu, 24 Mar 2011 17:45:04 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Networks]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[Bodhi]]></category> <category><![CDATA[file manager]]></category> <category><![CDATA[folder share]]></category> <category><![CDATA[nautilus]]></category> <category><![CDATA[samba]]></category> <category><![CDATA[shares]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=43024</guid> <description><![CDATA[If you are a fan of modern Linux distributions, such as Ubuntu, that offer incredibly simple ways to share folders with workgroup computers, you will be happy to know the same feature can be added to Bodhi Linux (my new favorite Linux distribution.) Although adding this feature isn&#8217;t exactly automatic (or, some would argue, user-friendly), [...]]]></description> <content:encoded><![CDATA[<p>If you are a fan of modern Linux distributions, such as Ubuntu, that offer incredibly simple ways to share folders with workgroup computers, you will be happy to know the same feature can be added to Bodhi Linux (my new favorite Linux distribution.)</p><p>Although adding this feature isn&#8217;t exactly automatic (or, some would argue, user-friendly), it&#8217;s all just a matter of knowing what to look for. So here I am to explain to you how to add this feature and then how to share out those folders.</p><p><span
id="more-43024"></span>Bodhi Linux comes with a stripped down version of the Nautilus file manager. I have it on authority that Bodhi might be switching to PCManFM (I am hoping the sharing functionality will be either built in or available at that point, but at this point it is not a feature that is available.)</p><p><strong>Installation</strong></p><p>The easiest way to install everything you need for this feature is to follow these steps:</p><ol><li>Open up Synaptic.</li><li>Search for &#8220;nautilus&#8221; (no quotes).</li><li>Mark nautilus-share for installation.</li><li>OK the dependencies necessary.</li><li>Search for &#8220;samba&#8221; (no quotes).</li><li>Mark samba for installation.</li><li>OK the dependencies necessary.</li><li>Click Apply.</li><li>Click Apply in the new window.</li><li>Allow the installation to complete.</li></ol><p>Once the installation is complete, you will have to log out and log back in so the changes will take effect. If this were the full version of Nautilus, you could issue the command <em>nautilus -q </em>and the changes would automatically take effect. That command will only produce an error in this stripped-down version of Nautilus. So go through the process of logging out and logging back in.</p><p><strong>Enable Sharing</strong></p><div
id="attachment_43027" class="wp-caption alignleft" style="width: 340px"><a
href="http://www.ghacks.net/wp-content/uploads/2011/03/bodhi_share.png"><img
class="size-medium wp-image-43027 " src="http://www.ghacks.net/wp-content/uploads/2011/03/bodhi_share-550x388.png" alt="" width="330" height="233" /></a><p
class="wp-caption-text">Figure 1</p></div><p>At this point, everything should be exactly as you would expect. Fire up Nautilus (left-click the desktop to open the mouse menu and click Places &gt; Home) to start the process of sharing folders.</p><p>Once Nautilus is open, right-click the folder you want to share and then select Sharing Options (see Figure 1). In the new window check off the Share Folder option. You can now configure any options you may want to add to the folder (such as Share Name, Comment, Allow others to create/delete, and Guest access). After you OK this you will be prompted to have the proper permissions assigned automatically &#8211; allow this to happen (otherwise you are going to have a hard time assigning permissions to that shared folder).</p><div
id="attachment_43028" class="wp-caption alignright" style="width: 340px"><a
href="http://www.ghacks.net/wp-content/uploads/2011/03/bodhi_nautilus_icons.png"><img
class="size-medium wp-image-43028 " src="http://www.ghacks.net/wp-content/uploads/2011/03/bodhi_nautilus_icons-550x387.png" alt="" width="330" height="232" /></a><p
class="wp-caption-text">Figure 2</p></div><p>When the folder is shared out, it will be indicated with a different icon. As you can see, in Figure 2, the Music folder has been shared out and is denoted with the addition of a hand in the icon.</p><p>You should now be able to hit that shared out folder from any machine on your network that is able to hit shared folders.</p><p><strong>Final thoughts</strong></p><p>I am thrilled to see that Bodhi Linux is following in at least some of the footsteps of Ubuntu and making features like folder sharing available (and easily set up.) I do hope that when Bodhi makes the move to a new file manager, that the sharing of folders is included in the feature list.</p><p>&nbsp;</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2011/03/24/adding-folder-sharing-in-bodhi-linux/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Allow Samba through your Linux firewall with ufw</title><link>http://www.ghacks.net/2010/12/29/allow-samba-through-your-linux-firewall-with-ufw/</link> <comments>http://www.ghacks.net/2010/12/29/allow-samba-through-your-linux-firewall-with-ufw/#comments</comments> <pubDate>Wed, 29 Dec 2010 17:06:25 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Networks]]></category> <category><![CDATA[Online Services]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[firewal]]></category> <category><![CDATA[gufw]]></category> <category><![CDATA[iptables]]></category> <category><![CDATA[linux firewall]]></category> <category><![CDATA[samba]]></category> <category><![CDATA[sudo]]></category> <category><![CDATA[ufw]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=38496</guid> <description><![CDATA[As most of you know, Samba allows your Linux machine to work with Windows machines (and vice versa). Without Samba Linux would be locked in an unable to play nicely onÂ heterogeneousÂ networks. So what most Linux users do is install Samba to allow file/folder sharing and network browsing. Typically speaking, Samba is very easy to install [...]]]></description> <content:encoded><![CDATA[<p>As most of you know, Samba allows your Linux machine to work with Windows machines (and vice versa). Without Samba Linux would be locked in an unable to play nicely onÂ heterogeneousÂ networks. So what most Linux users do is install Samba to allow file/folder sharing and network browsing. Typically speaking, Samba is very easy to install and work with. But when problems arise Samba can be a nightmare to troubleshoot. One of the first steps in your troubleshooting should always be your firewall as this is very often the problem. What do you do if your firewall isn&#8217;t allowing Samba through? You tell your firewall to allow Samba to pass. Let&#8217;s see how this is done.</p><p><span
id="more-38496"></span>I want to show you how this is done in two different ways: Using a typical firewall GUI and the ufw command line. For the GUI I am going to illustrate this with GUFW (GNOME frontend for UFW). Naturally, each GUI firewall tool will deal with this process differently, but understanding the fundamentals of what you&#8217;re looking for should give you enough information about how exactly to manage the task with the firewall tool you use.</p><p><strong>ufw</strong></p><div
id="attachment_38502" class="wp-caption alignleft" style="width: 340px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/12/iptables.png"><img
class="size-medium wp-image-38502 " src="http://www.ghacks.net/wp-content/uploads/2010/12/iptables-550x379.png" alt="" width="330" height="227" /></a><p
class="wp-caption-text">Figure 1</p></div><p>Let&#8217;s start with the more challenging task first. I will assume you know some of the basics. What we will be doing is allowing the necessary Samba ports through with the help of the UFW command line. Let&#8217;s first check to make sure your firewall is enabled. To do this issue the command:</p><p><code>sudo iptables -L</code></p><p>When you issue the above command you should see output similar to what you see in Figure 1. If you see nothing, that means your firewall isn&#8217;t enabled.</p><p>Now, let&#8217;s add the rules to allow Samba to pass through your firewall. I am going to illustrate this using the 192.168.1.0 IP address scheme. You can adjust this to fit your needs. The commands you need to run, to open up the necessary ports are:</p><p><code>sudo ufw allow proto udp to any port 137 from 192.168.1.0/24<br
/> sudo ufw allow proto udp to any port 138 from 192.168.1.0/24<br
/> sudo ufw allow proto tcp to any port 139 from 192.168.1.0/24<br
/> sudo ufw allow proto tcp to any port 445 from 192.168.1.0/24</code></p><p>You will issue the above commands one at a time.</p><p><strong>GUFW</strong></p><div
id="attachment_38503" class="wp-caption alignright" style="width: 218px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/12/gufw_1.png"><img
class="size-full wp-image-38503 " src="http://www.ghacks.net/wp-content/uploads/2010/12/gufw_1.png" alt="" width="208" height="222" /></a><p
class="wp-caption-text">Figure 2</p></div><p>Now let&#8217;s take a look at allowing Samba through your firewall using the UFW front-end, GUFW. Â You can start the GUFW tool by clicking <strong>System &gt; Administration &gt; Firewall Configuration</strong>. When the GUFW window opens (see Figure 2). If the firewall is not enabled, check the Enabled check box to start it up. Once it is started up you can then add rules to the configuration.</p><div
id="attachment_38504" class="wp-caption alignleft" style="width: 340px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/12/gufw_2.png"><img
class="size-medium wp-image-38504 " src="http://www.ghacks.net/wp-content/uploads/2010/12/gufw_2-550x186.png" alt="" width="330" height="112" /></a><p
class="wp-caption-text">Figure 3</p></div><p>When you click the Add button a new window will appear (see Figure 3). From this window select the Preconfigured tab. In this window select the following:</p><ul><li>Allow</li><li>In</li><li>Service</li><li>Samba</li></ul><p>When you have the above selected, click Add. Now go back and add another rule to use the same configuration as above with the exception of selecting Out instead of In. Once you have done that, close the Add Rule window and then quit the GUFW window. Your firewall should now allow Samba through.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/12/29/allow-samba-through-your-linux-firewall-with-ufw/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Setup Ubuntu to browse Windows network by hostname</title><link>http://www.ghacks.net/2010/12/27/setup-ubuntu-to-browse-windows-network-by-hostname/</link> <comments>http://www.ghacks.net/2010/12/27/setup-ubuntu-to-browse-windows-network-by-hostname/#comments</comments> <pubDate>Mon, 27 Dec 2010 16:43:44 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Networks]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[samba]]></category> <category><![CDATA[ubuntu]]></category> <category><![CDATA[Windows Workgroup]]></category> <category><![CDATA[workgroup]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=38385</guid> <description><![CDATA[By default, a Ubuntu desktop with Samba installed will be a member of the Windows workgroup named WORKGROUP. Because that machine is a member of WORKGROUP, you would think you could browse and connect to other machines on the same network by hostname. That is not the case. Instead you would still have to locate [...]]]></description> <content:encoded><![CDATA[<p>By default, a Ubuntu desktop with Samba installed will be a member of the Windows workgroup named WORKGROUP. Because that machine is a member of WORKGROUP, you would think you could browse and connect to other machines on the same network by hostname. That is not the case. Instead you would still have to locate a machine&#8217;s IP address in order to connect. This seems to defeat the purpose of Samba and the ability to join a workgroup. To make life easier you need to, after installing Samba, make a fairly straight-forward change that will then allow your machine to see and reach other machines by hostname. Let&#8217;s see how this is done.</p><p><span
id="more-38385"></span><strong>Samba</strong></p><p>Naturally you need to have Samba installed on the machine you plan on using. There are a couple of ways to go about this. You can either open up the Ubuntu Software Center, search for Samba, and install Samba. Or you could open up Nautilus, right-click a folder, select Sharing Options, and the follow all of the prompts in order to get Samba correctly installed.</p><p>Once Samba is installed you can double check to make sure the Workgroup is correct by opening up the file <strong>/etc/samba/smb.conf </strong>and looking for the line:</p><p><code>workgroup = WORKGROUP</code></p><p>If you want (or need) to change the workgroup you belong to, change it there. After you make that change, save the file, and restart Samba with the command:</p><p><code>sudo service smbd restart</code></p><p><strong>Firewall</strong></p><p>If you happen to use Firestarter, you are going to need to uninstall it and install a different firewalling tool (GUFW is one of my favorites). If you leave Firestarter installed and you reboot your machine (after making this change) your machine very well may not boot. I will say that I have found Firestarter to include a few bugs (such as getting through it with Port 631 &#8211; printing) to make removal a good move. GUFW is a GNOME front-end for ufw which is a much more reliable firewalling tool (and just as easy to use).</p><p><strong>Final piece</strong></p><p>The last piece, before the configuration, is to install winbind. To do this issue the command <code>sudo apt-get install winbind</code>. You will need to enter your sudo password for the installation to complete. Once that is installed, you are ready to configure.</p><p><strong>Configuration</strong></p><p>The file you need to edit is <strong>/etc/nsswitch.conf</strong>. In this file you will see a line that looks like:</p><p><code>hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4</code></p><p>You need to edit this line so that it looks like:</p><p><code>hosts:          files mdns4_minimal [NOTFOUND=return] wins dns mdns4</code></p><p>Once you have done this, save the file, and restart networking. To restart networking issue the command:</p><p><code>/etc/init.d/networking restart</code></p><p><strong>Taking advantage</strong></p><p>Hopefully you know the host names of some of the machines on your network. If so, try to ping one of those machines by name (not IP address). You should get a positive response back. If you do not know the hostname of any machine on your network you can always click <strong>Places &gt; Network </strong>and then double click on the Windows Network icon. Once in this window you will see the WORKGROUP icon. Double click on that and it should show all of the machines on your network that belong to that same Workgroup. Take one of those names and try to ping it. You should get positive results back.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/12/27/setup-ubuntu-to-browse-windows-network-by-hostname/feed/</wfw:commentRss> <slash:comments>10</slash:comments> </item> <item><title>Use gkDebconf to reconfigure debconf-using programs</title><link>http://www.ghacks.net/2010/12/16/use-gkdebconf-to-reconfigure-debconf-using-programs/</link> <comments>http://www.ghacks.net/2010/12/16/use-gkdebconf-to-reconfigure-debconf-using-programs/#comments</comments> <pubDate>Thu, 16 Dec 2010 20:21:07 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[deb]]></category> <category><![CDATA[debconf]]></category> <category><![CDATA[gpkg]]></category> <category><![CDATA[gpkg-reconfigure]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[MySQL root password]]></category> <category><![CDATA[samba]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=38038</guid> <description><![CDATA[There are certain applications, such as MySQL and Apache that are configured upon installation. The most familiar to you might be MySQL. At the point of installation you configure the server address, admin password, etc. But what happens when you need to reconfigure that tool and you don&#8217;t want to go through the process of [...]]]></description> <content:encoded><![CDATA[<p>There are certain applications, such as MySQL and Apache that are configured upon installation. The most familiar to you might be MySQL. At the point of installation you configure the server address, admin password, etc. But what happens when you need to reconfigure that tool and you don&#8217;t want to go through the process of unistalling/reinstalling? Fortunately there is a tool to handle that task. That tool is dpkg-reconfigure.Â Of course this tool is a command line tool and many newer users do not want to bother with commands.</p><p>For those users who do not want to bother with commands, but still need to re-configure certain packages, there is a front end called gkDebconf that can be used to easily reconfigure those already installed packages. Let&#8217;s see how to install and use this tool.</p><p><span
id="more-38038"></span><strong>Installation</strong></p><p>Since gkDebconf is found in the standard repositories, installation is very simple. Just follow these steps:</p><ol><li>Open up the Ubuntu Software Center.</li><li>Search for &#8220;gkdebconf&#8221; (No quotes).</li><li>Click the Install button.</li><li>Enter your sudo password when prompted.</li><li>When the installation is complete, close the Software Center.</li></ol><p>Once installed, you will find the application in <strong>System &gt; Administration &gt; gkDebconf</strong>.</p><p><strong>Usage</strong></p><div
id="attachment_38039" class="wp-caption alignleft" style="width: 340px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/12/gkdebconf.png"><img
class="size-medium wp-image-38039 " src="http://www.ghacks.net/wp-content/uploads/2010/12/gkdebconf-550x499.png" alt="" width="330" height="299" /></a><p
class="wp-caption-text">Figure 1</p></div><p>One of the problems with starting the tool from the menu is that it will not ask you for your sudo password, therefore you will not have administrative access. For some of the package re-configuration (such as MySQL) you must have admin access. So if you are reconfiguring a package that you know requires admin access, start gkDebconf from the command line. To do this open up a terminal window and issue the command <em>sudo gkdebconf</em>. When this command is issued the main window for gkDebconf will open (see Figure 1) where you can locate the package you want to reconfigure.</p><p>As you can see there are numerous packages available to you. I am illustrating the MySQl-server package as that is the package that I get the most questions regarding re-configuring.</p><div
id="attachment_38040" class="wp-caption alignright" style="width: 340px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/12/gkdebconf_reconfig.png"><img
class="size-medium wp-image-38040 " src="http://www.ghacks.net/wp-content/uploads/2010/12/gkdebconf_reconfig-550x386.png" alt="" width="330" height="232" /></a><p
class="wp-caption-text">Figure 1</p></div><p>So to run the re-configuration process select the package you want to reconfigure and click the Configure button. When you do this a new window will open, that window being the debconf configuration window for the package in question (see Figure 2). In my example you can see the first step is asking you for the MySQL root user password. If you have already installed this package, you will have already walked through this wizard so it will be very familiar.</p><p>Some of the more important applications you can reconfigure include:</p><ul><li>adduser</li><li>apparmor</li><li>cups</li><li>gdm</li><li>openssh-server</li><li>quota</li><li>Samba</li><li>Snort</li></ul><p>For those who would like to to do this same task from the command line, you can use the <em>dpkg-reconfigure</em> like so:</p><p><code>sudo dpkg-reconfigure APPLICATION</code></p><p>Where APPLICATION is the package you want to reconfigure. So if you want to reconfigure Samba you would issue the command:</p><p><code>sudo dpkg-reconfigure samba</code></p><p><strong>Final thoughts</strong></p><p>Although the task isn&#8217;t too challenging to handle from the command line, it&#8217;s always nice to not have to guess the name of the package you want to configure (remember, Linux is very case-sensitive, so MySQL is not mysql). gkDebconf makes this task much easier.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/12/16/use-gkdebconf-to-reconfigure-debconf-using-programs/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <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>Quick and easy printer sharing in GNOME</title><link>http://www.ghacks.net/2010/11/14/quick-and-easy-printer-sharing-in-gnome/</link> <comments>http://www.ghacks.net/2010/11/14/quick-and-easy-printer-sharing-in-gnome/#comments</comments> <pubDate>Sun, 14 Nov 2010 19:32:10 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Desktop Manager]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[GNOME]]></category> <category><![CDATA[printer sharing]]></category> <category><![CDATA[samba]]></category> <category><![CDATA[SMB]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=36851</guid> <description><![CDATA[Printer sharing was once a big challenge for Linux. It almost always involved manually configuring Samba to share out your printers. That is not so now. With the latest releases of the GNOME desktop, printer sharing is as easy as it is in any other operating system. So longer will you need to open up [...]]]></description> <content:encoded><![CDATA[<p>Printer sharing was once a big challenge for Linux. It almost always involved manually configuring Samba to share out your printers. That is not so now. With the latest releases of the GNOME desktop, printer sharing is as easy as it is in any other operating system. So longer will you need to open up that <strong>/etc/smb.conf</strong> file and spend hours or days trying to figure out the challenging configuration. Now it&#8217;s point and click.</p><p>Let&#8217;s take a look at just how quickly and easy you can share out your printers in GNOME.</p><p><span
id="more-36851"></span><strong>Assumptions</strong></p><p>I will assume you already have your printer working on the machine to share the printer out. In my example, the printer is connected via USB and is a Samsung ML-1720 laser printer. You might have to deal with a firewall, I will illustrate how this is handled later.</p><p><strong>The sharing</strong></p><div
id="attachment_36852" class="wp-caption alignleft" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/11/printer_properties.png"><img
class="size-medium wp-image-36852 " src="http://www.ghacks.net/wp-content/uploads/2010/11/printer_properties-500x309.png" alt="Printer properties" width="300" height="185" /></a><p
class="wp-caption-text">Figure 1</p></div><p>The first thing you need to do is click <strong>System &gt; Administration &gt; Printing </strong>on the machine the printer is connected to. You will have to enter your sudo password to open up the tool. Once opened you should see a listing of your connected printers. Right-click the printer you want to share out and select Properties. In this Â new window (see Figure 1) click on the Policies section and then make sure the following are checked:</p><p>1. Enabled</p><p>2. Shared</p><p>3. Accepting jobs</p><div
id="attachment_36855" class="wp-caption alignright" style="width: 257px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/11/printer_server_settings.png"><img
class="size-full wp-image-36855 " src="http://www.ghacks.net/wp-content/uploads/2010/11/printer_server_settings.png" alt="Server settings" width="247" height="195" /></a><p
class="wp-caption-text">Figure 2</p></div><p>Once you have that set click OK. Now go back to the the Printer listing window and click <strong>Server &gt; Settings</strong>. In this new window (see Figure 2) make sure that Publish shared pritners connected to this system is checked as well as any other options you might want to have enabled. Click OK when you are done with this.</p><p><strong>Firewall</strong></p><p>This, of course, will all depend upon what tool you use for your firewall. But what you need to do is to enable incoming connections from the machine(s) that need to print to the shared printer on port 631. If your firewall works with services and not ports, the service you want is IPP. if you seem to be having trouble getting the machine to connect to the shared printer you can first try to disable your firewall to test if the machine can then connect. If it can then you will need to adjust your firewall settings in order to get the remote machine connected to the printer.</p><p><strong>Connecting</strong></p><p>The biggest challenge might come with with the remote machines. If you are connecting from Linux, the connection will be simple. You just need to select Windows Printer via SAMBA when selecting the type of printer you want to add.</p><p>If you are having trouble connecting from either Windows or Mac, you might have to create users on the Linux machine that match the users on the Windows or Mac machine (in both username and password). If you still have trouble, you might have to adjust the authentication type within the <strong>smb.conf</strong> file. Hopefully it won&#8217;t come to that.</p><p><strong>Final thoughts</strong></p><p>Linux continues to prove it can play well on the average user desktop. Even with printer sharing, Linux has become a user-friendly OS.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/11/14/quick-and-easy-printer-sharing-in-gnome/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Browse your Samba shares with pyNeighborhood</title><link>http://www.ghacks.net/2010/05/25/browse-your-samba-shares-with-pyneighborhood/</link> <comments>http://www.ghacks.net/2010/05/25/browse-your-samba-shares-with-pyneighborhood/#comments</comments> <pubDate>Tue, 25 May 2010 11:20:53 +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[Software]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[Nautlius]]></category> <category><![CDATA[samba]]></category> <category><![CDATA[shares]]></category> <category><![CDATA[SMB]]></category> <category><![CDATA[Windows Shares]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=25638</guid> <description><![CDATA[A long time ago, in order to scan your Samba shares, you used a tool called LinNeighborhood. That tool was essential if you wanted your Linux box to be able to see any Windows shares (unless you were brave enough to know the command line equivalents. Well years have passed and LinNeighborhood is now pyNeighborhood. [...]]]></description> <content:encoded><![CDATA[<p>A long time ago, in order to scan your Samba shares, you used a tool called LinNeighborhood. That tool was essential if you wanted your Linux box to be able to see any Windows shares (unless you were brave enough to know the command line equivalents. Well years have passed and LinNeighborhood is now pyNeighborhood. pyNeighborhood is the GTK2 version of LinNeighborhood (which was GTK1). It still serves (basically) the same purpose, but it&#8217;s more reliable and easier to use.</p><p>In this article I will show you how to install and use this Samba browser on your Linux distribution.</p><p><span
id="more-25638"></span><strong>What can pyNeighborhood do?</strong></p><p>With this outstanding Samba scanning tool you can:</p><ul><li>Scan a network for Windows/Samba shares.</li><li>Mount shares.</li><li>Add machines.</li><li>Remove machines.</li></ul><p>And much more. One thing you will find that pyNeighborhood can NOT do is set up Samba for you. It is not a Samba tool other than a discovery/mount tool. With that said, let&#8217;s install.</p><p><strong>Installation</strong></p><p>Installation is simple, but there is one piece that the installation does not catch and pyNeighborhood will not fully function without. To install everything you need open up your Add/Remove Software utility and do the following:</p><ol><li>Search for pyNeighborhood and mark the results for installation.</li><li>Search for mc (Midnight Commander) and mark the results for installation.</li><li>Click Apply to install.</li></ol><p>That&#8217;s it. If you do not install Midnight Commander the mount command will not work successfully.</p><p><strong>Usage</strong></p><p>Now let&#8217;s use pyNeighborhood to scan a Windows share and mount the shares. I will warn you that pyNeighborhood is picky about user rights. To get around this instead of starting the application with the normal command <em>pyNeighborhood</em>, start the command with the help of <em>gksudo </em>like this:</p><p><em>gksudo pyNeighborhood</em></p><div
id="attachment_25660" class="wp-caption alignright" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/05/pyneighborhood.png"><img
class="size-medium wp-image-25660 " src="http://www.ghacks.net/wp-content/uploads/2010/05/pyneighborhood-500x292.png" alt="" width="300" height="175" /></a><p
class="wp-caption-text">Figure 1</p></div><p>When you fire up pyNeighborhood the GUI will be very simple to get around. You shouldn&#8217;t have to set any options or do anything other than click <strong>Action &gt; Scan</strong> in order to see your shares (see Figure 1). When the scan completes you should see any machine listed in your network that has an available share. If this doesn&#8217;t work, you might have to try adding a machine by clicking <strong>Action &gt; Add Machine</strong>.</p><p>Once you have your machines listed you will need to mount them. To do so right click a share and select either <strong>Mount &gt; as SMB</strong> or <strong>Mount &gt; as CIFS</strong>. This will depend upon which you have installed.</p><div
id="attachment_25661" class="wp-caption alignleft" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/05/pyneighborhood_mounts.png"><img
class="size-medium wp-image-25661  " src="http://www.ghacks.net/wp-content/uploads/2010/05/pyneighborhood_mounts-500x292.png" alt="" width="300" height="175" /></a><p
class="wp-caption-text">Figure 2</p></div><p>Once you have these shares mounted they will show up in your Mounts tab (see Figure 2).</p><p>If you right click one of those mounts you can select either Unmount or File Manager. The File Manager has always given me issues. In the Preferences window you should be able to change the file manager from Midnight Commander (a VERY out of date curses-based file manager) to a more modern manager like Nautlius. But when you change the file manager the changes simply won&#8217;t stick and pyNeighborhood will continue on using MC. Because of this I just open up my file manager and navigate to the mount points and browse that way. By default the mount points will be <strong>/mnt/lan/</strong>. And don&#8217;t worry, pyNeighborhood will create those mount points and then remove them upon umounting.</p><p><strong>Final thoughts</strong></p><p>If you have been looking for a good tool to browse shares in Linux, pyNeighborhood is one of the best. It has a few wrinkles that still need to be ironed out, but you won&#8217;t find an easier tool to scan/mount/browse the Windows/Samba shares on your network.</p><p><em> </em></p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/05/25/browse-your-samba-shares-with-pyneighborhood/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Understanding Samba security modes</title><link>http://www.ghacks.net/2010/03/17/understanding-samba-security-modes/</link> <comments>http://www.ghacks.net/2010/03/17/understanding-samba-security-modes/#comments</comments> <pubDate>Wed, 17 Mar 2010 11:22:55 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Knowledge]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Networks]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[samba]]></category> <category><![CDATA[security mode]]></category> <category><![CDATA[SMB]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=23744</guid> <description><![CDATA[If you have read any of the Samba content here on Ghacks you probably will have noticed that within the smb.conf configuration file a line that begins withÂ security =. This is a very important part of Samba setup and generally the section that gives users the most problems. Although the security mode would seem fairly [...]]]></description> <content:encoded><![CDATA[<p>If you have read any of the <a
title="Samba content" href="http://www.ghacks.net/index.php?s=samba" target="_blank">Samba content</a> here on Ghacks you probably will have noticed that within the <strong>smb.conf</strong> configuration file a line that begins withÂ <em>security =. </em> This is a very important part of Samba setup and generally the section that gives users the most problems. Although the security mode would seem fairly straight-forward<em>, </em>it is certainly worth explaining.</p><p>In this article I will discuss what the security mode feature does and what the different modes are. By the end of this article there should be no confusion as to which mode your Samba setup should use.</p><p><span
id="more-23744"></span><strong>What are security modes?</strong></p><p>I like to think of security modes as a means to inform the server just how a client will authenticate. You know about authentication from many sources. You can authenticate at a local level, as part of a domain, using Active Directory, and more. How you authenticate is generally dictated by your IT department (or by yourself if you are personal or home user). Because of the different types of authentication, Samba needs a way to know how this authentication is going to happen.</p><p>Now, from a Windows perspective (and the reason why Samba exists) there are only two types of security level: Share level and User level. But because Windows has multiple ways of authentication Samba needs to break the user level down further. So, as far as Samba is concerned, these <em>levels</em> are called <em>modes </em>and there are five modes: user, share, domain, ADS, and server. Let&#8217;s take a look at each of these.</p><p><strong>user</strong></p><p>The <em>security = user</em> mode is really the easiest to understand. From the Samba server perspective, the only things that matter (with regard to user mode) is <em>username/password</em> and the name of the client machine. This mode works very simply: If the Samba server accepts the <em>username/password</em> of the client then that client is able to mount shares on the server.</p><p><strong>share</strong></p><p>The <em>security = share </em> mode the client will authenticate itself against a share on the Samba server. Unlike user, when <em>security = share</em> authenticates against a share, that means that client only has access to that share. When using this mode the client sends a password along with each share request. If the password authenticates, the client has access to the share. If not, no access is granted. The authentication process is like this:</p><ol><li>The client sends a session setup request that includes a valid username.</li><li>Samba records this username.</li><li>Client issues a tree connection request and the share the client wishes to connect with.</li><li>The users password is the then checked against the username. If password matches, the client is given access.</li></ol><p><strong>domain</strong></p><p>The <em>security = domain</em> provides a means for storing all username/passwords in a centralized, shared account. This account is then shared between domain controllers. So when Samba uses this mode of security it has a domain security trust account and forces all authentication requests to be passed through the domain controller. When using this mode the configuration requires a second parameter. So the configuration will look like:</p><p>security = domain</p><p>workgroup = DOMAIN_NAME</p><p>You also have to join the domain using the <em>net rpc join -U ADMINISTRATOR%PASSWORD</em> command. Where ADMINISTRATORÂ is the name of the administrator account and PASSWORD is the password for that account.</p><p><strong>ads</strong></p><p>As you might expect, this is the Active Directory mode. Samba added ADS functionality at release 3. Using ADS mode is only possible if the Active Directory server is run in native mode. When running in ADS mode Samba will need NT-compatible authentication data &#8211; in other words Kerberos. So your Samba server will need to have a working Kerberos system installed. When using ADS mode, your Samba configuration adds another line like so:</p><p>realm = YOUR.KERBEROS.REALM</p><p>security = ADS</p><p><strong>server</strong></p><p>The last mode is <em>security = server</em>. This mode is generally not used any more because it basically sends username/password authentication to another machine. If this other machine is down, there will be no authentication. This mode presents numerous problems, which is why it is often not used. One of the more serious problems is that once a connection to the password server is made, that connection can be left open for extended periods of time &#8211; thus a severe security issue.</p><p><strong>Final thoughts</strong></p><p>Now you should have a better understanding of the security modes for Samba. Which do you prefer? Which modes are you locked down to within your company? Samba is a very flexible tool that can be used in many different environments. Hopefully Ghacks is helping you to implement Samba more easily.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/03/17/understanding-samba-security-modes/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>Connect to a Samba share from OS X</title><link>http://www.ghacks.net/2010/03/16/connect-to-a-samba-share-from-os-x/</link> <comments>http://www.ghacks.net/2010/03/16/connect-to-a-samba-share-from-os-x/#comments</comments> <pubDate>Mon, 15 Mar 2010 23:14:03 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Mac]]></category> <category><![CDATA[Networks]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[finder]]></category> <category><![CDATA[samba]]></category> <category><![CDATA[smb.conf]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=23712</guid> <description><![CDATA[Here on Ghacks I&#8217;ve worked to cover Samba from numerous angles (check out the Samba Topic on Ghacks). I want to build on that topic by helping you to connect to a Samba share from within the OS X operating system. And just in case your Samba install is not set up, or just not [...]]]></description> <content:encoded><![CDATA[<p>Here on Ghacks I&#8217;ve worked to cover Samba from numerous angles (check out the <a
title="Samba On Ghacks" href="http://www.ghacks.net/index.php?s=samba" target="_blank">Samba Topic on Ghacks</a>). I want to build on that topic by helping you to connect to a Samba share from within the OS X operating system. And just in case your Samba install is not set up, or just not quite right, I will offer up an easy to use <strong>smb.conf</strong> file that should help you get things rolling.</p><p>For this installation I will using Samba on a Debian server. Nothing really special, but it is on a fairly secure internal network (So I won&#8217;t really touch on security in this article). With that said, let&#8217;s begin.</p><p><span
id="more-23712"></span><strong>smb.conf</strong></p><p>First let me show you a simple, easy to use, <strong>smb.conf</strong> file. This file should be placed in <strong>/etc/samba/ </strong>AFTER you back up your current <strong>/etc/samba/smb.conf </strong>file with the command <em>cp /etc/samba/smb.conf /etc/samba/smb.conf.bak</em>. Once you have that done, open up <strong>/etc/samba/smb.conf</strong>, delete the contents of that file, and insert the following:</p><p>ï»¿[global]<br
/> netbios name = <strong>NETBIOS_NAME</strong><br
/> workgroup = <strong>WORKGROUP</strong><br
/> security = user<br
/> encrypt passwords = yes<br
/> smb passwd file = /etc/samba/smbpasswd<br
/> interfaces = <strong>192.168.1.1/8</strong><br
/> <code><strong><span
style="font-weight: normal">[</span>SHARE</strong>]<br
/> comment = <strong>COMMENT</strong><br
/> path = <strong>/PATH/TO/SHARE</strong><br
/> writeable = yes<br
/> create mode = 0750<br
/> locking = yes</code></p><p>Where everything in <strong>BOLD</strong> is user/network specific.</p><p><strong>Passwords and users</strong></p><p>Now of course you have to add users and add passwords for them. Do the following:</p><p><em>sudo smbpasswd -L -a <strong>USERNAME</strong></em></p><p>Where <strong>USERNAME </strong>is the actual name of the user you want to add.Â You will be prompted to create a password and retype said password.</p><p>Now enable the user with the command:</p><p><em>sudo smbpasswd -L -e <strong>USERNAME</strong></em></p><p>Again, where <strong>USERNAME </strong>is the actual user name you want to add.</p><p>Now restart Samba with the command:</p><p><em>/etc/init.d/samba restart</em></p><p><strong>Connect from OS X</strong></p><div
id="attachment_23713" class="wp-caption alignleft" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/03/mac_samba.png"><img
class="size-medium wp-image-23713 " src="http://www.ghacks.net/wp-content/uploads/2010/03/mac_samba-500x264.png" alt="" width="300" height="158" /></a><p
class="wp-caption-text">Figure 1</p></div><p>And now to the heart of the matter. How do you connect to your Samba server from OS X? Here&#8217;s how. The first step is to open up the Finder. Once the finder window is open click the &lt;Apple&gt;k key combination which will bring up the window you see in Figure 1.</p><p>If this is your first time to connect to this Samba server from your Mac, you won&#8217;t see the servers listed&#8230;you will have to manually enter them. As you can see, in Figure 1, the address to enter is in the form: <em>smb://IP_ADDRESS_OF_SERVER. </em></p><div
id="attachment_23714" class="wp-caption alignright" style="width: 276px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/03/mac_samba3.png"><img
class="size-full wp-image-23714 " src="http://www.ghacks.net/wp-content/uploads/2010/03/mac_samba3.png" alt="" width="266" height="213" /></a><p
class="wp-caption-text">Figure 2</p></div><p>Once you enter the IP address hit the Connect button and you will be prompted to select the SMB/CIFS share you want to connect to. After you do this the authentication window will open (see Figure 2). In this window you will be required to enter the Samba credentials for the Samba server.</p><div
id="attachment_23715" class="wp-caption alignleft" style="width: 208px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/03/mac_samba4.png"><img
class="size-full wp-image-23715" src="http://www.ghacks.net/wp-content/uploads/2010/03/mac_samba4.png" alt="" width="198" height="179" /></a><p
class="wp-caption-text">Figure 3</p></div><p>Upon authentication to the Samba Server the Share will mount and appear in your Finder as you see in Figure 3 (only the share name will be different). You can now navigate this share as you would any folder.</p><p><strong>Disconnecting from the share</strong></p><p>Once you are finished using the share you can unmount the share by clicking the upward pointing arrow associated with the share listing in Finder. Of course you can leave this share mounted until you reboot the machine. I would suggest umounting the share before your reboot or shutdown.</p><p><strong>Final thoughts</strong></p><p>Mac and Linux do play well together. Hopefully you have found connecting to a Samba server as simple as nearly any other task in OS X.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/03/16/connect-to-a-samba-share-from-os-x/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Share Ubuntu folders with NFS</title><link>http://www.ghacks.net/2010/03/01/share-ubuntu-folders-with-nfs/</link> <comments>http://www.ghacks.net/2010/03/01/share-ubuntu-folders-with-nfs/#comments</comments> <pubDate>Mon, 01 Mar 2010 10:00:08 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Networks]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Advanced]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[file-sharing]]></category> <category><![CDATA[samba]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=23395</guid> <description><![CDATA[If you&#8217;ve ever tried to share folders on a Linux machine over a network, you&#8217;ve most likely attempted to get NFS working. And on many occasions you might have found yourself nearly pulling out your hair in frustration. Well, you&#8217;ll be glad to know that getting NFS working on modern Ubuntu systems is actually quite [...]]]></description> <content:encoded><![CDATA[<p>If you&#8217;ve ever tried to share folders on a Linux machine over a network, you&#8217;ve most likely attempted to get NFS working. And on many occasions you might have found yourself nearly pulling out your hair in frustration. Well, you&#8217;ll be glad to know that getting NFS working on modern Ubuntu systems is actually quite simple. You just have to have a couple of pieces installed and access to the <strong>/etc/exports </strong>file.</p><p>In this article I am going to demonstrate how simple it is to share a folder, using NFS, between a Ubuntu machine and a Debian machine. When all is said and done, you&#8217;ll be surprised at how simple it is.</p><p><span
id="more-23395"></span><strong>What is NFS?</strong></p><p>NFS stands for (take a guess&#8230;) Network File System. NFS is a protocol developed by Sun Microsystems in 1984 to allow computers to share files and folders over a network. NFS is an open standard, defined in RFCs, and allows any to implement the protocol.</p><p>Although many prefer to employ Samba for network folder sharing, NFS still has a lot of good uses and some even prefer it over the more flexible Samba.</p><p><strong>Installation</strong></p><p>Both client and server will need the package nfs-common. On the server machine you will need to install the package nfs-kernel-server. To install these packages follow these steps:</p><ol><li>Open up Synaptic (or your favorite Add/Remove Program utility).</li><li>Search for &#8220;nfs&#8221; (no quotes).</li><li>Mark nfs-common (for the client) and nsf-common and nfs-kernel-server (for the server).</li><li>Click Apply to install.</li></ol><p>That&#8217;s it. Now it&#8217;s time for a little configuration.</p><p><strong>Configuration</strong></p><p>For example&#8217;s sake, the two machines we are using are addressed as such:</p><p>Server: 192.168.1.100</p><p>Client: 192.168.1.10</p><p>On the client we will create a directory which the NFS server share will mounted to. We&#8217;ll create the folder ~/UBUNTU_NFS with the command <em>mkdir ~/UBUNTU_NFS</em>. Now let&#8217;s move over to the server.</p><p>The first thing to be done on the server machine is to create folder that will be shared out. Let&#8217;s call that folder ~/SHARE and we&#8217;ll create it with the command <em>mkdir ~/SHARE. </em></p><p>Now we have to create an entry in the <strong>/etc/exports</strong> folder. This entry will tell NFS what to share and who to share with. The entry will look like:</p><p><em>/home/USERNAME/SHAREÂ Â Â Â  192.168.1.10(rw)</em></p><p>Where USERNAME is the actual name of the user. NOTE: You could share a folder in <strong>/opt</strong> if you like.</p><p>Now nfs-kernel-server has to be restarted with the command:</p><p><em>/etc/init.d/nfs-kernel-server restart</em></p><p><strong>Mounting</strong></p><p>Hop back on to the client machine and issue the command:</p><p><em>sudo mount 192.168.1.100:/home/USER/SHARE /home/USER/UBUNTU_NFS</em></p><p>Where USER is the actual user name.</p><p>You should get no errors. Now let&#8217;s test this out. Hop on back to the server and create a file within <strong>~/SHARE</strong>. After you create that file, check the <strong>~/UBUNTU_NFS </strong>directory on the client to make sure the file shows up. Try to delete that file. Now create a file in the <strong>~/UBUNTU_NFS </strong>directory on the client. You should have no problems creating a file.</p><p><strong>Automounting</strong></p><p>Say you want this share to always be mounted upon boot of the client machine. This, of course would require the server machine to be on. To do this add an entry on the client machine&#8217;s <strong>/etc/fstab</strong> that looks like:</p><p><code>192.168.1.100:/home/jlwallen/ELIVEÂ  /home/jlwallen/UBUNTUÂ  nfs rsize=1024,wsize=1024,noauto 0 0</code></p><p>NOTE: The above fstab entry is all one line.</p><p>Now that NFS share will mount even when the machine is rebooted.</p><p><strong>Final thoughts</strong></p><p>As you can see, NFS has become much easier than it was in the old days. Now, armed with NFS and Samba, you can be sharing files and folders with anyone and everyone.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/03/01/share-ubuntu-folders-with-nfs/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Easy folder sharing in GNOME</title><link>http://www.ghacks.net/2010/02/23/easy-folder-sharing-in-gnome/</link> <comments>http://www.ghacks.net/2010/02/23/easy-folder-sharing-in-gnome/#comments</comments> <pubDate>Tue, 23 Feb 2010 12:10:17 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Desktop Manager]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Networks]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[folder sharing in Linux]]></category> <category><![CDATA[GNOME]]></category> <category><![CDATA[nautilus]]></category> <category><![CDATA[samba]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=23289</guid> <description><![CDATA[Recently I covered folder sharing in KDE 4.4 (Read my article &#8220;Easy folder sharing in KDE 4.4&#8220;). I thought I should offer the same article for the GNOME desktop. Although the tasks are fairly similar, there are subtle differences that could trip up the new users. But since this process removes the the challenge of [...]]]></description> <content:encoded><![CDATA[<p>Recently I covered folder sharing in KDE 4.4 (Read my article &#8220;<a
title="Easy folder sharing in KDE 4.4" href="http://www.ghacks.net/2010/02/18/easy-folder-sharing-in-kde-4-4/" target="_blank">Easy folder sharing in KDE 4.4</a>&#8220;). I thought I should offer the same article for the GNOME desktop. Although the tasks are fairly similar, there are subtle differences that could trip up the new users. But since this process removes the the challenge of the typical Samba set up, it is a task you definitely need to understand how to take care of.</p><p>In this article you will learn the tools you need to install and how to share out folders, via Samba, in the GNOME desktop.</p><p><span
id="more-23289"></span><strong>Sharing out Public</strong></p><div
id="attachment_23290" class="wp-caption alignleft" style="width: 248px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/02/gnome_sharing.png"><img
class="size-full wp-image-23290 " src="http://www.ghacks.net/wp-content/uploads/2010/02/gnome_sharing.png" alt="" width="238" height="219" /></a><p
class="wp-caption-text">Figure 1</p></div><p>In modern GNOME installations you should notice a folder called <strong>~/Public</strong>. To make things simple, we&#8217;re going to share out that folder (It makes the most sense anyway).Â  If you haven&#8217;t already installed Samba you will now get your chance.</p><p>Open up Nautilus (GNOME file manager) to your Home directory. Right click the Public folder and select the Sharing Options entry. When this new window opens (see Figure 1) you will instantly see a simple check box to tick.</p><p>When you tick that checkbox a window will appear informing you that the &#8220;Sharing service is not installed&#8221;. Click Install Service in that new window. After you enter your password Samba and libpam-smbpass will be installed. When the installation is complete a new window will appearing instructing you to restart your session.</p><div
id="attachment_23292" class="wp-caption alignright" style="width: 248px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/02/gnome_share_options.png"><img
class="size-full wp-image-23292 " src="http://www.ghacks.net/wp-content/uploads/2010/02/gnome_share_options.png" alt="" width="238" height="219" /></a><p
class="wp-caption-text">Figure 2</p></div><p>Once installed and restarted, the sharing options will be available to you (see Figure 2). Configure this folder as per your needs. Understand that if you check &#8220;Guest Access&#8221; that means anyone that can see your network will have access to this folder &#8211; so choose wisely.</p><div
id="attachment_23293" class="wp-caption alignleft" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/02/folder_sharing_permissions.png"><img
class="size-medium wp-image-23293 " src="http://www.ghacks.net/wp-content/uploads/2010/02/folder_sharing_permissions-500x230.png" alt="" width="300" height="138" /></a><p
class="wp-caption-text">Figure 3</p></div><p>After you make all of your configurations, click Create Share which will then open up a new window. This new window will really surprise you. Check out Figure 3. GNOME has become so intelligent and user-friendly that it will make all of the permission changes necessary for you! Just click the Add the permissions automatically and you&#8217;re done.</p><div
id="attachment_23294" class="wp-caption alignright" style="width: 291px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/02/gnome_share_icon.png"><img
class="size-full wp-image-23294" src="http://www.ghacks.net/wp-content/uploads/2010/02/gnome_share_icon.png" alt="" width="281" height="175" /></a><p
class="wp-caption-text">Figure 4</p></div><p>You will know a folder is shared in GNOME because the folder icon will have changed (see Figure 4)</p><p>Now go over to a different machine on your network and see if the new share is available. If, on a Windows machine, you can&#8217;t see it yet you can always open up Explorer and enter:</p><p><em>\\IP_ADDRESS_OF_SHARE</em></p><p>Where IP_ADDRESS_OF_SHARE is the ip address of the machine with the new share. If you opened that folder up to guests you won&#8217;t even need to enter a username or password.Â  And you will automatically have read/write access to that folder. How simple is that? Of course, if you should change your mind about the permissions of the shared folder you can always right click that folder select Properties, go to the Permissions tab, and change the permissions as needed.</p><p><strong>Final thoughts</strong></p><p>It always seems that the GNOME desktop is one step ahead of the competition. When there is a feature available for a desktop, GNOME always takes that feature and either makes it better or easier. If you&#8217;re looking to share out folders on a GNOME desktop, it couldn&#8217;t be any easier.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/02/23/easy-folder-sharing-in-gnome/feed/</wfw:commentRss> <slash:comments>10</slash:comments> </item> <item><title>Easy folder sharing in KDE 4.4</title><link>http://www.ghacks.net/2010/02/18/easy-folder-sharing-in-kde-4-4/</link> <comments>http://www.ghacks.net/2010/02/18/easy-folder-sharing-in-kde-4-4/#comments</comments> <pubDate>Thu, 18 Feb 2010 12:40:20 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Networks]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Advanced]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[folder permissions]]></category> <category><![CDATA[folder sharing]]></category> <category><![CDATA[KDE]]></category> <category><![CDATA[samba]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=23174</guid> <description><![CDATA[Once more unto the KDE topic my friends, once more. This time, however, we take a look at a very useful feature that allows you to easily share out folders with a few clicks. These folders will be shared with the help of Samba and not a single line of a configuration file will have [...]]]></description> <content:encoded><![CDATA[<p>Once more unto the KDE topic my friends, once more. This time, however, we take a look at a very useful feature that allows you to easily share out folders with a few clicks. These folders will be shared with the help of Samba and not a single line of a configuration file will have to be edited by the user. It&#8217;s a pretty sweet feature, so let&#8217;s start sharing.</p><p><span
id="more-23174"></span><strong>First things first</strong></p><p>Of course you are going to have to have Samba installed and running on your machine. Â You will at least need:</p><ul><li>Samba</li><li>Samba Client</li><li>kdenetwork-filesharing</li></ul><p>If you do not already have those pieces of the puzzle installed, do so and then start Samba with a command similar to <em>sudo /etc/init.d/samba start. </em>The full path to the <em>samba</em> executable will depend upon your distribution.</p><p><strong>Start sharing</strong></p><div
id="attachment_23175" class="wp-caption alignright" style="width: 272px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/02/kde_sharing.png"><img
class="size-full wp-image-23175 " src="http://www.ghacks.net/wp-content/uploads/2010/02/kde_sharing.png" alt="" width="262" height="274" /></a><p
class="wp-caption-text">Figure 1</p></div><p>Open up Dolphin (the KDE file manager) and navigate to a directory you want to share. Â Right click that folder and then go to the Share tab in the new window (see Figure 1). In this tab you will want to check the following options:</p><ul><li>Share this folder in the local network.</li><li>Share with Samba.</li></ul><p>Under SAMBA options you can then give the share a name and decide if you want the folder to be Public and Writable.</p><p>When you click OK you will be prompted for your sudo (or root) password.</p><p>If you click the More Samba Options you can fine-tune the share. Â Just make sure that you know Samba well before you attempt to handle any of these options. If you make one wrong configuration in this section you can fubar your Samba install and have some serious troubleshooting on your hands.</p><div
id="attachment_23176" class="wp-caption alignleft" style="width: 211px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/02/kde_shared_folder.png"><img
class="size-full wp-image-23176 " src="http://www.ghacks.net/wp-content/uploads/2010/02/kde_shared_folder.png" alt="" width="201" height="130" /></a><p
class="wp-caption-text">Figure 2</p></div><p>Once a folder has been shared, the Dolphin icon will change. Figure 2 shows four icons in the file manger. The Public folder has been marked as &#8220;shared&#8221;.</p><p>Now go to another machine (a Windows machine will do) and see if this share is showing up. If it is not, you might have to restart Samba. But before you restart Samba, give the newly shared folder a moment to show up.</p><div
id="attachment_23177" class="wp-caption alignright" style="width: 272px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/02/kde_permissions.png"><img
class="size-full wp-image-23177 " src="http://www.ghacks.net/wp-content/uploads/2010/02/kde_permissions.png" alt="" width="262" height="274" /></a><p
class="wp-caption-text">Figure 3</p></div><p>If you have problems writing to this newly shared folder, most likely the issue is permissions. Before you go to the More Samba Options section, first check the permissions of the directory itself. Make sure that both Group and Others have writable permission to the directory. Â You can do this from the Permissions tab in the Properties window (see Figure 3). Once you taken care of the folder permissions, your users should then be able to read and write to that shared folder.</p><p><strong>A word of caution</strong></p><p>Make sure the folder you are sharing out doesn&#8217;t contain any sensitive data you wouldn&#8217;t want other users to see, edit, or delete. And, like any folder sharing situation, make sure you are on a nice secure network before you start sharing out folders.</p><p><strong>Final thoughts</strong></p><p>Many people probably never thought they&#8217;d see the day when sharing out folders in Linux was as easy as it is in other operating systems. That day has finally come with the help of Samba and KDE 4.4.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/02/18/easy-folder-sharing-in-kde-4-4/feed/</wfw:commentRss> <slash:comments>11</slash:comments> </item> <item><title>Configure Samba with Gadmin-Samba</title><link>http://www.ghacks.net/2009/12/25/configure-samba-with-gadmin-samba/</link> <comments>http://www.ghacks.net/2009/12/25/configure-samba-with-gadmin-samba/#comments</comments> <pubDate>Fri, 25 Dec 2009 16:58:55 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Networks]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[CIFS]]></category> <category><![CDATA[gadmin]]></category> <category><![CDATA[samba]]></category> <category><![CDATA[shares]]></category> <category><![CDATA[SMB]]></category> <category><![CDATA[smb.conf]]></category> <category><![CDATA[ubuntu]]></category> <category><![CDATA[ubuntu server]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=21799</guid> <description><![CDATA[For those new to Samba, the configuration of this provider of seamless file and print services to SMB/CIFS clientsÂ can sometimes be a nightmare. Not only are you dealing with tricky configuration files, you also have to worry about getting users added to encrypted password files. Of course if you want to tackle this the old-school [...]]]></description> <content:encoded><![CDATA[<p>For those new to Samba, the configuration of this provider of seamless file and print services to SMB/CIFS clientsÂ can sometimes be a nightmare. Not only are you dealing with tricky configuration files, you also have to worry about getting users added to encrypted password files. Of course if you want to tackle this the old-school way you can take a read of my article &#8220;<a
title="Set up your Ubuntu server as a Samba server" href="http://www.ghacks.net/2009/09/04/set-up-your-new-ubuntu-server-as-a-samba-server/" target="_blank">Set up your new Ubuntu server as a Samba server</a>&#8220;. But for those that prefer to do things the GUI way, there are plenty of tools available for you as well.</p><p>One such tool is the gadmin-samba tool from the Gadmintools suite of GUI Linux administration tools. The Gadmintools suite allows you to easily setup Samba with the help of a well thought-out graphical interface. With this tool you should be able to have Samba up and running in no time. Of course, there is a bit of installation to tackle at first, but even that is simple. So, without further adieu, let&#8217;s get to work.</p><p><span
id="more-21799"></span><strong>Installation</strong></p><p>You can do this two ways:</p><ul><li>Install the entire Gadmin suite of tools.</li><li>Install only the Samba tool.</li></ul><p>You will also need to make sure Samba is installed as well as winbind. So open up Synaptic and search for the following:</p><ul><li>samba</li><li>winbind</li><li>gadmin-samba</li></ul><p>Mark each of those for installation and they should pick up all of the necessary dependencies. Once installed, you are ready to rock.</p><p><strong>Running Gadmin-Samba</strong></p><div
id="attachment_21800" class="wp-caption alignleft" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2009/12/gadmin_samba.png"><img
class="size-medium wp-image-21800 " src="http://www.ghacks.net/wp-content/uploads/2009/12/gadmin_samba-500x346.png" alt="" width="300" height="208" /></a><p
class="wp-caption-text">Figure 1</p></div><p>To start the tool go to the System Tools sub-menu of the Applications menu and select Gadmin Samba. You will have to enter your sudo (or root user &#8211; depending upon your distribution) password. The main window will open with no configuration settings filled in (see Figure 1).</p><p>I will go through the setup one tab at a time.</p><p><strong>Server settings</strong></p><p>Although there are numerous settings to configure, you really only need configure a few of these to get a basic Samba server up and running.</p><ul><li>The servers host name: This is actually the Netbios name as configured in smb.conf.</li><li>Workgroup: The workgroup your Samba server will be a part of.</li><li>Security level: Setting this according to your needs (I prefer users on a smaller network).</li><li>Allowed hosts and networks: Set this to <em>eth0 lo</em> (you might have to modify <em>eth0</em> to reflect your network device name).</li></ul><p>That&#8217;s it for this tab. Now we move on to the users tab.</p><p><strong>Users</strong></p><div
id="attachment_21801" class="wp-caption alignright" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2009/12/gadmin_samba_users.png"><img
class="size-medium wp-image-21801 " src="http://www.ghacks.net/wp-content/uploads/2009/12/gadmin_samba_users-500x346.png" alt="" width="300" height="208" /></a><p
class="wp-caption-text">Figure 2</p></div><p>The Users tab is exactly what you would expect &#8211; a means to set up users for your Samba share. This section takes the place of having to use the <em>smbpasswd </em>command. From this tab (see Figure 2) you will need to fill out:</p><ul><li>Username: The name of the user.</li><li>Password: The password for the user.</li><li>Group: You must add your user to a group. You can safely add your user to the same name as the username. So if your username is joe, you can add this user to the joe group.</li><li>Comment: For some odd reason, comments are required.</li><li>Home directory. Set this to the users&#8217; home directory.</li><li>Shell: Most likely this will be /bin/sh</li></ul><p>After you fill out this information click the Apply button. You are now ready to move on to the Shares tab.</p><p><strong>Shares</strong></p><div
id="attachment_21802" class="wp-caption alignleft" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2009/12/gadmin_samba_shares.png"><img
class="size-medium wp-image-21802 " src="http://www.ghacks.net/wp-content/uploads/2009/12/gadmin_samba_shares-500x346.png" alt="" width="300" height="208" /></a><p
class="wp-caption-text">Figure 3</p></div><p>When you click on the Shares tab you might be surprised to see some default values in place. If not, don&#8217;t worry, this is simple. Just configure the following:</p><ul><li>Share name: The name of the share you want to create.</li><li>Shared directory: The directory you want to share out. By default, Gadmin Samba will want to share out <strong>/opt/samba</strong>. This is fine if you like, but you must remember that your normal users will not have write permission to this directory. That&#8217;s okay, you can add users to this directory by scrolling down and clicking the &#8220;Add access permissions&#8221; button and walking through the wizard. Just use caution with this. If you add users to the share, only those users will have access to the share. This is good security, but you must remember to add new users to this share should new users need access.</li></ul><p>Once you have configured your users, you can click on the Configuration tab to see what your <strong>/etc/samba/smb.conf</strong> file will look like and click the Save button should it suffice. Once you have saved your configuration file, click the Activate button and Samba will up and running, ready for your users to connect.</p><p><strong>Final thoughts</strong></p><p>The Gadmintools Samba GUI has taken the complexity out of setting up a Samba server. Give this tool a try and see if you can&#8217;t get your Samba server up and running faster and with less hair pulling than you ever did with your manual setups.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/12/25/configure-samba-with-gadmin-samba/feed/</wfw:commentRss> <slash:comments>5</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> <item><title>Set up your new Ubuntu Server as a Samba Server</title><link>http://www.ghacks.net/2009/09/04/set-up-your-new-ubuntu-server-as-a-samba-server/</link> <comments>http://www.ghacks.net/2009/09/04/set-up-your-new-ubuntu-server-as-a-samba-server/#comments</comments> <pubDate>Fri, 04 Sep 2009 16:58:23 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Networks]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Advanced]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[file-sharing]]></category> <category><![CDATA[samba]]></category> <category><![CDATA[samba server]]></category> <category><![CDATA[smb.conf]]></category> <category><![CDATA[ubuntu]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=16023</guid> <description><![CDATA[I recently did an illustrated guide to installing Ubuntu Server 9.04 (&#8220;Installing Ubuntu Server 9.04&#8220;). I did that for two reasons: 1) It was requested and 2) It will serve as a base for future articles that will cover many different topics. Having that foundation will be key to getting other services up and running. [...]]]></description> <content:encoded><![CDATA[<p>I recently did an illustrated guide to installing Ubuntu Server 9.04 (&#8220;<a
title="Installing Ubuntu Server 9.04" href="http://www.ghacks.net/2009/09/03/installing-ubuntu-server-9-04/" target="_blank">Installing Ubuntu Server 9.04</a>&#8220;). I did that for two reasons: 1) It was requested and 2) It will serve as a base for future articles that will cover many different topics. Having that foundation will be key to getting other services up and running.</p><p>In this article I am going to show you how to get a basic Samba Server up and running on top of that Ubuntu Server. Now, because the Ubuntu Server was set up as a headless server, the installation and configuration of Samba will be done completely from the command line. So get your fingers ready to type.</p><p><span
id="more-16023"></span><strong>What is Samba?</strong></p><p>Samba is a very handy tool that can do many things. The primary task it serves is to enable a Windows machine to access a Linux machine serving as a file and/or print server. Samba uses the SMB/CIFS protocols to enable communication between the Windows and the Linux machine.</p><p>Samba has often been thought of as very difficult to get up and running. It&#8217;s not really that bad. Hopefully, by the end of this article, you will have a fairly good understanding of how to get it up and running.</p><p><strong>Installing Samba</strong></p><p>As I said, you will doing this completely from the command line. The command to issue is:</p><p><em>sudo apt-get install samba</em></p><p>You will have to enter your sudo password to continue with the installation. Depending upon your server installation, you might have to okay some dependencies. Go ahead and do this and then watch as Samba is installed.</p><p>Once installed you will have the Samba executable in <strong>/etc/init.d/</strong>. In order to start Samba you will issue the command:</p><p><em>/etc/init.d/samba star</em><em>t</em></p><p>Of course, before you start Samba, you will need to configure Samba. There are a few steps to take care of. Let&#8217;s first deal with the configuration file.</p><p><strong>Configuring Samba</strong></p><p>Before you get too deep into this you might want to first read my article &#8220;<a
title="Understanding smb.conf" href="http://www.ghacks.net/2009/02/06/get-to-know-linux-understanding-smbconf/" target="_blank">Get To Know Linux: Understanding smb.conf</a>&#8220;. The Samba configuration file is located in the <strong>/etc</strong><strong>/samba</strong> directory and is called <strong>smb.conf</strong>. When you first open up this file you may be overwhelmed. Let&#8217;s avoid that by making a backup of the original <strong>smb.conf </strong>file. Change to the <strong>/etc/samba</strong> directory with the command:</p><p><em>cd /etc/samba</em></p><p>Now issue the following command:</p><p><span
style="background-color: #ffffff"><em>sudo cp smb.con smb.conf.bak</em></span></p><p><span
style="background-color: #ffffff">Now you can open up the <strong>smb.conf</strong> file and erase the entirety of its contents. How do you do that? If you are using the Nano editor it&#8217;s simple. With the file open hold the Ctrl key and the &#8216;K&#8217; key down until the entire contents are gone. Or you can delete the file and create a new one. Your choice.</span></p><p><span
style="background-color: #ffffff">With a fresh <strong>smb.conf </strong>you are ready to re-create a file based on your needs. A good configuration to start with looks like:</span></p><p><code>[global]<br
/> netbios name = NETBIOS_NAME<br
/> workgroup = WORKGROUP_NAME<br
/> security = user<br
/> encrypt passwords = yes<br
/> smb passwd file = /etc/samba/smbpasswd<br
/> interfaces = 192.168.1.1/8</code></p><p><code>[SHARE_NAME]<br
/> comment = COMMENT<br
/> path = /PATH/TO/SHARE<br
/> writeable = yes<br
/> create mode = 0600<br
/> directory mode = 0700<br
/> locking = yes</code></p><p><span
style="background-color: #ffffff">Where everything in ALL CAPS (as well as the interfaces line) is unique to your needs.</span></p><p><span
style="background-color: #ffffff">The SHARE_NAME is what you want to share out to your users. So if you are setting up a file server for a number of users you will want to have a directory, say <strong>/data</strong>, that is shared out through Samba. </span></p><p><span
style="background-color: #ffffff">Once you have the <strong>smb.conf</strong> file configured to suit your needs you are ready for the last steps.</span></p><p><span
style="background-color: #ffffff"><strong>Adding users</strong></span></p><p><span
style="background-color: #ffffff">This is the step that most people skip and wonder why Samba isn&#8217;t working. For every user that needs to log in to the Samba server you have to add them with the help of the <em>smbpasswd </em>command. Let&#8217;s say I need to add the user &#8220;pickles&#8221;. Â To add &#8220;pickles&#8221; I would issue the command:</span></p><p><span
style="background-color: #ffffff"><em>sudo smbpasswd -L -a pickles</em></span></p><p>Now to make sure the users is enabled issue the command:</p><p><em>sudo smbpasswd -L -e pickels</em></p><p>Now restart Samba with the command:</p><p><em>sudo /etc/init.d/samba restart</em></p><p>Your Samba file server should be ready to go. Go to your windows machine and the Share should be visible. Double click on that share you and you will enter the username and password combination for any one of the users on the machine (as long as they were also added with smbpasswd). If you can not see it make sure your Windows machine is set up on the Workgroup.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/09/04/set-up-your-new-ubuntu-server-as-a-samba-server/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Connecting Linux to a Bubba 2</title><link>http://www.ghacks.net/2009/05/03/connecting-linux-to-a-bubba-2/</link> <comments>http://www.ghacks.net/2009/05/03/connecting-linux-to-a-bubba-2/#comments</comments> <pubDate>Sun, 03 May 2009 14:08:02 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Hardware]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Music and Video]]></category> <category><![CDATA[Networks]]></category> <category><![CDATA[Online Services]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[Bubba 2]]></category> <category><![CDATA[DAAP]]></category> <category><![CDATA[file-sharing]]></category> <category><![CDATA[samba]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=12550</guid> <description><![CDATA[If you don&#8217;t know, the Bubba 2 is a piece of hardware, driven by the Linux operating system, created by ecXito. The Bubba 2 can stream media, serve files, share printers, and more. How? The Bubba 2 uses Samba to share out services and files. Because it uses Samba, connecting to the Bubba 2 is [...]]]></description> <content:encoded><![CDATA[<p>If you don&#8217;t know, the Bubba 2 is a piece of hardware, driven by the Linux operating system, created by <a
title="eXcito" href="http://www.excito.com" target="_blank">ecXito</a>. The Bubba 2 can stream media, serve files, share printers, and more. How? The Bubba 2 uses Samba to share out services and files. Because it uses Samba, connecting to the Bubba 2 is simple &#8211; that&#8217;s what Samba does best. But when you have a Linux machine you want to connect to the Bubba 2 you won&#8217;t find anything helpful in the manuals.</p><p>In fact even getting to the web-based administration screen isn&#8217;t easy from the Linux point of view. The instructions say point your browser to http://bubba and log in. When using a browser on Linux this will take you to search results for &#8220;bubba&#8221;. And the only mention of an IP address in the instructions is 192.168.10.1. Since my local network uses 192.168.1.x I couldn&#8217;t see the address. So what could I do? Let&#8217;s take a look.</p><p><span
id="more-12550"></span></p><div
id="attachment_12552" class="wp-caption alignleft" style="width: 283px"><a
href="http://www.ghacks.net/wp-content/uploads/2009/05/wireshark.png"><img
class="size-full wp-image-12552" src="http://www.ghacks.net/wp-content/uploads/2009/05/wireshark.png" alt="Figure 1" width="273" height="205" /></a><p
class="wp-caption-text">Figure 1</p></div><p>Once you have the Bubba 2 plugged in (the instructions are quite clear and simple for this step) your first task is to locate the IP address for the machine. For this I employed <a
title="Wireshark" href="http://www.wireshark.org/" target="_blank">Wireshark</a>. As you can see, in Figure 1, there is some external traffic (some of which is from Facebook &#8211; must look into that) but the IP address of interest is the .16 address. Since there is a lot of traffic coming from that address it is a safe bet that address is attached to the Bubba 2.</p><p>So I point my browser to 192.168.1.16 and voila!, the Bubba 2 network admin screen is up. Wireshark has done its job for the day.</p><p>Since the Bubba 2 can stream music there has to be a way to place music into the <strong>/home/storage/music</strong> folder. Any music in this folder will be served up via DAAP. Problem is, how to get it there? It took me a bit of time, but I found a solution.</p><p>The first thing to do is to log into the web admin tool. By default the user/password is admin/admin. You can change this to meet your needs of course. Log in as your admin and click on the Fileserver section. Here you can upload all the music you need. Problem is, you can only load one file at a time (you can&#8217;t load directories.) With over 15,000 music files to copy this wasn&#8217;t an option. My next attempt found me using FTP to transfer directories to the Bubba 2. This worked to a point. What I now had was a standard user with a directory full of music which could not be streamed. This lead me to my next problem: I couldn&#8217;t move the directories from the users ~/ directory to <strong>/home/storage/music</strong> because of permissions issues.</p><p>The work around came about with the help of an external USB hard drive. This is the same drive that contains my entire music collection. By connecting this drive to the Bubba 2 I was then able to copy the entire contents of this drive to the <strong>/home/storage/music</strong> directory which was then ready for streaming.</p><p><strong>Streaming to Linux</strong></p><div
id="attachment_12554" class="wp-caption alignright" style="width: 231px"><a
href="http://www.ghacks.net/wp-content/uploads/2009/05/rhythmbox.png"><img
class="size-full wp-image-12554" src="http://www.ghacks.net/wp-content/uploads/2009/05/rhythmbox.png" alt="Figure 2" width="221" height="173" /></a><p
class="wp-caption-text">Figure 2</p></div><p>The easiest method of listening to the music on the Bubba 2 is with a DAAP-enalbed piece of software. Out of the box Rhythmbox was able to connect to the stream. To do this you right click in an empty area of the left nav where a new menu will open (see Figure 2). In this new menu you will see an entry &#8220;Connect to DAAP share&#8221;. Select that and enter the IP address of your Bubba 2.</p><p>Shortly after you do this, your Shared library will populate with music from your Bubba 2. Listen away.</p><p><strong>Final Thoughts</strong></p><p>The Bubba 2 isn&#8217;t limited to only music streaming. You can share out printers and email as well. But when you&#8217;re having to connect from a Linux box, you might have to go through a few more steps than you would with either Windows or Mac. Even with these extra steps, it&#8217;s worth it. The Bubba 2 is an outstanding piece of hardware that makes sharing to small networks a snap.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/05/03/connecting-linux-to-a-bubba-2/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Auto mounting a Samba share in Linux</title><link>http://www.ghacks.net/2009/04/19/auto-mounting-a-samba-share-in-linux/</link> <comments>http://www.ghacks.net/2009/04/19/auto-mounting-a-samba-share-in-linux/#comments</comments> <pubDate>Sun, 19 Apr 2009 17:30:32 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Networks]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Tutorials Advanced]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[automount]]></category> <category><![CDATA[fstab]]></category> <category><![CDATA[samba]]></category> <category><![CDATA[samba share]]></category> <category><![CDATA[smbclient]]></category> <guid
isPermaLink="false">http://www.ghacks.net/2009/04/19/auto-mounting-a-samba-share-in-linux/</guid> <description><![CDATA[So you have that Samba server up and running and you can connect to it from Windows and Mac with ease. But when you turn to another Linux box that doesn&#8217;t have Konqueror, Nautilus, or Dolphin you can&#8217;t figure out the riddle of connecting. Or maybe you want to have this share mounted at boot [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://www.ghacks.net/wp-content/uploads/2009/04/logo-samba.gif"><img
class="alignleft size-full wp-image-12179" src="http://www.ghacks.net/wp-content/uploads/2009/04/logo-samba.gif" alt="logo-samba" width="200" height="103" /></a>So you have that Samba server up and running and you can connect to it from Windows and Mac with ease. But when you turn to another Linux box that doesn&#8217;t have Konqueror, Nautilus, or Dolphin you can&#8217;t figure out the riddle of connecting. Or maybe you want to have this share mounted at boot time? How do you manage it?</p><p>From the command line of course. Yes there are plenty of GUI tools that will allow you to connect to a Samba share easily, but they don&#8217;t help you set up anything to connect automatically. For that you will need to employ a few command line tools. But once it is finished, your system will be seamless.</p><p><span
id="more-12178"></span><strong>What you will need</strong></p><p>First I am going to assume you have your Samba server set up and you are able to connect to it from other machines. Outside of that you will need only one piece of software installed on your Linux machine: smbclient. This will be in your distributions&#8217; repositories so just open up your Add/Remove Software utility, search for smbclient, select it, and click Apply.</p><p>Once smbclient is installed you are ready to go.</p><p><strong>A test</strong></p><p>Let&#8217;s first test to make sure your Linux box can see the Samba share. You will need either sudo or root access to do this. Issue the command:</p><p>smbclient //IP_TO_SAMBA_SERVER/SHARE_NAME -U USERNAME</p><p>Where:</p><ul><li>IP_TO_SAMBA_SERVER is the IP address of your Samba server.</li><li>SHARE_NAME is the share you want to connect to.</li><li>USERNAME is the user name you connect to the share with.</li></ul><p>If all is well you should see something like this:</p><p><em>Enter wallenmusic&#8217;s password: </em><em></em></p><p><em>Domain=[MONKEYPANTZ] OS=[Unix] Server=[Samba 3.2.5]</em></p><p><em>smb: \&gt;</em></p><p>If you see that you can type <em>quit </em>and then hit the Enter key to escape this prompt.</p><p><strong>Setup</strong></p><p>The first thing you need to do is create a directory to mount the Samba share to. I created the directory <strong>/data<em> </em></strong>with the command:</p><p><em>sudo mkdir /data</em></p><p>Once that directory is created you can then mount it with the command:</p><p>mount -t smbfs -o username=USERNAME //IP_TO_SAMBA_SERVER/SAMBA_SHARE /data</p><p>Where:</p><ul><li>IP_TO_SAMBA_SERVER is the IP address of your Samba server.</li><li>SHARE_NAME is the share you want to connect to.</li><li>USERNAME is the user name you connect to the share with.</li></ul><p>Now if you check the <strong>/data</strong> directory you should see a listing of the contents of the Samba share.</p><p><strong>Automount</strong></p><p>Let&#8217;s make that share automount at boot. This will require editing your <strong>/etc/fstab</strong> file, adding an entry for this Samba share. In this file (again you will have to have either root or sudo access) you will add a line like this:</p><p><code>//IP_TO_SAMBA_SERVER/SAMBA_SHARE  /data smbfs username=USERNAME,password=PASSWORD, 0 0</code></p><p>Where:</p><ul><li>IP_TO_SAMBA_SERVER is the IP address of your Samba server.</li><li>SHARE_NAME is the share you want to connect to.</li><li>USERNAME is the user name you connect to the share with.</li><li>PASSWORD is the password for the Samba user</li></ul><p>Once that entry is saved unmount the <strong>/data </strong>directory with the command:</p><p>umount /data</p><p>so you can test your automount entry.</p><p>Now, enter the command:</p><p>mount -a</p><p>If there are no errors you should see the contents of the Samba share in the <strong>/data</strong> directory.</p><p>That&#8217;s it. Congratulations, you now have an automounted Samba share on your Linux machine.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/04/19/auto-mounting-a-samba-share-in-linux/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Get To Know Linux: Understanding smb.conf</title><link>http://www.ghacks.net/2009/02/06/get-to-know-linux-understanding-smbconf/</link> <comments>http://www.ghacks.net/2009/02/06/get-to-know-linux-understanding-smbconf/#comments</comments> <pubDate>Fri, 06 Feb 2009 21:16:56 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[domain]]></category> <category><![CDATA[file-sharing]]></category> <category><![CDATA[samba]]></category> <category><![CDATA[shares]]></category> <category><![CDATA[smb.conf]]></category> <category><![CDATA[workgroup]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=10373</guid> <description><![CDATA[Next to the xorg.conf file (read my Get To Know Linux: Understanding xorg.conf for more) the smb.conf file might be the most misunderstood of all files. Part of the reason for this is because the default file is, well, rather large and confusing. When you compare what you need vs what you have (in the [...]]]></description> <content:encoded><![CDATA[<p>Next to the xorg.conf file (read my <a
title="Get To Know Linux: Understanding xorg.conf" href="http://www.ghacks.net/2009/02/04/get-to-know-linux-understanding-xorgconf/" target="_blank">Get To Know Linux: Understanding xorg.conf for more</a>) the smb.conf file might be the most misunderstood of all files. Part of the reason for this is because the default file is, well, rather large and confusing. When you compare what you <strong>need</strong> vs what you <strong>have</strong> (in the default at least), you will be surprised at how simple Samba can be to configure.</p><p>After Samba is installed the smb.conf file will be around 533 lines long. Fear not. It&#8217;s much easier than it seems.</p><p><span
id="more-10373"></span></p><p>The smb.conf file is broken into sections. Each section will start with a line that looks like:</p><p>[TITLE]</p><p>Where TITLE is the actual title of the block. Each block represents either a configuration or aÂ  share that other machines can connect to. You will, at minimum, have a global block and a single share.</p><p><strong>Global</strong></p><p>The global block is one of the more important blocks in your smb.conf file. This block defines the global configuration of your Samba server. This block begins with:</p><p><em>[global]</em></p><p>Within your blocks your configuration lines will be made up of:</p><p><em>option = value</em></p><p>statements.</p><p>The most important statements you will need in your global block are:<br
/> <code>netbios name= NAME<br
/> workgroup = WORKGROUP_NAME<br
/> security = SECURITY_TYPE<br
/> encrypt passwords = YES/NO<br
/> smb passwd file = /path/to/smbpasswd<br
/> interfaces = ALLOWED_ADDRESSES<br
/> </code><br
/> The values for each option above should be self explanatory. But there is one thing to note. If you are encrypting passwords you will need to add users (with passwords) with the smbpasswd command.<br
/> Within the global block one of the more important options is the security option. This option refers to authentication (how users will be able to log in). There are five different types of security:</p><ul><li> ADS &#8211; Active Directory Domain</li><li> Domain &#8211; User verification through NT Primary or Backup Domain</li><li> Server &#8211; Samba server passes on authentication to another server</li><li> Share &#8211; Users do not have to enter username or password (until they try to access a specific directory)</li><li> User &#8211; Users must provide valid username/password. This is the default.</li></ul><p><strong>Share Blocks</strong></p><p>The next blocks will refer to individual shares. You will need a different block for each directory you want to share to Samba users. A typical share block will look like this:<br
/> <code>[SHARE NAME]<br
/> comment = COMMENT<br
/> path = /path/to/share<br
/> writeable = YES/NO<br
/> create mode = NUMERIC VALUE<br
/> directory mode = NUMERIC VALUE<br
/> locking = YES/NO</code></p><p>Everything in caps above will be defined according to your needs. The tricky entries will be the create and directory modes. What this does is define permissions for any file created as well as the share directories. So the values will be in the form of 0700 or 0600 (depending upon your permission needs). Remember, you will need a share block for every directory you want to share out.</p><p>Naturally there are plenty of options that can be used in Samba. Many of these options will fall in the global block.</p><p><strong>Printer Block</strong></p><p>You can also define a block to share out printers. This block will start with:</p><p>[printers]</p><p>and will contain options like:<br
/> <code>comment = COMMENT<br
/> path = /PATH/TO/PRINTER/SPOOL<br
/> browseable = YES/NO<br
/> guest ok = YES/NO<br
/> writable = YES/NO<br
/> printable = YES/NO<br
/> create mode = NUMERIC VALUE</code></p><p><strong>Sample smb.conf</strong></p><p>I have an external drive that I mount to <strong>/media/music</strong> and I share out to my home network with the following <strong>smb.conf </strong>file:<br
/> <code>[global]<br
/> netbios name = MONKEYPANTZ<br
/> workgroup = MONKEYPANTZ<br
/> security = user<br
/> encrypt passwords = yes<br
/> smb passwd file = /etc/samba/smbpasswd<br
/> interfaces = 192.168.1.1/8<br
/> [wallen music]<br
/> comment = Music Library<br
/> path = /media/music<br
/> writeable = yes<br
/> create mode = 0600<br
/> directory mode = 0700<br
/> locking = yes<br
/> </code><br
/> And that&#8217;s it. That is my entire <strong>smb.conf</strong> file. Granted I am only sharing out a single directory, but it shows how simple <strong>smb.conf</strong> can be to configure.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/02/06/get-to-know-linux-understanding-smbconf/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> </channel> </rss>
