diff --git a/src/zmb-cups/constants-service.conf b/src/zmb-cups/constants-service.conf index d68871d..d0fc540 100644 --- a/src/zmb-cups/constants-service.conf +++ b/src/zmb-cups/constants-service.conf @@ -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" @@ -23,4 +23,4 @@ LXC_NESTING="1" LXC_MEM_MIN=1024 # service dependent meta tags -SERVICE_TAGS="samba,member,fileserver" \ No newline at end of file +SERVICE_TAGS="samba,member,fileserver" diff --git a/src/zmb-cups/install-service.sh b/src/zmb-cups/install-service.sh index f13919e..4f12ef9 100644 --- a/src/zmb-cups/install-service.sh +++ b/src/zmb-cups/install-service.sh @@ -19,7 +19,7 @@ mv /etc/krb5.conf /etc/krb5.conf.bak cat > /etc/krb5.conf < /etc/samba/smb.conf < /etc/samba/smb.conf <> / 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