LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Samba...printing? (http://www.linuxquestions.org/questions/linux-hardware-18/samba-printing-435756/)

liquidrabbit 04-16-2006 05:18 PM

Samba...printing?
 
I've got Samba 3.0.20 installed on Slackware 10.2 with WindowMaker. I can connect to my printer from Samba and all, but printing...kinda works. Paper comes out and sometimes there's stuff on it, but nothing correct. Usually I get a row or two (sometimes overlapped) of edge-to-edge random characters. I can only print from aterm, too. How can I add the printer so that things like OpenOffice and GIMP can use it? And how do I make it print what I tell it to?

haymaker2000 04-16-2006 08:30 PM

So, you are trying to print over the network, where the printer is on a Windows machine? Or do you have the printer on a Linux machine?

If you have the printer on a Windows machine and want to print from the Linux box install CUPS (Common Unix Printing System) on you Linux box and configure a printer over CUPS (For details contact me or post here). I had some trouble with that at first too.

If the printer is on your Linux box, and you want to share it over the network, samba is the choice to take.

liquidrabbit 04-17-2006 05:20 PM

The printer is on a Windows XP box. I ran xfsamba4 and could see that particular box, but after updating samba I could see a different one and this one (but still not two others).

I was following the CUPS tutorial here up until the point where it says to install cupsomatic, which I can't find ANYWHERE! I would love some help on setting up CUPS.

haymaker2000 04-17-2006 08:48 PM

follow this guide: http://osr600doc.sco.com/en/PR_admin/cups-start.html
I think that's much easier to follow then the other one.
The CUPS control panel is available (once it is installed) if you point your browser to
http://localhost:631

Once that is running, it's quite easy to setup. Good luck. :-)

liquidrabbit 04-17-2006 09:52 PM

I'm not sure about step 11 in that (Printing from CUPS to a Windows Printer):
Quote:

Use the CUPS administrative interface on http://localhost:631 to define "hp" as an lpd printer, using the raw interface.
How do I define it?

haymaker2000 04-17-2006 10:03 PM

Just ignore that step. Have you got CUPS running? Do the following:
Click Administration (enter user: root, password: <root password>)
Printers -> Add Printer
Name: <your choice>
Location: smb://<the windows host name>/<printer share name>
Device: Windows Printer via Samba
Device URI: smb://<username>:<password>@<the windows host name>/<printer share name>
Choose the printer make, model (if the exact model is not supported, just select a model lower, always worked for me)

If it still doesn't work try to change the Location to
smb://<username>:<password>@<the windows host name>/<printer share name>
or
smb://<username>:<password>@<the windows host name>/<printer share name>

Hope this helps.

liquidrabbit 04-18-2006 11:58 AM

I get
"Unable to connect to SAMBA host, will retry in 60 seconds...foomatic-rip version $Revision: 3.48 $ running..."

I'm trying to do it as a user on an unpassworded account.

haymaker2000 04-18-2006 12:02 PM

Have you correctly setup your windows machine as at the end of:
http://osr600doc.sco.com/en/PR_admin/cups-start.html
Be sure to have set the username:password in the smb:// line. Otherwise, I can't really help you more I guess. So, CUPS is working on port 631?

liquidrabbit 04-18-2006 12:17 PM

Yeah I set up my Windows box last night. I used 'smb://spencer:/Attic/HP_Laserjet_' since I don't have a password set. (Taking out that colon doesn't work either...)

haymaker2000 04-18-2006 08:31 PM

CUPS (smb, Samba) printing to Windows Printer Howto
 
OK, I tried to setup a user without a password and made the Device URI smb://test:@hostname/PRINTERNAME
but that did not work:

Code:

"Connection failed with error NT_STATUS_ACCOUNT_RESTRICTION"
(from CUPS http://localhost:631/printers/Printername)

You need to use a user:<password> combination, where the password is not blank, I guess. Also, the device URI has an "@" in it instead of a "/".


Note: It took me quite a while to figure this out at first because I did not find any documentation where it pointed you towards doing "smb://username:<password>@host/SHARENAME" in the device URI section of CUPS. This could be documented better I think, so your question is quite relevant. Maybe this would be a topic for a howto ;-).

