Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

Printing from Gentoo to a shared Windows XP printer via Cups

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Post Reply
Advanced search
107 posts
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • Next
Author
Message
ugus
Apprentice
Apprentice
User avatar
Posts: 213
Joined: Fri Jul 23, 2004 7:03 pm
Location: Darmstadt, Germany

  • Quote

Post by ugus » Thu Dec 02, 2004 8:58 pm

thank you!.
clear, short, very good guide.
working perfect. :D
while(!sleep())
{
sheep++;
}
My Desktop
Top
Bob P
Advocate
Advocate
User avatar
Posts: 3374
Joined: Wed Oct 20, 2004 9:15 pm
Location: USA

  • Quote

Post by Bob P » Tue Dec 07, 2004 5:07 pm

Bob P wrote:After installing the printer as recommended, I've noticed that any user on the Linux box can browse their way to the printer settings menu in the control center and view the username:password combination that samba is using to access the printer share on the windows box. Specifically, the location of the printer is listed in plain view on the printer configuration menu:

Code: Select all

Type: local printer
State: Idle (accepting jobs)
Location: smb://username:password@workgroup/hostname/sharename
Description: URI: ipp://gentoo:631/printers/HLPJ4
Device: smb://workgroup/hostname/sharename
Model:  HP Laserjet 4
i am a bit concerned about having the username and password for logging onto the Win box being plainly visible like that. is there a better way to do this that would not involve displaying the username and password? i have to admit, i'm not too enthusiastic about the idea of using a guest account with no password, as this would allow anyone to use the printer without restriction.
i have the solution for the problem where a user's SMB username:password is being displayed inappropriately in the "location" field of the KDE Printer Manager. this error was caused by a misunderstanding of what the contents of the "location" field in the printer description are intended to contain. although it may appear that the printer URI information is supposed to be entered in the printer location field, doing so will cause the password disclosure problem referenced earlier. instead of entering the URI information in the location field, use your own descriptive information about the physical location of the printer in your workplace.

To put this in better context, let's look at the instructions in this HowTo regarding logging onto http://localhost:631 to configure the printer:
hulk2nd wrote:open your favourite browser and go to http://localhost:631/
go to "manage printers". if you're asked for a password type in your normal root account infos. the first three informations (name, location, description) can be filled just like you want. i choosed to name it epsonc62 but i don't think it is needfull that this name is the same one that you gave your printer on the xp machine. click continue. choose "Windows Printer via SAMBA". click continue.
then tipe in the location:

Code: Select all

smb://username:pass@workgroup/host/printer
after logging onto the localhost and supplying your root credentials, you are asked to provide three pieces of information: printer name, printer location, printer description. it is essential that you DO NOT enter the URI location information into this "location" field. doing so will inappropriately disclose your username:password information on the windows box in plain text within the KDE Printer Manager in plain view for all to see!

Instead of entering this information for the "printer location"

Code: Select all

smb://username.password@workgroup/domain/sharename 
try entering something descriptive, like this:

Code: Select all

Main Computer Lab
the result is that when a KDE user opens the KDE Printer Manager, the text string "Main Computer Lab" will displayed in the printer's location field instead of the URI to your SMB box (which would inadvertently provide full disclosure of the username:password!).

