mirror of
https://github.com/bashclub/zamba-lxc-toolbox.git
synced 2024-11-07 19:31:58 +01:00
Update zmb-cups
This commit is contained in:
parent
9fa103d8ae
commit
907093512b
@ -11,7 +11,7 @@
|
||||
LXC_TEMPLATE_VERSION="debian-12-standard"
|
||||
|
||||
# Create sharefs mountpoint
|
||||
LXC_MP="0"
|
||||
LXC_MP="1"
|
||||
|
||||
# Create unprivileged container
|
||||
LXC_UNPRIVILEGED="0"
|
||||
|
@ -42,7 +42,6 @@ cat > /etc/samba/smb.conf <<EOF
|
||||
idmap config *:backend = tdb
|
||||
idmap config *:range = 3000000-4000000
|
||||
idmap config *:schema_mode = rfc2307
|
||||
username map = /etc/samba/user.map
|
||||
|
||||
winbind refresh tickets = Yes
|
||||
winbind use default domain = Yes
|
||||
@ -69,17 +68,18 @@ cat > /etc/samba/smb.conf <<EOF
|
||||
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\}\(backup\)\{0,1\}\(manual\)\{0,1\}
|
||||
shadow: delimiter = -20
|
||||
|
||||
printing = CUPS
|
||||
rpcd_spoolss:idle_seconds=300
|
||||
rpcd_spoolss:num_workers = 10
|
||||
spoolss: architecture = Windows x64
|
||||
|
||||
[printers]
|
||||
path = /var/tmp/
|
||||
path = /${LXC_SHAREFS_MOUNTPOINT}/spool
|
||||
printable = yes
|
||||
|
||||
[print$]
|
||||
path = /var/lib/samba/printers
|
||||
path = /${LXC_SHAREFS_MOUNTPOINT}/printerdrivers
|
||||
read only = no
|
||||
|
||||
EOF
|
||||
@ -93,13 +93,16 @@ echo -e "session optional pam_mkhomedir.so skel=/etc/skel umask=077" >> /
|
||||
|
||||
systemctl restart winbind nmbd
|
||||
|
||||
chown -R ${ZMB_ADMIN_USER}:"domain admins" /var/lib/samba/printers
|
||||
chmod -R 2775 /var/lib/samba/printers
|
||||
setfacl -Rb /var/lib/samba/printers
|
||||
setfacl -Rm u:${ZMB_ADMIN_USER}:rwx,g:"domain admins":rwx,g:"NT Authority/authenticated users":r--,g:"NT Authority/system":rwx,o::--- /var/lib/samba/printers
|
||||
setfacl -Rdm u:${ZMB_ADMIN_USER}:rwx,g:"domain admins":rwx,g:"NT Authority/authenticated users":r--,g:"NT Authority/system":rwx,o::--- /var/lib/samba/printers
|
||||
echo -e "${ZMB_ADMIN_PASS}" | net rpc rights grant "${ZMB_DOMAIN}\\Domain Admins" SePrintOperatorPrivilege -U "${ZMB_DOMAIN}\\${ZMB_ADMIN_USER}"
|
||||
echo -e "!root = ${ZMB_DOMAIN}\\administrator ${ZMB_DOMAIN}\\Administrator" > /etc/samba/user.map
|
||||
mkdir -p /${LXC_SHAREFS_MOUNTPOINT}/{spool,printerdrivers}
|
||||
cp -rv /var/lib/samba/printers/* /${LXC_SHAREFS_MOUNTPOINT}/printerdrivers
|
||||
chown -R root:"domain admins" /${LXC_SHAREFS_MOUNTPOINT}/printerdrivers
|
||||
chmod -R 1777 /${LXC_SHAREFS_MOUNTPOINT}/spool
|
||||
chmod -R 2775 /${LXC_SHAREFS_MOUNTPOINT}/printerdrivers
|
||||
setfacl -Rb /${LXC_SHAREFS_MOUNTPOINT}/printerdrivers
|
||||
setfacl -Rm u:${ZMB_ADMIN_USER}:rwx,g:"domain admins":rwx,g:"NT Authority/authenticated users":r-x,o::--- /${LXC_SHAREFS_MOUNTPOINT}/printerdrivers
|
||||
setfacl -Rdm u:${ZMB_ADMIN_USER}:rwx,g:"domain admins":rwx,g:"NT Authority/authenticated users":r-x,o::--- /${LXC_SHAREFS_MOUNTPOINT}/printerdrivers
|
||||
echo -e "${ZMB_ADMIN_PASS}" | net rpc rights grant "${ZMB_DOMAIN}\\domain admins" SePrintOperatorPrivilege -U "${ZMB_DOMAIN}\\${ZMB_ADMIN_USER}"
|
||||
systemctl disable --now cups-browsed.service
|
||||
|
||||
cupsctl --remote-admin
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user