Setup Samba Shares on Ubuntu Server 10.04

First install Samba (all commands should be preceded with sudo, but for the sake of readability it is ommitted):

johndoe@server:~$ apt-get install samba

Then modify the config file in /etc/samba/smb.conf by changing the workgroup to yours (workgroup = YOUR_WORKGROUP) and uncommenting security = user.

Now create a share:

comment = A comment about this share
valid users = USER
hide files = /lost+found/
read only = No
browsable = Yes
writable = Yes

All options are explained in the smb.conf man(5) page.

I think a samba user does not necessarily need a UNIX account, but I usually create one to chown dedicated shares.

johndoe@server:~$ adduser --no-create-home --disabled-login USER
johndoe@server:~$ usermod -p PASS USER

According to Google UNIX Samba passwords should stay in sync, but that didn’t work out for me. So set the user password again:

johndoe@server:~$ smbpasswd -a USER

Now restart the server (service smbd restart) and point the Explorer to your machines IP. That’s all folks. 😉


  1. Thanks for publishing this awesome article. I’m a long time reader
    but I’ve never been compelled to leave a comment. I subscribed to your
    blog and shared this on my Facebook. Thanks again for this great

  1. May 29th, 2011

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: