[Samba] Upgrade to 2:4.16.2+dfsg-1nmu1~deb11.1 borks printing
Aaron de Bruyn
aaron at heyaaron.com
Wed Dec 28 01:38:52 UTC 2022
Sorry for the delay—your replies went to spam. Thanks Gmail! 😉
I was using the Debian repos for a good two years or so before I switched to the Van Belle repos. I don't recall what it was for, but I switched back to Debian a week or so ago to start testing since the Van Belle repos are starting to drift further and further out-of-date.
Yeah, I'm aware the perms are an insecure nightmare.
This was a temporary fix to get things back online after the update. Over the next day or two we're going to work to get things locked down again and re-enable apparmor as well as update the print spool path.
On Tue Dec 27, 2022, 09:21 PM GMT, Michael Tokarev <mailto:mjt at tls.msk.ru> wrote:
> 28.12.2022 00:11, Michael Tokarev via samba wrote:
>> 27.12.2022 23:53, Aaron de Bruyn via samba wrote:
>>> Finally got it working.
>>> Nothing useful in the error logs.
>>> /var/spool/samba does not exist.
>>> Creating it and chmoding it to 777 along with using tdbtool to create /var/cache/samba/printer_list.tdb seems to do the trick.
>> This is in smb.conf in [printers] section.
>> The postinstall script checks if this directory exists, it is
>> referenced in smb.conf and if yes, creates symlink pointing to
>> /var/tmp/. This shouldn't affect 4.16.2+dfsg-1 in any way, but
> Actually the change has been made earlier, in 4.16.1+dfsg-5,
> so 4.16.2+dfsg-1 also contains the change. Here's the code
> in the postinst script:
> # remove old spool directory (point it to /var/tmp if in use)
> if [ configure = "$1" -a ! -L $dir ] &&
> dpkg --compare-versions "$2" lt-nl 2:4.16.1+dfsg-5~
> if [ -d $dir ]; then
> echo "W: removing old samba print spool $dir" >&2
> rm -rf $dir
> used=$(testparm -s --section-name=printers --parameter-name=path 2>/dev/null || :)
> if [ $dir = "$used" ]; then
> echo "W: $dir is referenced in smb.conf [printers] section." >&2
> echo "W: redirecting $dir to /var/tmp. Please update your smb.conf" >&2
> ln -s ../tmp $dir
> which should create symlink if we're upgrading from earlier
> version (4.13 in your case) and the directory is actually
> used in smb.conf (and not already a symlink).
> I wonder.. if this code misses the case where this path is
> referenced in another share? Where did you set this path in
More information about the samba