December 3, 2014

samba setup with group

create smb-users group

sudo addgroup smb-users sudo chgrp -R smb-users /disk2/data

create user
useradd -c “name” username

add a current user to smb-users
sudo usermod -a -G smb-users someuser

set a samba password
smbpasswd -a username

Samba config file
**add this to /etc/samba/smb.conf **

[global] 
workgroup = HOME 
netbios name = SAMBA 
server string = Samba Server %v 
map to guest = Bad User 
log file = /var/log/samba/log.%m 
max log size = 50 
socket options = IPTOSLOWDELAY TCPNODELAY 
preferred master = No 
local master = No 
dns proxy = No 
security = User 

[mydata] 
path = /path/to/mydata 
valid users = @smb-users 
read only = No 
create mask = 0777 
directory mask = 0777
DigitalOcean Referral Badge
Keep my site online & receive a $200 60-day credit at DigitalOcean for your VPS Hosting
Cheaper Games on Instant-Gaming
Creative Commons Licence