You are not logged in.

#1 2018-05-08 13:11:37

zhboner
Member
Registered: 2016-06-05
Posts: 6

[Solved]Samba printer can't work anymore after recent updates

The desktop environment is KDE. The printer is shared through samba and it worked fine. After recent updates, forgiving me I can't recall the specific package, it can't work anymore. All jobs are pending in the queue. I checked CUPS and samba log but can't find helpful information. Actually there are no error messages. But if I set to keep retrying jobs rather than stop the job in error policy in KDE printer configuration, the printer will keep retrying forever. So this means there is something wrong. Are there anyone kindly offering some help?

Last edited by zhboner (2018-05-12 00:47:01)

Offline

#2 2018-05-08 14:11:16

adomol
Member
Registered: 2014-12-18
Posts: 21

Re: [Solved]Samba printer can't work anymore after recent updates

Off the top of my head... service names have changed recently. From the wiki:

Note: In samba 4.8.0-1, the units were renamed from smbd.service and nmbd.service to smb.service and nmb.service.

Offline

#3 2018-05-08 14:21:55

zhboner
Member
Registered: 2016-06-05
Posts: 6

Re: [Solved]Samba printer can't work anymore after recent updates

adomol wrote:

Off the top of my head... service names have changed recently. From the wiki:

Note: In samba 4.8.0-1, the units were renamed from smbd.service and nmbd.service to smb.service and nmb.service.

Thank you for the reply, i do notice that. However, it can’t work even I start both smb and nmb service.

Last edited by zhboner (2018-05-08 14:22:30)

Offline

#4 2018-05-10 11:59:57

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,443

Re: [Solved]Samba printer can't work anymore after recent updates

I have had the problem too and was able to find what was wrong. cups print via samba via /usr/lib/backend/smb which is a symlink to /usr/bin/smbspool. The later can (normally) take the DEVICE_URI parameter as first parameter or via an environnement variable (see the output of "/usr/bin/smbspool x"). The problem is that it does not seem to work when DEVICE_URI is only given via an environnement variable which is what cups does. My solution was to replace the /usr/lib/cups/backend/smb symlink with the following script (give it the same perm and ownership as  /usr/bin/smbspool).

Note that you will see that there is a problem with the smb backend if you enable "debug log" for cups.

Note also that in order to debug a problem, it s better to point your browser to http://localhost:631 instead of using third party (for example KDE) tools.

#! /bin/bash

if [ -n "$DEVICE_URI" ] ; then 
    exec /usr/bin/smbspool "$DEVICE_URI" "$@"
else
    exec /usr/bin/smbspool "$@"
fi

Last edited by olive (2018-05-10 16:13:03)

Offline

#5 2018-05-12 00:44:17

zhboner
Member
Registered: 2016-06-05
Posts: 6

Re: [Solved]Samba printer can't work anymore after recent updates

olive wrote:

I have had the problem too and was able to find what was wrong. cups print via samba via /usr/lib/backend/smb which is a symlink to /usr/bin/smbspool. The later can (normally) take the DEVICE_URI parameter as first parameter or via an environnement variable (see the output of "/usr/bin/smbspool x"). The problem is that it does not seem to work when DEVICE_URI is only given via an environnement variable which is what cups does. My solution was to replace the /usr/lib/cups/backend/smb symlink with the following script (give it the same perm and ownership as  /usr/bin/smbspool).

Note that you will see that there is a problem with the smb backend if you enable "debug log" for cups.

Note also that in order to debug a problem, it s better to point your browser to http://localhost:631 instead of using third party (for example KDE) tools.

#! /bin/bash

if [ -n "$DEVICE_URI" ] ; then 
    exec /usr/bin/smbspool "$DEVICE_URI" "$@"
else
    exec /usr/bin/smbspool "$@"
fi

Thank you very much. Your solution solved my issue. It is so weird it was fine in the past.

Offline

#6 2018-05-12 00:45:40

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 25,891
Website

Re: [Solved]Samba printer can't work anymore after recent updates

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Online

#7 2018-05-12 00:46:34

zhboner
Member
Registered: 2016-06-05
Posts: 6

Re: [Solved]Samba printer can't work anymore after recent updates

jasonwryan wrote:

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.

Sure. I am doing that.

Offline

#8 2018-05-12 06:35:07

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,443

Re: [Solved]Samba printer can't work anymore after recent updates

zhboner wrote:

Thank you very much. Your solution solved my issue. It is so weird it was fine in the past.

We have clearly a bug here. I see a similar problem with Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1574177 . Since the samba version is the same; I suspect it is the same problem. I expect this to be fixed in the (hopefully near) future.

Offline

#9 2018-05-12 07:47:32

loqs
Member
Registered: 2014-03-06
Posts: 5,964

Re: [Solved]Samba printer can't work anymore after recent updates

@olive https://src.fedoraproject.org/rpms/samb … line.patch https://bbs.archlinux.org/viewtopic.php?id=236772 requires reporting on the arch bug tracker once confirmed the patch fixes the issue.

Offline

Board footer

Powered by FluxBB