Простейший файл-сервер Samba на Ubuntu с архивными копиями

Челябинская область

Автор:Dmitriy Altuhov

Простейший файл-сервер Samba на Ubuntu с архивными копиями

Задача: требуется простой файл-сервер на Linux с поддержкой архивных копий («Предыдущие версии»/Previous versions/shadow_copy2/shadow copies) и одной общей папкой share для обмена файлами всеми пользователями.

Настройка файл-сервера Samba: help.ubuntu.ru/wiki/файловый_сервер_для_windows
Настройка резервных копий для VFS module shadow_copy2: wiki.debian.org/SambaDirvish

sambadirvish

root@server:/etc/samba# mount
/dev/sdb1 on /media/250GB type ext4 (rw,acl,user_xattr,errors=remount-ro)

Для управления принтерами и драйверами нужно пользователю дать права SePrintOperatorPrivilege
sudo net rpc rights grant user SePrintOperatorPrivilege

Если получите ошибку
Failed to grant privileges for user (NT_STATUS_ACCESS_DENIED)

Нужно сделать
smbpasswd -a
И указать пароль для root-а


[global]
workgroup = WORKGROUP
server string = %h server (Samba, Ubuntu)
; wins server = w.x.y.z
dns proxy = no
; name resolve order = lmhosts host wins bcast
; interfaces = 127.0.0.0/8 eth0
; bind interfaces only = yes
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
; domain logons = yes
; logon path = \\%N\profiles\%U
; logon drive = H:
; logon script = logon.cmd
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
; add group script = /usr/sbin/addgroup --force-badname %g
; printing = bsd
; printcap name = /etc/printcap
printing = cups
printcap name = cups
cups options = "raw"
; include = /home/samba/etc/smb.conf.%m
; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
; idmap uid = 10000-20000
; idmap gid = 10000-20000
; template shell = /bin/bash
; winbind enum groups = yes
; winbind enum users = yes
; usershare max shares = 100
usershare allow guests = yes
usershare max shares = 0
domain master = yes
local master = yes
preferred master = yes
os level = 65
map acl inherit = yes
store dos attributes = yes
map archive = no
map system = no
map hidden = no
map readonly = no
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
wide links = yes
unix extensions = no
;[homes]
; comment = Home Directories
; browseable = no
; read only = yes
; create mask = 0700
; directory mask = 0700
; valid users = %S
;[netlogon]
; comment = Network Logon Service
; path = /home/samba/netlogon
; guest ok = yes
; read only = yes
;[profiles]
; comment = Users profiles
; path = /home/samba/profiles
; guest ok = no
; browseable = no
; create mask = 0600
; directory mask = 0700
[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = yes
read only = yes
create mask = 0777
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = yes
write list = user
;[cdrom]
; comment = Samba server's CD-ROM
; read only = yes
; locking = no
; path = /cdrom
; guest ok = yes
; preexec = /bin/mount /cdrom
; postexec = /bin/umount /cdrom
[Share]
path = /media/250GB/share
writeable = yes
create mask = 0777
directory mask = 0777
guest ok = yes
vfs objects = shadow_copy2
shadow:snapdir = /media/250GB/snapshots/share
shadow:basedir = /media/250GB/share

Comments Are Closed!!!