<?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 &#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 blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description>
	<lastBuildDate>Tue, 24 Nov 2009 16:29:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<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[Tutorials Advanced]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[software]]></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>

	Tags: <a href="http://www.ghacks.net/tag/gnome/" title="GNOME" rel="tag">GNOME</a>, <a href="http://www.ghacks.net/tag/samba/" title="samba" rel="tag">samba</a>, <a href="http://www.ghacks.net/tag/samba-shares/" title="samba shares" rel="tag">samba shares</a>, <a href="http://www.ghacks.net/tag/smbconf/" title="smb.conf" rel="tag">smb.conf</a>, <a href="http://www.ghacks.net/tag/smbclient/" title="smbclient" rel="tag">smbclient</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/09/04/set-up-your-new-ubuntu-server-as-a-samba-server/" title="Set up your new Ubuntu Server as a Samba Server (September 4, 2009)">Set up your new Ubuntu Server as a Samba Server</a> (3)</li>
	<li><a href="http://www.ghacks.net/2009/02/06/get-to-know-linux-understanding-smbconf/" title="Get To Know Linux: Understanding smb.conf (February 6, 2009)">Get To Know Linux: Understanding smb.conf</a> (3)</li>
	<li><a href="http://www.ghacks.net/2009/04/19/auto-mounting-a-samba-share-in-linux/" title="Auto mounting a Samba share in Linux (April 19, 2009)">Auto mounting a Samba share in Linux</a> (5)</li>
	<li><a href="http://www.ghacks.net/2009/11/24/walk-through-installation-of-opensuse-11-2/" title="Walk-through installation of OpenSuSE 11.2 (November 24, 2009)">Walk-through installation of OpenSuSE 11.2</a> (0)</li>
	<li><a href="http://www.ghacks.net/2009/04/03/simple-gnome-note-taking-with-tomboy/" title="Simple GNOME Note Taking with Tomboy (April 3, 2009)">Simple GNOME Note Taking with Tomboy</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/11/04/connect-to-your-samba-server-from-linux/feed/</wfw:commentRss>
		<slash:comments>4</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[Tutorials Advanced]]></category>
		<category><![CDATA[Tutorials Basic]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[software]]></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 (&#8221;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.
In [...]]]></description>
			<content:encoded><![CDATA[<p>I recently did an illustrated guide to installing Ubuntu Server 9.04 (&#8221;<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>

	Tags: <a href="http://www.ghacks.net/tag/file-sharing/" title="file-sharing" rel="tag">file-sharing</a>, <a href="http://www.ghacks.net/tag/samba/" title="samba" rel="tag">samba</a>, <a href="http://www.ghacks.net/tag/samba-server/" title="samba server" rel="tag">samba server</a>, <a href="http://www.ghacks.net/tag/smbconf/" title="smb.conf" rel="tag">smb.conf</a>, <a href="http://www.ghacks.net/tag/ubuntu/" title="ubuntu" rel="tag">ubuntu</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/02/06/get-to-know-linux-understanding-smbconf/" title="Get To Know Linux: Understanding smb.conf (February 6, 2009)">Get To Know Linux: Understanding smb.conf</a> (3)</li>
	<li><a href="http://www.ghacks.net/2009/05/03/connecting-linux-to-a-bubba-2/" title="Connecting Linux to a Bubba 2 (May 3, 2009)">Connecting Linux to a Bubba 2</a> (4)</li>
	<li><a href="http://www.ghacks.net/2009/11/04/connect-to-your-samba-server-from-linux/" title="Connect to your Samba server from Linux (November 4, 2009)">Connect to your Samba server from Linux</a> (4)</li>
	<li><a href="http://www.ghacks.net/2008/07/28/you-are-sharing-files/" title="You Are Sharing Files (July 28, 2008)">You Are Sharing Files</a> (4)</li>
	<li><a href="http://www.ghacks.net/2009/10/30/with-ubuntu-9-10-arrives-wubi-9-10/" title="With Ubuntu 9.10 Arrives Wubi 9.10 (October 30, 2009)">With Ubuntu 9.10 Arrives Wubi 9.10</a> (2)</li>
</ul>

]]></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>3</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 <a href="http://www.ghacks.net/2009/10/17/facebook-login/">Facebook</a> &#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>

	Tags: <a href="http://www.ghacks.net/tag/bubba-2/" title="Bubba 2" rel="tag">Bubba 2</a>, <a href="http://www.ghacks.net/tag/daap/" title="DAAP" rel="tag">DAAP</a>, <a href="http://www.ghacks.net/tag/file-sharing/" title="file-sharing" rel="tag">file-sharing</a>, <a href="http://www.ghacks.net/tag/linux/" title="Linux" rel="tag">Linux</a>, <a href="http://www.ghacks.net/tag/samba/" title="samba" rel="tag">samba</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/02/06/get-to-know-linux-understanding-smbconf/" title="Get To Know Linux: Understanding smb.conf (February 6, 2009)">Get To Know Linux: Understanding smb.conf</a> (3)</li>
	<li><a href="http://www.ghacks.net/2009/09/04/set-up-your-new-ubuntu-server-as-a-samba-server/" title="Set up your new Ubuntu Server as a Samba Server (September 4, 2009)">Set up your new Ubuntu Server as a Samba Server</a> (3)</li>
	<li><a href="http://www.ghacks.net/2009/04/19/auto-mounting-a-samba-share-in-linux/" title="Auto mounting a Samba share in Linux (April 19, 2009)">Auto mounting a Samba share in Linux</a> (5)</li>
	<li><a href="http://www.ghacks.net/2008/07/28/you-are-sharing-files/" title="You Are Sharing Files (July 28, 2008)">You Are Sharing Files</a> (4)</li>
	<li><a href="http://www.ghacks.net/2008/02/07/yoggie-pico-personal-mobile-security-computer/" title="Yoggie PICO Personal Mobile Security Computer (February 7, 2008)">Yoggie PICO Personal Mobile Security Computer</a> (3)</li>
</ul>

]]></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>

	Tags: <a href="http://www.ghacks.net/tag/automount/" title="automount" rel="tag">automount</a>, <a href="http://www.ghacks.net/tag/fstab/" title="fstab" rel="tag">fstab</a>, <a href="http://www.ghacks.net/tag/linux/" title="Linux" rel="tag">Linux</a>, <a href="http://www.ghacks.net/tag/samba/" title="samba" rel="tag">samba</a>, <a href="http://www.ghacks.net/tag/samba-share/" title="samba share" rel="tag">samba share</a>, <a href="http://www.ghacks.net/tag/smbclient/" title="smbclient" rel="tag">smbclient</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/01/03/understanding-linux-etcfstab/" title="Understanding Linux /etc/fstab (January 3, 2009)">Understanding Linux /etc/fstab</a> (7)</li>
	<li><a href="http://www.ghacks.net/2009/02/06/get-to-know-linux-understanding-smbconf/" title="Get To Know Linux: Understanding smb.conf (February 6, 2009)">Get To Know Linux: Understanding smb.conf</a> (3)</li>
	<li><a href="http://www.ghacks.net/2009/05/03/connecting-linux-to-a-bubba-2/" title="Connecting Linux to a Bubba 2 (May 3, 2009)">Connecting Linux to a Bubba 2</a> (4)</li>
	<li><a href="http://www.ghacks.net/2009/11/04/connect-to-your-samba-server-from-linux/" title="Connect to your Samba server from Linux (November 4, 2009)">Connect to your Samba server from Linux</a> (4)</li>
	<li><a href="http://www.ghacks.net/2008/02/07/yoggie-pico-personal-mobile-security-computer/" title="Yoggie PICO Personal Mobile Security Computer (February 7, 2008)">Yoggie PICO Personal Mobile Security Computer</a> (3)</li>