liquidrabbit 04-20-2006 06:14 PM

Well, before I was getting a 'Could not connect' message, or something to that effect. I've altered it a bit and now I am getting this:
Quote:

Printer State: processing, accepting jobs.
"Tree connect failed"
Eh..added another test print job to the queue and got the 'Could not connect' message again:
Quote:

"Unable to connect to SAMBA host, will retry in 60 seconds...foomatic-rip version $Revision: 3.48 $ running..."
I KNOW it's there:
Code:

root@Paradise:~# /usr/bin/smbclient -L Attic -U spencer
Domain=[ATTIC] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

        Sharename      Type      Comment
        ---------      ----      -------
        HP_LaserJet_    Printer  HP LaserJet 6P
        My Documents    Disk     
        IPC$            IPC      Remote IPC
        D$              Disk      Default share
        print$          Disk      Printer Drivers
        SharedDocs      Disk     
        C              Disk     
        D              Disk     
        Pictures        Disk     
        DMR            Disk     
        Stuff          Disk     
        ADMIN$          Disk      Remote Admin
        C$              Disk      Default share
        LTS set list    Disk     
Domain=[ATTIC] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

        Server              Comment
        ---------            -------

        Workgroup            Master
        ---------            -------
root@Paradise:~# ls -l /usr/lib/cups/backend/smb
lrwxrwxrwx    1 root    root          17 Apr 15 06:44 /usr/lib/cups/backend/smb -> /usr/bin/smbspool

Hrm...

[update]
Also, the device URI isn't what I set it to, and won't update when I change it. Currently it should be smb://printer@******@Attic/HP_Laserjet_ but it keeps resetting to smb://Attic/HP_Laserjet_ no matter what I do.

haymaker2000 04-20-2006 10:21 PM

OK, once more:
device URI is:
smb://printeruser:passwd@mywindowshost/EPSON

NOT smb://printer@******@Attic/HP_Laserjet_

THERE IS NO @ between user and password. It's the same as if you log in to a FTP server btw. The username:upassword will not show at the printer configuration on localhost:631 !
See your /etc/cups/printers.conf
Mine:
Code:

<DefaultPrinter Epson>
Info printer info
Location smb://mywindowshost/EPSON
DeviceURI smb://printeruser:upasswd@mywindowshost/EPSON
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>


liquidrabbit 04-21-2006 05:48 PM

That first @ was a typo.

Here's what I have:
Code:

<DefaultPrinter HPLaserjet>
Info printer info
Location smb://Attic/HP_Laserjet_
DeviceURI smb://printer:printer@Attic/HP_Laserjet_
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>

I set the username and password to 'printer' on my Windows box, but I still get
Quote:

Printer State: idle, accepting jobs.
"Unable to connect to SAMBA host, will retry in 60 seconds...foomatic-rip version $Revision: 3.48 $ running..."

haymaker2000 04-21-2006 09:11 PM

Mmhh, that's odd. Have you tried
Code:

root@Paradise:~# /usr/bin/smbclient -L Attic -U printer
? And does it give you the printer share as well?

liquidrabbit 04-22-2006 07:09 AM

Code:

root@Paradise:/home/spencer# /usr/bin/smbclient -L Attic -U printer
Password:
Domain=[ATTIC] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

        Sharename      Type      Comment
        ---------      ----      -------
        HP_LaserJet_    Printer  HP LaserJet 6P
        My Documents    Disk     
        IPC$            IPC      Remote IPC
        D$              Disk      Default share
        print$          Disk      Printer Drivers
        SharedDocs      Disk     
        C              Disk     
        D              Disk     
        Pictures        Disk     
        DMR            Disk     
        Stuff          Disk     
        ADMIN$          Disk      Remote Admin
        C$              Disk      Default share
        LTS set list    Disk     
Domain=[ATTIC] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

        Server              Comment
        ---------            -------

        Workgroup            Master
        ---------            -------



All times are GMT -5. The time now is 12:12 AM.