Configuring Samba to share with Windows

Sean Wragg
Mar 18, 2009 · 1 min read

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

sean3z

Code, Comics, and Fhqwhgads!

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store