Bug 71233 - printconf fails to work for external SMB printers
printconf fails to work for external SMB printers
Product: Red Hat Linux
Classification: Retired
Component: printconf (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2002-08-10 14:11 EDT by Dave Raggett
Modified: 2007-04-18 12:45 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-08-10 14:11:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Dave Raggett 2002-08-10 14:11:35 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/20020606

Description of problem:
printconf-gui wouldn't work with SMB printer. I discovered that the
/usr/share/printconf/util/smbprint was passing the wrong params to

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Use printconf-gui to set up an external SMB printer and then look at

Actual Results:  Nothing gets passed to remote SMB server.
I debugged what was going on and determined that the
smbclient script needed a fix. See later for the patch.

If you log the error output of smbclient you will see that it
is complaining about the parameters being passed to it.

With my fix, lpr nows causes the remote printer to do something,
but there is still a problem elsewhere (mf_wrapper) as a short
text file is printed as many mostly blank sheets with 0-3 lines of
junk across the top.  I presume that magicfilter isn't being invoked
correctly. In particular, I suspect it isn't getting the right
device driver, in my case "hpijs" for an HP OfficeJet G85.

Additional info:

The following is the end of the smbprint after my fixes. It ensures
that the -U and -W params are only given when needed and ensures
that the correct servicename is given.

-------- cut here --------------------

if [ "$user" != "" ]; then
   usercmd="-U $user"

if [ "$workgroup" != "" ]; then
   workgroupcmd="-W $workgroup"

if [ "$translate" = "yes" ]; then
 command="translate ; print -"
 command="print -"

# echo $share $password $translate $x_command > /tmp/smbprint.log
# echo smbclient "\\\\$hostip\\$share" "$password" -E \
     -N -P $usercmd $workgroupcmd \
     -c "$command" >/tmp/smbprint.log

cat | /usr/bin/smbclient "\\\\$hostip\\$share" "$password" -E \
     -N -P $usercmd $workgroupcmd \
     -c "$command" 2>/dev/null
Comment 1 Tim Waugh 2002-08-12 07:33:12 EDT
The 'share' is the whole thing, i.e. //machinename/sharename. 
As for the other problem, please make sure you have all the updates applied.  
If the problem persists please re-open this bug report.

Note You need to log in before you can comment on or make changes to this bug.