Установка samba будет производиться на OpenSuSE 11.4:
Необходимо открыть порты 137-139
zypper in samba
Добавим пользователя системы:
useradd -d /opt/inet/ -s /sbin/nologin inet
Добавим пользователя samba:
smbpasswd -a inet
Отключение Novell AppArmor:
yast2-Novell AppArmor-AppArmor Control Panel-Configure Profile Modes-[Configure]-usr.sbin.smbdusr.sbin.nmbd -[Toggle Mode]
Дадим права на папку /opt/inet нашему samba пользователю:
chown -R inet: /opt/inet/
Конфигурационный файлы для настройки samba: /etc/samba/smb.conf:
[global]
workgroup = WORKGROUP
netbios name = fileserver
server string = File Server
loglevel = 3
encrypt passwords = yes
passdb backend = smbpasswd
# security = share
security = user
# Разрешаем доступ только из внутренней сети
hosts allow = 192.168.0.0/24
hosts deny = all
write raw = yes
socket options = TCP_NODELAY IPTOS_LOWDELAY
unix charset = UTF-8
dos charset = cp1251
store dos attributes = yes
local master = no
time server = no
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
wins support = No
[inet]
path = /opt/inet
write list = inet
valid users = inet
printable = no
public = No
browseable = Yes
writable = Yes
read only = No
workgroup = WORKGROUP
netbios name = fileserver
server string = File Server
loglevel = 3
encrypt passwords = yes
passdb backend = smbpasswd
# security = share
security = user
# Разрешаем доступ только из внутренней сети
hosts allow = 192.168.0.0/24
hosts deny = all
write raw = yes
socket options = TCP_NODELAY IPTOS_LOWDELAY
unix charset = UTF-8
dos charset = cp1251
store dos attributes = yes
local master = no
time server = no
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
wins support = No
[inet]
path = /opt/inet
write list = inet
valid users = inet
printable = no
public = No
browseable = Yes
writable = Yes
read only = No
Запускаем сервисы samba и NetBIOS:
/etc/init.d/smb start
/etc/init.d/nmb start
/etc/init.d/nmb start
Добавим сервисы в автозагрузку:
chkconfig -a smb
chkconfig -a nmb
chkconfig -a nmb
Проверяем: в windows заходим \IP: