Setting up a samba-server

From Alpine Linux
Revision as of 06:16, 1 November 2015 by Cstrouse (talk | contribs) (adding samba howto initial content)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Install packages:

apk add samba samba-common-tools

Create a share directory

This will be the directory that's shared to clients. You can create as many of these as you wish.

mkdir /media/storage

chmod 0770 /media/storage

Create smb.conf

Alpine doesn't provide an example configuration file in the package so you'll need to create one. If you have more than one share you'll need to add a subsection for each directory to smb.conf.

   workgroup = WORKGROUP
   dos charset = cp850
   unix charset = ISO-8859-1
   force user = username

   browseable = yes
   writeable = yes
   path = /media/storage

Create a system user and Samba user

Create a user on the system. Create a Samba user. Give both users the same password.

adduser username

smbpasswd -a username

Configure the Samba service

Run these two commands to start the service on boot and to start the service right now.

rc-update add samba

rc-service samba start