After you finish entering the printer name, printer location, and printer description, select "Device: Windows Printer via Samba." on the next screen the following information should be entered into into the "Device URI" field: (don't enter it anywhere else!)

Code: Select all

smb://username.password@workgroup/domain/sharename 

This mistake resulted from confusion about using the term "printer location" interchangeably with "printer URI". be sure that you understand the difference.
Last edited by Bob P on Wed Dec 22, 2004 3:33 pm, edited 2 times in total.
Top
Belial`
n00b
n00b
Posts: 23
Joined: Sun Jan 04, 2004 10:56 pm
Location: Beveren, Belgium

  • Quote

Post by Belial` » Tue Dec 07, 2004 10:46 pm

Well, I think I've tried everything I could find on the net, but it just won't work :cry:
I have a HP DeskJet 3420, everything works fine (Printer is shared, and I can send jobs to it) but when the printer should start to print, he doesn't.
It just hangs at 64kb/3,70MB in the print queue, or whatever you call it...
So I this means, my Gentoo sends te file to the print queue, but Windows, or the printer can't do anything with it...
Is it just a non-linux-compatible printer or what? I really want this to work :? Can somebody help??
Top
Bob P
Advocate
Advocate
User avatar
Posts: 3374
Joined: Wed Oct 20, 2004 9:15 pm
Location: USA

  • Quote

Post by Bob P » Wed Dec 08, 2004 10:40 am

it may not be intuitive, but i think you need to emerge this regardless of the model of your HP printer.

Code: Select all

emerge hpijs
i needed to emerge it for my laserjet to work properly.
Top
Belial`
n00b
n00b
Posts: 23
Joined: Sun Jan 04, 2004 10:56 pm
Location: Beveren, Belgium

  • Quote

Post by Belial` » Wed Dec 08, 2004 1:52 pm

I have installed hpijs, but it still doesn't work :(
thanks anyway...
Top
GaDDiM
n00b
n00b
User avatar
Posts: 38
Joined: Sat Jan 01, 2005 12:48 am

sambaless

  • Quote

Post by GaDDiM » Sat Jan 01, 2005 12:59 am

You don't need to emerge samba if you have Windows XP (don't know of other versions of windows but I assume 2000 has it also) nor doing difficult with users or guest accounts

You need to add a Windows Component under "OtherFile and Print sharing" called "Print services for Unix". This is actually just a ldp server.

If you are using a firewall (which is default with SP2) you need to open port 515 TCP.

Now add a printer just like the first post describe only with the Device URI

Code: Select all

lpd://host/printer
if your printer name in windows contains spaces you can escape them by using %20

I have a printer called "HP Deskjet 720C" set up in windows on the computer "kamer" so my Device URI would be:

Code: Select all

lpd://kamer/HP%20DeskJet%20720C
Update: you have also put the start up type of the service "TCP/IP Print Server" to automatic
Last edited by GaDDiM on Fri Mar 18, 2005 12:00 pm, edited 1 time in total.
Top
Anouar
n00b
n00b
Posts: 12
Joined: Sun Dec 19, 2004 10:34 am

prob with cups

  • Quote

Post by Anouar » Sun Jan 02, 2005 8:20 pm

Hi hulk,

I can't even get connection with the printer,
it says this:
printer State: idle, accepting jobs.
"Unable to connect to SAMBA host, will retry in 60 seconds...ERROR: Connection failed with error NT_STATUS_ACCESS_DENIED"
Device URI: smb://holodeck/hp
why is that?

greetz,

Anouar from the Netherlands
Top
sleek
n00b
n00b
User avatar
Posts: 71
Joined: Thu Jan 09, 2003 5:24 am

  • Quote

Post by sleek » Tue Jan 04, 2005 1:28 am

Thanks! This works great with my HP DeskJet 880C. Been looking for a guide like this, so I'm extremely happy!
Yesterday was the deadline for all complaints
Top
linux_weenie
Guru
Guru
User avatar
Posts: 365
Joined: Wed Jun 25, 2003 12:05 am

If you have an HP-DeskJet-720C

  • Quote

Post by linux_weenie » Thu Jan 06, 2005 9:02 pm

If you have an HP-DeskJet-720C, then you will also need to make sure you

Code: Select all

emerge pnm2ppa
otherwise you will continue to get an aborted status on your print jobs even if you emerge hpijs. Hope this helps anyone using a pnm2ppa driver.

-Will
There are only 10 types of people in the world. Those who understand binary and those who don't.
Top
deXtuX
n00b
n00b
Posts: 11
Joined: Sun Jan 02, 2005 2:29 am

  • Quote

