Skip to content

Instantly share code, notes, and snippets.

@whatyouhide
Last active November 22, 2016 21:29
Show Gist options
  • Save whatyouhide/eb8193ca24e93baeeace to your computer and use it in GitHub Desktop.
Save whatyouhide/eb8193ca24e93baeeace to your computer and use it in GitHub Desktop.
Home server

Setting up Samba

First, install Samba:

sudo apt-get install samba

Now, you have to setup Samba to be accessed only by your user (that we'll call whatyouhide). First, be sure that the whatyouhide Unix user exists. Then, set a Samba password for it:

sudo smbpasswd -a whatyouhide

You can now add all the shares you want and restrict them to the whatyouhide Samba user. In /etc/samba/smb.conf:

[hard-drives]
   comment = All hard drives
   path = /mnt
   read only = no
   writeable = yes
   browseable = yes
   valid users = whatyouhide
   create mask = 0755
   directory mask = 0755

Restart the Sambda daemon and you're done.

sudo service smbd restart

These steps are taken from this AskUbuntu answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment