smb.conf

 

Simple settings for samba.
2 shares: open access and private access.
1. create user with name username
2. create group with name groupname
3. add user to group
4. smbpasswd -c /etc/samba/smb.conf -a username
5. edit smb.conf

[global]
dos charset = CP866
netbios name = DOCS_SRV
map to guest = Bad User
syslog only = Yes
deadtime = 15
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192
SO_SNDBUF=8192
show add printer wizard = No
dns proxy = No
hosts allow = 127.0.0.1, 172.24.0.192/26, 10.0.0.90
max connections = 100
[data]
comment = Общий каталог
path = /usr/samba/DOCS_SRV/DATA
read only = No
create mask = 0666
force create mode = 0666
directory mask = 0777
force directory mode = 0777
guest ok = Yes
mangled names = No
[tech]
comment = ТехУчет
path = /usr/samba/DOCS_SRV/TECH
write list = @groupname
force group = +groupname
create mask = 0660
force create mode = 0660
directory mask = 0770
force directory mode = 0770
mangled names = No

6. chown username:groupname /usr/samba/DOCS_SRV/TECH
7. /etc/init.d/samba reload