Post by deXtuX » Fri Jan 07, 2005 1:10 pm

Strangely enough, my Lexmark E220 (laser printer) wouldn't work with any of the Lexmark drivers I could find (they don't have one specifically for the E220, only the E210), so I finally chose the HP LaserJet driver though the KDE control planel just for the hell of it, and its been working perfectly ever since.
Top
saan
n00b
n00b
User avatar
Posts: 2
Joined: Tue Feb 03, 2004 3:31 am
Location: Concord, California

Works!

  • Quote

Post by saan » Thu Jan 20, 2005 4:48 am

I had similar problems with people from previous posts. After monkeying around for about an hour, I got mine working by obtaining driver(.ppd file) from www.linuxprinting.org. Emerging "gimp-print" gave me awful print result on my old Epson Stylus Color 740. Oh yeah, I skip part 2 on this how-to regarding inputing local ip address into "/etc/hosts" and it still works. Also I had to used regular user with password when configuring "smb://xxx..."

Thanks for this Tips & Tricks!
Top
Seather
Apprentice
Apprentice
User avatar
Posts: 194
Joined: Fri May 23, 2003 6:02 am
Location: South Africa
Contact:
Contact Seather
Website

  • Quote

Post by Seather » Thu Feb 10, 2005 6:11 pm

When trying to add a printer in the web admin utility, Windows Printer via SAMBA is not listed in my Device: list. I have cups and samba both in my use flags?

Edit: fixed, recompiled both and started samba before cups seemed to fix that problem
Last edited by Seather on Sat Feb 12, 2005 11:52 am, edited 1 time in total.
Top
Seather
Apprentice
Apprentice
User avatar
Posts: 194
Joined: Fri May 23, 2003 6:02 am
Location: South Africa
Contact:
Contact Seather
Website

  • Quote

Post by Seather » Sat Feb 12, 2005 11:51 am

I have the following problem,

When trying to print out a test page in the cups utility, I get the following error message in cups' log files:

Code: Select all

E [12/Feb/2005:13:50:17 +0200] Unable to convert file 0 to printable format for job 12!
I [12/Feb/2005:13:50:17 +0200] Hint: Do you have ESP Ghostscript installed?
I have even tried downloading the "ESP Ghostsscript" src, compiled and installed it, but still having the same problem.

Using the Epson Stylus Color 460 driver from gnome-print

Please?
Top
AdamG
n00b
n00b
Posts: 46
Joined: Wed Apr 17, 2002 4:56 pm
Location: USA, MA
Contact:
Contact AdamG
Website

  • Quote

Post by AdamG » Sat Feb 12, 2005 3:56 pm

Thanks..Worked Like a charm :)
Top
KFM
n00b
n00b
Posts: 58
Joined: Wed Aug 18, 2004 1:23 am

  • Quote

Post by KFM » Thu Mar 10, 2005 10:37 pm

how do I tell what my hostname and workgroup name are on a windows box?
Top
NateZ
n00b
n00b
Posts: 9
Joined: Thu Feb 05, 2004 2:42 am
Location: not found.
Contact:
Contact NateZ
Website

  • Quote

Post by NateZ » Sat Mar 12, 2005 7:53 pm

wow, thank you so much - i've been wanting to do this for so long!
Top
_Master_
n00b
n00b
User avatar
Posts: 22
Joined: Sat Mar 05, 2005 12:33 pm
Location: Tromsø, Norway
Contact:
Contact _Master_
Website

  • Quote

Post by _Master_ » Sat Mar 19, 2005 6:34 pm

thnx a bunch man :D works great with my HP Psc 2410
Fresh Gentoo User.
Top
cerealito
n00b
n00b
User avatar
Posts: 20
Joined: Sat Apr 10, 2004 5:09 pm
Location: Toulouse, Fr
Contact:
Contact cerealito
Website

