LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 04-16-2006, 05:18 PM   #1
liquidrabbit
Member
 
Registered: Dec 2005
Location: New Jersey
Distribution: Slackware 10.2
Posts: 42

Rep: Reputation: 15
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?
 
Old 04-16-2006, 08:30 PM   #2
haymaker2000
Member
 
Registered: Jan 2006
Location: New Zealand
Distribution: Ubuntu 5.10 (Breezy), Debian 3.1 (Sarge)
Posts: 37

Rep: Reputation: 15
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.
 
Old 04-17-2006, 05:20 PM   #3
liquidrabbit
Member
 
Registered: Dec 2005
Location: New Jersey
Distribution: Slackware 10.2
Posts: 42

Original Poster
Rep: Reputation: 15
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.
 
Old 04-17-2006, 08:48 PM   #4
haymaker2000
Member
 
Registered: Jan 2006
Location: New Zealand
Distribution: Ubuntu 5.10 (Breezy), Debian 3.1 (Sarge)
Posts: 37

Rep: Reputation: 15
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. :-)
 
Old 04-17-2006, 09:52 PM   #5
liquidrabbit
Member
 
Registered: Dec 2005
Location: New Jersey
Distribution: Slackware 10.2
Posts: 42

Original Poster
Rep: Reputation: 15
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?
 
Old 04-17-2006, 10:03 PM   #6
haymaker2000
Member
 
Registered: Jan 2006
Location: New Zealand
Distribution: Ubuntu 5.10 (Breezy), Debian 3.1 (Sarge)
Posts: 37

Rep: Reputation: 15
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.

Last edited by haymaker2000; 04-18-2006 at 08:32 PM.
 
Old 04-18-2006, 11:58 AM   #7
liquidrabbit
Member
 
Registered: Dec 2005
Location: New Jersey
Distribution: Slackware 10.2
Posts: 42

Original Poster
Rep: Reputation: 15
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.

Last edited by liquidrabbit; 04-18-2006 at 12:00 PM.
 
Old 04-18-2006, 12:02 PM   #8
haymaker2000
Member
 
Registered: Jan 2006
Location: New Zealand
Distribution: Ubuntu 5.10 (Breezy), Debian 3.1 (Sarge)
Posts: 37

Rep: Reputation: 15
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 usernameassword in the smb:// line. Otherwise, I can't really help you more I guess. So, CUPS is working on port 631?
 
Old 04-18-2006, 12:17 PM   #9
liquidrabbit
Member
 
Registered: Dec 2005
Location: New Jersey
Distribution: Slackware 10.2
Posts: 42

Original Poster
Rep: Reputation: 15
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...)
 
Old 04-18-2006, 08:31 PM   #10
haymaker2000
Member
 
Registered: Jan 2006
Location: New Zealand
Distribution: Ubuntu 5.10 (Breezy), Debian 3.1 (Sarge)
Posts: 37

Rep: Reputation: 15
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 ;-).

Last edited by haymaker2000; 04-18-2006 at 08:33 PM.
 
Old 04-20-2006, 06:14 PM   #11
liquidrabbit
Member
 
Registered: Dec 2005
Location: New Jersey
Distribution: Slackware 10.2
Posts: 42

Original Poster
Rep: Reputation: 15
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.

Last edited by liquidrabbit; 04-22-2006 at 07:09 AM.
 
Old 04-20-2006, 10:21 PM   #12
haymaker2000
Member
 
Registered: Jan 2006
Location: New Zealand
Distribution: Ubuntu 5.10 (Breezy), Debian 3.1 (Sarge)
Posts: 37

Rep: Reputation: 15
OK, once more:
device URI is:
smb://printeruserasswd@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>

Last edited by haymaker2000; 04-20-2006 at 10:22 PM.
 
Old 04-21-2006, 05:48 PM   #13
liquidrabbit
Member
 
Registered: Dec 2005
Location: New Jersey
Distribution: Slackware 10.2
Posts: 42

Original Poster
Rep: Reputation: 15
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..."
 
Old 04-21-2006, 09:11 PM   #14
haymaker2000
Member
 
Registered: Jan 2006
Location: New Zealand
Distribution: Ubuntu 5.10 (Breezy), Debian 3.1 (Sarge)
Posts: 37

Rep: Reputation: 15
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?
 
Old 04-22-2006, 07:09 AM   #15
liquidrabbit
Member
 
Registered: Dec 2005
Location: New Jersey
Distribution: Slackware 10.2
Posts: 42

Original Poster
Rep: Reputation: 15
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
        ---------            -------
 
  


Reply

Tags
cups, print, printing, samba, smb, windows, windows xp



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Whats the difference between CUPS printing and Samba shared printing? depam Linux - Software 1 03-17-2006 01:56 PM
Printing with samba bryanpeabody Linux - Networking 4 05-08-2005 03:42 PM
samba printing outtacontrol Linux - Networking 3 11-22-2004 02:10 PM
Samba printing berniec Linux - Networking 3 02-23-2004 09:18 AM
Printing on Samba brokenflea Slackware 5 02-03-2004 03:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration