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!

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

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