Bug 937 - lp command doesn't work after upgrading to samba 3.0.1
lp command doesn't work after upgrading to samba 3.0.1
Status: RESOLVED DUPLICATE of bug 473
Product: Samba 3.0
Classification: Unclassified
Component: Printing
3.0.1
All Linux
: P3 normal
: none
Assigned To: Gerald (Jerry) Carter
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-01-02 20:16 UTC by Eddy Kho
Modified: 2005-11-14 09:26 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eddy Kho 2004-01-02 20:16:55 UTC
I have upgraded to Samba 3.0.1 from my default samba version that comes with 
RH8. lp command doesn't work after upgrading. I use lp command like this 'lp -
s -d printer_name file_name' in my application. I configure printer using 
webmin and declare to print to windows printer. Client windows is Win98.

I can see the job being spooled and it's done but nothing comes out on windows 
printer. Is there any patch to this problem? I can use smbclient command to 
print directly but having problem with the form feed and I prefer to use lp 
command for printing. Please help.

B.rgds,
Eddy
Comment 1 Ralph Thomas 2004-01-03 07:21:58 UTC
I have / had a simular problem and changed the smbprint script as follows.  The 
format of the smbclient comand seemed to have changed at 3.0.1...

if [ "$password" != "" ]; then
   passwordcmd="%$password"
else
   passwordcmd=""
fi

cat | /usr/bin/smbclient "$share" ${hostip:+-I} \
     $hostip $usercmd "$user$passwordcmd" $workgroupcmd "$workgroup" \
     -c "$command" 2>/dev/null
Comment 2 Eddy Kho 2004-01-04 18:30:46 UTC
I have tried to change the script but the problem remains the same.
Comment 3 Eddy Kho 2004-01-04 19:20:12 UTC
I check /var/spool/lpd/my_printer/lpq.0 and it says failed to 
open /secrets.tdb. That file owner is root and has permission r+w only to the 
owner, so I change the permission to full access and try printing again but 
still nothing comes out even there's no error 
in /var/spool/lpd/my_printer/lpq.0 anymore.
Comment 4 Gerald (Jerry) Carter 2004-03-02 06:38:00 UTC
which version of smbprint are you using ?  I'm finding 
several in our cvs tree.
Comment 5 Gerald (Jerry) Carter 2004-03-03 07:07:36 UTC
Hi Jerry,

I have found out that the problem is not with Samba 3.0.1, but with Webmin
1.121. If I configure my windows printer using Webmin, it will create smb
file in /etc/webmin/lpadmin/drivers. Let's say the file name is
printer_driver.smb. In that file there's a command like this "smbclient
'windows_printer_name' -N -c 'print /tmp/$$.smb' -P. After I remove -P, the
script works perfectly, so I assume the problem is with Webmin.

B.rgds,
Eddy Kho


*** This bug has been marked as a duplicate of 473 ***
Comment 6 Gerald (Jerry) Carter 2005-11-14 09:26:39 UTC
database cleanup