Basic Samba Setup In Ubuntu 8.10 Intrepid Ibex

By Jonathan Moeller - Last updated: Sunday, December 14, 2008 - Save & Share - 17 Comments

My most popular post ever is the one I wrote back in May explaining how to do basic Samba filesharing setup in Ubuntu 8.04 Hardy Heron. Now Ubuntu 8.10 Intrepid Ibex has come out, which means it’s time for a post explaining how to do basic Samba setup for 8.10.

First, you’ll need to go to a Terminal window and install Samba:


sudo apt-get install samba

Follow the default prompts to install Samba. Once Samba is installed, you’ll need to create a Samba password for yourself with this command:

sudo smbpasswd -a USERNAME

(USERNAME, of course, is your actual username.)

Type a suitably strong password (make sure it includes uppercase, lowercase, punctuation, and numbers). Once your password is created, the next step is to edit your /etc/samba/smb.conf file, the configuration file for Samba. Begin by creating a folder named ‘test’ on your home folder; we’ll use that for our test shared folder:

mkdir /home/USERNAME/test

Next, make a safe backup copy of the original smb.conf file to your home folder, in case you make an error:

sudo cp /etc/samba/smb.conf ~

Now use your text editor of choice to edit smb.conf:

sudo gedit /etc/samba/smb.conf

(New users will probably find gedit the easiest to use due to its GUI; but you can use emacs or vi just as readily, especially if you’re in an environment that doesn’t use X11.)

Once smb.conf has loaded, add this to the very end of the file:

[test]
path = /home/USERNAME/test
available = yes
valid users = USERNAME
read only = no
browsable = yes
public = yes
writable = yes

(There should be no spaces between the lines, and note also that there should be a single space both before and after each of the equal signs.)

These settings will share the test folder we created earlier, and give your username and your username alone permission to read and write to the folder. Once you have input the changes, save smb.conf, exit the text editor, and restart Samba with  this command:

sudo /etc/init.d/samba restart

Once Samba has restarted, use this command to check that your smb.conf doesn’t contain any syntax errors:

testparm

If you pass the testparm command, Samba should be working; try accessing the shared folder from another computer on your LAN.

-JM

UPDATE: Commentator Michael de Silva informs us that Samba will not actually install on an unpatched Ubuntu 8.10 system. Be sure to install the available updates before installing Samba.

Posted in Linux • • Top Of Page

17 Responses to “Basic Samba Setup In Ubuntu 8.10 Intrepid Ibex”

Comment from Spike Burch
Time December 14, 2008 at 8:34 pm

So why doesn’t the GUI tool they provide for sharing work?

Comment from Jonathan Moeller
Time December 14, 2008 at 8:39 pm

Dunno. I’ve always preferred to do it via a terminal anyway.

Comment from Michael de Silva
Time December 21, 2008 at 2:50 am

Thanks Jonathan for this little guide. You might want to edit it to include this bit of info though. I just installed 8.10 and found that ‘apt-get install samba’ gave me a cryptic error.

I proceeded to add the third-party repos in Synaptic Manager, apt-get update, apt-get dist-upgrade.

About 6-7 hours later after all of this was done, Samba installed flawlessly :) Thanks once again!

Cheers
Mike

Comment from Jonathan Moeller
Time December 21, 2008 at 9:02 am

Michael de Silva:

Thanks! I didn’t run into that problem since I ran all the updates before I tried to install Samba. I’ll update the post to reflect that.

Comment from Tze Lin Ong
Time December 23, 2008 at 7:16 am

Thanks for this handy little guide!

BTW the password command should be ’smbpasswd’, not ’smbpassword’.

Comment from Jonathan Moeller
Time December 23, 2008 at 9:58 am

Tze Lin Ong:

Thanks for catching that!

Pingback from Compartir archivos Mac OS X – Ubuntu « Tuxlink
Time January 17, 2009 at 8:24 pm

[...] Basic Samba Setup In Ubuntu 8.10 Intrepid Ibex Tags: Aplicaciones, Mac OS X, Tutoriales, Ubuntu [...]

Comment from Guilherme Peri
Time January 25, 2009 at 12:51 am

Thank you very much for your tutorial.

Comment from John Lawrence
Time February 10, 2009 at 6:49 am

Thank you for the guide. Some more on passwords would be appreciated. I can see ‘test’ on my XP box but it asks for a password to connect. Neither my Ubuntu logon or smb passwords work.

Comment from David
Time February 19, 2009 at 9:12 am

I tried this guide and it worked good for what I needed. I wanted to share my printer connected to my Ubuntu Box with my XP machine. Thanks.

While I was trying to browse the test folder, I couldn’t access it with my Samba password or my login password though.

thanks
David

Comment from David
Time February 19, 2009 at 9:17 am

I figured it out, works great now.

forgot to change “sudo smbpasswd -a USERNAM” to fit my username.

Comment from Peter
Time March 10, 2009 at 7:42 pm

Thank you so much for this tutorial. I’m already trying installing Samba during 2 days and no luck. Now I did it in only 10 minutes and works great ! I can do filesharing from XP and Vista PC’s to Linux and visa versa. Finally !!! Thanks again, Jonathan.

Comment from Tom
Time March 27, 2009 at 12:06 pm

Great! That worked perfectly. Only, how can I see my windows files on my ubuntu machine?

Comment from jorge
Time April 5, 2009 at 1:01 pm

muchas gracias, el tutorial esta muy sencillo y eficiente. Saludos

Comment from oihu
Time April 20, 2009 at 9:49 am

Nice HowTo. Thanks for sharing!

Pingback from Ubuntu Intrepid 8.10 Quickstart | 42klines
Time April 29, 2009 at 5:24 am

[...] the guest. A typical Samba setup is described here. If you need a simpler no frills setup, find it here. The first link worked for me within a couple of [...]

Comment from rjbelandres
Time May 5, 2009 at 10:25 pm

Great Work.. Thanks

Write a comment