Настройка Samba

Конфиг samba-сервера

[global]
workgroup = local
netbios name = baza
server string = baza
bind interfaces only = yes
;interfaces = eth0 192.168.1.5 192.168.1.1 127.0.0.1
;hosts deny = ALL
;hosts allow = 192.168.1.1 192.168.1.5 127.0.0.1
printcap name = /etc/printcap
;printing = cups
;cups options = raw
log file = /var/log/samba/log.smbd
max log size = 50
debug level = 5
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
;local master = yes
;preferred master = yes
;domain master = no
wins support = no
dns proxy = no
guest ok = yes
guest account = nobody
unix charset = utf8
dos charset = cp866
display charset = cp866

[storage]
path = /media/storage
writable = yes
guest ok = no
valid users = r-asian
create mask = 0664
directory mask = 0775
read only = no

Монтирование samba-шары

Пропишем на монтирующей машине в /etc/fstab

//baza.local/storage    /mnt/storage    cifs    iocharset=utf8,codepage=cp866,username=***,password=***,uid=1000,gid=1000 0 0

Где //baza.local/storage — имя хоста и расшаренного каталога

Для такого монтированиея пакет cifs-utils должен быль установлен

# apt-get install cifs-utils

Добавить комментарий