LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Can't print to Windows shared printer via Samba (https://www.linuxquestions.org/questions/linux-general-1/cant-print-to-windows-shared-printer-via-samba-547197/)

cdavidson 04-18-2007 10:01 PM

[SOLVED] Can't print to Windows shared printer via Samba
 
I am running Gentoo 2.16.19-r5 with SAMBA version 3.0.24 and CUPS version 1.2.9. I have an HP LaserJet 1320 shared from a Windows 2003 Server.

Code:

chris@tux ~ $ smbclient -L servername
Password:
Domain=[DOMAIN] OS=[Windows Server 2003 3790 Service Pack 1] Server=[Windows Server 2003 5.2]

        Sharename      Type      Comment
        ---------      ----      -------
        print$          Disk      Printer Drivers
        HPLaserJet1320  Printer  hp LaserJet 1320 PCL 6
        C$              Disk      Default share
        IPC$            IPC      Remote IPC
        SYSVOL          Disk      Logon server share
        NETLOGON        Disk      Logon server share
Domain=[DOMAIN] OS=[Windows Server 2003 3790 Service Pack 1] Server=[Windows Server 2003 5.2]

        Server              Comment
        ---------            -------
        SERVERNAME

        Workgroup            Master
        ---------            -------
        DOMAIN          SERVERNAME


I am trying to connect to it using the native KDE printing configuration tool (Settings > Printers). I am doing the following:
<In administrator mode>
1. Click Add Printer
2. Select SMB shared printer (Windows)
3. For user identification I enter the same Windows username and password that are in the .credentials file that I use to mount shares via CIFS on the same server.
4. I scan my network to find the proper workgroup, which it does successfully. I am able to see and select the shared printer on the server.
5. For Printer Model and Selection, I select HP and LaserJet 1320 Series
6. When I click the test printer button I get the error: "Unable to create temporary printer" I then clic knext
7. I don't enter any banners
8. No quotas
9. I don't enter any allowed or denied users
10. Name HPLJ1320, click next
11. Receive error message stating "Unable to create printer. Error message received from manager: client-error-bad-request"

I also tried to setup the printer via the CUPS web interface:
1. Fired up localhost:631/admin
2. Printer name HPLJ1320
3. Device: Windows printer via SAMBA
4. Device URL smb://servername/HPLaserJet1320
5. Model: HP LaserJet 1320 Series PostScript (en)
6. Enter root's credentials to add the printer
7. When I try to print a test page from the CUPS web interface the job goes to the queue(in the web interface), but the following is displayed next to the printer name: "Unable to connect to CIFS host, will retry in 60 seconds..."

This is where my journey ends. I have been searching tutorials and how-tos, but have not yet found an answer. Anyone have any ideas? As always, thanks for the help.

cdavidson 04-19-2007 10:37 AM

I got it fixed. Basically, the problem was that I was not passing any credentials in the device URL. I didn't think that I would need to do this, since the Win 2K3 share permissions on the printer are set to "everyone > print". Now my device URL looks like:

smb://username:password@WORKGROUP/cmdfs/HPLaserJet1320

The only question I have now is, is there a way to pass the path to a credentials file rather than including UN and PWD in the device URL. I use a credentials file in my /etc/fstab to mount CIFS shares on the same server.


All times are GMT -5. The time now is 06:16 PM.