Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I connect my Windows printer to a Linux (RHEL5) box via samba? I'm looking for a clear configuration file

share|improve this question
up vote 5 down vote accepted

You have to configure CUPS. Open the CUPS web interface at https://localhost:631 and click on "Add Printer" (don't be scared if it takes a while, it's scanning the network for network printers). If it does not automatically list your printer you can choose "Windows Printer via SAMBA". As URL enter:

smb://[workgroup/]server[:port]/printer (workgroup and port are optional).

Next you just chose the right model and the printer should work.

share|improve this answer
Pls give me configuration of samba for printer ! Am i want to create a smb account for printer ? – Kumar Sep 27 '10 at 9:31
When i use administration tab, i ask user name and password, What's it ? – Kumar Sep 27 '10 at 9:45
On Ubuntu (and probably other sudo-oriented distributions) it's your user name and password. On other systems it's the root account. – tante Sep 27 '10 at 10:03
And no, you need no samba account for the printer. Cups talks to the Windows host, the samba configuration is only relevant if you want to export your printers on Linux to other systems. – tante Sep 27 '10 at 10:04
thanks by your guidance i did it successfully. I got clear idea about cups. – Kumar Sep 27 '10 at 12:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.