works great

  • Quote

Post by cerealito » Sat Apr 09, 2005 11:43 pm

Your guide Works great with my HPLaserJet1100!
thank you very much!
Top
shanenin
Guru
Guru
User avatar
Posts: 579
Joined: Fri Nov 28, 2003 4:43 pm
Location: Rochester, MN U.S.A

  • Quote

Post by shanenin » Thu Apr 28, 2005 5:42 pm

When I go to print a test page, it starts the process(I can hear the printer move), then it just stops. According to windows XP the page is being printed, but never finished.
Last edited by shanenin on Fri Apr 29, 2005 2:43 pm, edited 1 time in total.
http://brighteyedcomputer.com
Top
YuriyRusinov
Apprentice
Apprentice
User avatar
Posts: 216
Joined: Wed Jul 21, 2004 2:46 pm
Location: Saint-Petersburg, Russia

  • Quote

Post by YuriyRusinov » Fri Apr 29, 2005 6:36 am

hulk2nd, thank you very much. I many many days unsuccessfully configured printing on Windows machines via cups before I have found this topic. Your guide is works great.
Best regards,
Yuriy Rusinov.
Top
shanenin
Guru
Guru
User avatar
Posts: 579
Joined: Fri Nov 28, 2003 4:43 pm
Location: Rochester, MN U.S.A

  • Quote

Post by shanenin » Fri Apr 29, 2005 2:53 pm

shanenin wrote:When I go to print a test page, it starts the process(I can hear the printer move), then it just stops. According to windows XP the page is being printed, but never finished.
I got it to work by setting up an account with a password. One guy on this thread said he got it to work with a guest account, so I thought I would try(unsuccesfully).
http://brighteyedcomputer.com
Top
bertaboy
l33t
l33t
User avatar
Posts: 604
Joined: Fri Nov 05, 2004 2:56 am

Re: Solution to SMB/CUPS password problem on Win shared prin

  • Quote

Post by bertaboy » Wed May 11, 2005 2:44 am

billbalt wrote:Normally, a Windows printer is shared with Everyone/Print permissions. No password is required to access the printer.

To print to a printer configured in this manner from Linux using SMB/CUPS, you must connect using the guest account using no password.

When you don't set it up properly, you get this error: "SMB tree connect failed: NT_STATUS_ACCESS_DENIED"

If you get this error, go to http://localhost:631. As you are adding or modifying your printer, when you get to "Device URI:" , enter " smb://guest:@computername/printsharename".
Thanks, that solved it for me
Top
thomasa88
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 143
Joined: Wed Apr 13, 2005 6:58 pm
Location: Sweden

  • Quote

Post by thomasa88 » Tue May 31, 2005 6:40 pm

Weee 8)

I have tried with foomatic and kde setup (the cups admin page wouldnt find my printer model) and that worked ok when the printer was connected locally, but when it runs through a win2k I have to use ghostscript,

thx for telling me how :D
- thomasa88
Top
blackcell
n00b
n00b
User avatar
Posts: 56
Joined: Sat Aug 17, 2002 6:48 am
Location: Oregon

  • Quote

Post by blackcell » Wed Jun 01, 2005 2:05 am

Worked great for me on first try.
I used

Code: Select all

smb://username:pass@192.168.100.2/hpdeskjet
.

Thanks :D
Top
Garth
n00b
n00b
User avatar
Posts: 35
Joined: Wed Jan 21, 2004 8:12 pm
Location: Michigan

  • Quote

Post by Garth » Fri Jun 03, 2005 6:22 pm

Thanks for the HOW-TO. Works fine now.

I tried to connect to a Windows98 connected printer and found that the smb string had to simply be:

Code: Select all

smb://computername/printername
Make sure you don't have a password set on the printer share in Win98. I couldn't find a workaround for that.
Garth
Top
Post Reply

107 posts
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • Next

Return to “Documentation, Tips & Tricks”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic