# Глобальные настройки Samba [global] # workgroup = Имя домена NT или групы workgroup = OFFICE # Каментарии сервера server string = Samba Server # Имя сервера в сети Windows netbios name = DIDOCHKA # Интерфейсы на которые должна вешаться SAMBA interfaces = 192.168.1.1/24 127.0.0.1/32 # Привязка только к этим интерфейсам bind interfaces only = yes # Хосты с которых розрешон доступ к серверу Samba hosts allow = 192.168.1 127.0.0.1 # # Задает локаль для диска Linux (запись имен файлов) character set = KOI8-R # Указывает кодовою страницу для клиентов client code page = 866 log level = 2 # Место для записи логов log file = /var/log/samba/log.%m # Максимальный розмер файла лога в Kb max log size = 50 # Уровень securit может быть user, server, share security = user # Применять шыфрованые пароли encrypt passwords = yes update encrypted = Yes # Файл с паролями Samba smb passwd file = /etc/samba/smbpasswd unix password sync = Yes passwd program = /usr/bin/passwd %u passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully* # Установка атребутов файла по умолчанию # map hidden = yes map archive = yes # map system = yes # Файл соответствия пользователей Unix и Samba username map = /etc/samba/smbusers socket options = SO_KEEPALIVE SO_BROADCAST TCP_NODELAY SO_RCVBUF=4096 SO_SNDBUF=4096 # Уровень Samba в борьбе за мастер броузер (255 наивысший) os level = 33 local master = yes domain master = yes preferred master = no # Розрешить логинится Windows машинам как в домен NT domain logons = yes # Скрипты которые выполняются при лигине на Samba как домен ; logon script = %m.bat ; logon script = %U.bat ; logon path = \\%L\Profiles\%U # Порядок поиска Windows машин в сети name resolve order = wins lmhosts bcast # Розрешить WINS (помогает когда машинки не видны в сети) wins support = yes # Учетная запись гостя guest account = nobody # WINS Server - Tells the NMBD components of Samba to be a WINS Client # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both # Указать WINS сервер для Samba (когда она является WINS то указывать не надо) wins server = 192.168.1.1 ; wins proxy = yes # DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names # via DNS nslookups. The built-in default for versions 1.9.17 is yes, # this has been changed in version 1.9.18 to no. dns proxy = yes ; preserve case = no ; short preserve case = no # Default case is normally upper case for all DOS files ; default case = lower # Be very careful with case sensitivity - it can break things! ; case sensitive = no # preexec close = Yes # Розрешить гостевой акаутн guest ok = Yes # wtmp dir = /var/samba/vas # utmp dir = /var/samba/vas #============================ Share Definitions ============================== [homes] comment = Home Directories browseable = no writable = yes [myfolder] comment = Doc folder path = /usr/samba/mount/myfolder valid users = vnc public = no writable = yes printable = no write list = @vnc create mask = 2770 directory mask =2770# # Un-comment the following and create the netlogon directory for Domain Logons # [netlogon] # comment = Network Logon Service # path = /usr/samba/netlogon # guest ok = yes # writable = no # share modes = no# # Un-comment the following to provide a specific roving profile share # the default is to use the user's home directory ;[Profiles] ; path = /home/profiles ; browseable = no ; guest ok = yes # NOTE: If you have a BSD-style print system there is no need to # specifically define each individual printer ;[printers] ; comment = All Printers ; path = /var/spool/samba ; browseable = no # Set public = yes to allow user 'guest account' to print # guest ok = no # writable = no # printable = yes # This one is useful for people to share files #[tmp] # comment = Temporary file space # path = /tmp # read only = no # public = yes # A publicly accessible directory, but read only, except for people in # the "staff" group ;[public] ; comment = Public Stuff ; path = /home/samba ; public = yes ; read only = yes ; write list = @staff # Other examples. # # A private printer, usable only by fred. Spool data will be placed in fred's # home directory. Note that fred must have write access to the spool directory, # wherever it is. ;[fredsprn] ; comment = Fred's Printer ; valid users = fred ; path = /homes/fred ; printer = freds_printer ; public = no ; writable = no ; printable = yes # A private directory, usable only by fred. Note that fred requires write # access to the directory. # a service which has a different directory for each machine that connects # this allows you to tailor configurations to incoming machines. You could # also use the %u option to tailor it by user name. # The %m gets replaced with the machine name that is connecting. ;[pchome] ; comment = PC Directories ; path = /usr/pc/%m ; public = no ; writable = yes # A publicly accessible directory, read/write to all users. Note that all files # created in the directory by users will be owned by the default user, so # any user with access can delete any other user's files. Obviously this # directory must be writable by the default user. Another user could of course # be specified, in which case all files would be owned by that user instead. #[public] # path = /usr/samba/mount/pub # public = yes # only guest = yes # writable = yes # printable = no # The following two entries demonstrate how to share a directory so that two # users can place files there that will be owned by the specific users. In this # setup, the directory should be writable by both users and should have the # sticky bit set on it to prevent abuse. Obviously this could be extended to # as many users as required.