Configuring Samba to share with Windows

I’ve had several headaches trying to configure samba to work properly with windows without being prompted to login every time I tried to access my share. This post should help those in need of accomplishing the same.

First we need to install samba using your native package management system

sudo apt-get install samba

Before we get started, let’s make a backup of the original config.

sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.bak

Now, there a few things you will want to know.

  • path point - the directory you want to share.
  • share name - essentially a network alias for our path.
  • workgroup - should match the windows machine your attempting to share with
  • netbios name – the hostname we want to use for our share.

Once we have that, we can implement our own config

sudo nano /etc/samba/smb.conf

If you’re using PuTTy you can simply copy and paste this

[global]
workgroup = MSHOME
netbios name = media
wins support = yes
os level = 64
guest account = nobody
security = share

[movies]
path = /media/hdd1/Movies
writeable = yes
browseable = yes
guest ok = yes
guest account = nobody
public = yes

Now simply save and exit, then restart samba

sudo /etc/init.d/samba restart

done!

now we should be able to access the share from our windows machine

\\media\movies

Originally published at seanwragg.com on March 18, 2009.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.