SMB shares can be created either with UI on a desktop version or command line on a server installation. You can use this shares both on Linux stations and Windows boxes as well. We are going to create editors group and add current user to this group. Share location is under /data folder which is owner by editors group who’s participants can read and write to this shares folders.
sudo apt-get install samba -y # edit /etc/samba/smb.conf and set your workgroup name # ... sudo mkdir /data sudo groupadd editors sudo usermod -aG editors $USER # current user sudo chgrp -R editors /data sudo chmod -R g+rw /data
Now once again edit smb.conf file to add a share configuration:
[DATA] path = /data valid users = @editors browsable = yes writable = yes read only = no
Restart smbd service:
sudo systemctl restart smbd
And the last thing is to map system users to SMB users:
sudo smbpasswd -a SOMEUSER sudo smbpasswd -e SOMEUSER