Fix zmb-standalone

This commit is contained in:
thorstenspille 2023-01-11 19:58:24 +01:00
parent 04f55cd566
commit 666e2b320c

View File

@ -17,13 +17,13 @@ echo "deb https://pkg.ltec.ch/public/ $(lsb_release -cs) main" > /etc/apt/source
echo "deb http://ftp.de.debian.org/debian $(lsb_release -cs)-backports main contrib" > /etc/apt/sources.list.d/$(lsb_release -cs)-backports.list echo "deb http://ftp.de.debian.org/debian $(lsb_release -cs)-backports main contrib" > /etc/apt/sources.list.d/$(lsb_release -cs)-backports.list
cat << EOF > /etc/apt/preferences.d/samba cat << EOF > /etc/apt/preferences.d/samba
Package: samba Package: samba*
Pin: release a=$(lsb_release -cs)-backports Pin: release a=$(lsb_release -cs)-backports
Pin-Priority: 900 Pin-Priority: 900
EOF EOF
cat << EOF > /etc/apt/preferences.d/winbind cat << EOF > /etc/apt/preferences.d/winbind
Package: winbind Package: winbind*
Pin: release a=$(lsb_release -cs)-backports Pin: release a=$(lsb_release -cs)-backports
Pin-Priority: 900 Pin-Priority: 900
EOF EOF
@ -59,6 +59,7 @@ cat << EOF | sudo tee -i /etc/samba/import.template
max log size = 1000 max log size = 1000
logging = file logging = file
panic action = /usr/share/samba/panic-action %d panic action = /usr/share/samba/panic-action %d
log level = 3
server role = standalone server server role = standalone server
obey pam restrictions = yes obey pam restrictions = yes
unix password sync = yes unix password sync = yes
@ -66,34 +67,30 @@ cat << EOF | sudo tee -i /etc/samba/import.template
passwd chat = *Enter\snew\s*\password:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . passwd chat = *Enter\snew\s*\password:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes pam password change = yes
map to guest = bad user map to guest = bad user
vfs objects = shadow_copy2 acl_xattr catia fruit streams_xattr
map acl inherit = yes map acl inherit = yes
acl_xattr:ignore system acls = yes acl_xattr:ignore system acls = yes
vfs objects = shadow_copy2 acl_xattr catia fruit streams_xattr full_audit
shadow: snapdir = .zfs/snapshot shadow: snapdir = .zfs/snapshot
shadow: sort = desc shadow: sort = desc
shadow: format = -%Y-%m-%d-%H%M shadow: format = -%Y-%m-%d-%H%M
shadow: snapprefix = ^zfs-auto-snap_\(frequent\)\{0,1\}\(hourly\)\{0,1\}\(daily\)\{0,1\}\(weekly\)\{0,1\}\(monthly\)\{0,1\} shadow: snapprefix = ^zfs-auto-snap_\(frequent\)\{0,1\}\(hourly\)\{0,1\}\(daily\)\{0,1\}\(weekly\)\{0,1\}\(monthly\)\{0,1\}
shadow: delimiter = -20 shadow: delimiter = -20
fruit:encoding = native fruit:encoding = native
fruit:metadata = stream fruit:metadata = stream
fruit:zero_file_id = yes fruit:zero_file_id = yes
fruit:nfs_aces = no fruit:nfs_aces = no
full_audit:priority = notice
full_audit:facility = local5
full_audit:success = connect disconnect mkdir rmdir read write rename
full_audit:failure = connect
full_audit:prefix = %u|%I|%S
EOF EOF
net conf import /etc/samba/import.template net conf import /etc/samba/import.template
net conf addshare $ZMB_SHARE /$LXC_SHAREFS_MOUNTPOINT/$ZMB_SHARE
net conf setparm $ZMB_SHARE readonly no
net conf setparm $ZMB_SHARE createmask 0660
net conf setparm $ZMB_SHARE directorymask 0770
mkdir -p /$LXC_SHAREFS_MOUNTPOINT/$ZMB_SHARE mkdir -p /$LXC_SHAREFS_MOUNTPOINT/$ZMB_SHARE
chmod -R 770 /$LXC_SHAREFS_MOUNTPOINT/$ZMB_SHARE chmod -R 770 /$LXC_SHAREFS_MOUNTPOINT/$ZMB_SHARE
chown -R $USER:root /$LXC_SHAREFS_MOUNTPOINT/$ZMB_SHARE chown -R $USER:root /$LXC_SHAREFS_MOUNTPOINT/$ZMB_SHARE
net conf addshare $ZMB_SHARE /$LXC_SHAREFS_MOUNTPOINT/$ZMB_SHARE
net conf setparm $ZMB_SHARE readonly no
net conf setparm $ZMB_SHARE browseable yes
net conf setparm $ZMB_SHARE createmask 0660
net conf setparm $ZMB_SHARE directorymask 0770
systemctl restart smbd nmbd wsdd systemctl restart smbd nmbd wsdd