Setting up a Samba share for CIFS-based Development Environment

Medical Technology, Healthcare & Government IT

.
Categories
Category Groups

Installing and configuring a samba share for Windows development

Assume you have a linux user ‘prime’ and you want to create a smb share called ‘prime’ to point to the
home directory so that you can edit files in that directory from Windows.

Install samba:

sudo apt-get install -y samba

Create an smb password for user ‘prime’ (what you’ll use to mount the drive from Windows)

sudo smbpasswd -a prime

Add a share called ‘prime’ to the samba config:

sudo cp -rv /etc/samba/smb.conf "/tmp/smb-backup-`date`.conf"
sudo vim /etc/samba/smb.conf

Here’s the text you’ll add to the end of the smb.conf file:

[prime]
path = /home/prime
available = yes
valid users = prime
read only = no
browsable = yes
public = yes
writable = yes

Save the file and then test and restart smb:

sudo testparm
sudo restart smbd
Original Link

Leave a Reply