<?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; smb.conf</title>
	<atom:link href="http://www.ghacks.net/tag/smbconf/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 11:26:04 +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>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>