</ul>

]]></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[Tutorials Basic]]></category>
		<category><![CDATA[software]]></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>

	Tags: <a href="http://www.ghacks.net/tag/domain/" title="domain" rel="tag">domain</a>, <a href="http://www.ghacks.net/tag/file-sharing/" title="file-sharing" rel="tag">file-sharing</a>, <a href="http://www.ghacks.net/tag/linux/" title="Linux" rel="tag">Linux</a>, <a href="http://www.ghacks.net/tag/samba/" title="samba" rel="tag">samba</a>, <a href="http://www.ghacks.net/tag/shares/" title="shares" rel="tag">shares</a>, <a href="http://www.ghacks.net/tag/smbconf/" title="smb.conf" rel="tag">smb.conf</a>, <a href="http://www.ghacks.net/tag/workgroup/" title="workgroup" rel="tag">workgroup</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/09/04/set-up-your-new-ubuntu-server-as-a-samba-server/" title="Set up your new Ubuntu Server as a Samba Server (September 4, 2009)">Set up your new Ubuntu Server as a Samba Server</a> (3)</li>
	<li><a href="http://www.ghacks.net/2009/05/03/connecting-linux-to-a-bubba-2/" title="Connecting Linux to a Bubba 2 (May 3, 2009)">Connecting Linux to a Bubba 2</a> (4)</li>
	<li><a href="http://www.ghacks.net/2009/11/04/connect-to-your-samba-server-from-linux/" title="Connect to your Samba server from Linux (November 4, 2009)">Connect to your Samba server from Linux</a> (4)</li>
	<li><a href="http://www.ghacks.net/2009/04/19/auto-mounting-a-samba-share-in-linux/" title="Auto mounting a Samba share in Linux (April 19, 2009)">Auto mounting a Samba share in Linux</a> (5)</li>
	<li><a href="http://www.ghacks.net/2008/07/28/you-are-sharing-files/" title="You Are Sharing Files (July 28, 2008)">You Are Sharing Files</a> (4)</li>
</ul>

]]></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>
