↑ Top
dev studios
| Sign in | DE EN

Create a Windows share on Linux

with Samba on Ubuntu or Debian systems

In order to exchange files between Linux and Windows systems over the network you need to create a Samba SMB/CIFS share.

Install Samba if it isn't already installed

apt-get update && apt-get install samba samba-common-bin

Create a Samba user

useradd -s /bin/false smbuser
smbpasswd -a smbuser

Create the shared folder

mkdir /mnt/smbdata
chmod 777 /mnt/smbdata

Edit the Samba config to your needs like this example

nano /etc/samba/smb.conf

workgroup = WORKGROUP
security = user

       path = /mnt/smbdata
       valid users = smbuser
       browsable = yes
       read only = No
       create mask = 0777
       directory mask = 0777

Restart Samba with

service smbd restart


/etc/init.d/samba restart

See also

(Edited 28-02-19)