<?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 server</title> <atom:link href="http://www.ghacks.net/tag/samba-server/feed/" rel="self" type="application/rss+xml" /><link>http://www.ghacks.net</link> <description>A technology news blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description> <lastBuildDate>Sat, 11 Feb 2012 17:32:23 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/> <item><title>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> </channel> </rss>
