-   Linux - Networking (
-   -   remote cups printing to a smb/cups print server? (

justanothergeek 09-07-2004 04:43 PM

remote cups printing to a smb/cups print server?
Thanks in advance -

I'm working toward a print server via cups/samba for all os types... Basically printing raw, got the windows driver downloads to work, and printing works ok for those clients but now I need to get linux clients to print to the cups portion of the server remotely. I want to do something like this from a remote linux box:

lpr -P doc /etc/hosts

(doc is a printer configured and shared out via smb/cups to clients via:

lpadmin -p $smbptrname -D "printer description" -E -v socket:// -m $printer.ppd
cupsaddsmb -H -U root -h localhost -v $smbptrname

The idea here is to have the print jobs from different clients pipe through one raw queue.

so.... My question is:

How do I print from a remote Linux/*nix client to a smb/cups print server without using the smb-client?

- adam

arno 09-08-2004 05:09 PM

Use lpd.

Create on each unix client a remote printer queue and connect it to the (doc) queue on your printer server

Redhat 9 uses
to create new queue's

justanothergeek 09-15-2004 08:31 AM

Thanks arno,

Actualy I've decided to just use a windows 2000 server as a print server, vith the unix and mac print services turned on... after all, who wants to admin printing, and printing has always been somthing windows has done better. As for my *nix clients I will use cups with a raw queue setup.

As for anyone browsing this post I thought it be nice to add a howto on implimenting samba/cups, and the ability to download printer drivers directly from samba to the windows clients via windows print wizard:

This is a howto for implimenting a printserver via samba-3.03-5/cups-1.1.20:

The Following packages will nee to be installed:

* Configuring Samba
1. Configure smb.conf;

------------------ begin --------------------
[root@prtsvr samba]# cat smb.conf
workgroup = aworkgroupname
load printers = yes
browseable = yes
printing = cups
printcap name = cups
#encrypt passwords = yes
#lock directory = /usr/local/samba/var/lock
#interfaces = eth0
security = user
#passdb backend = tdbsam

comment = PS Print Drivers
path = /etc/samba/drivers
guest ok = no
browseable = yes
read only = yes
write list = prtadmin,root

comment = HP LaserJet 5si/5si MX PS
printable = yes
path = /var/spool/samba
public = yes
guest ok = yes
printer admin = prtadmin,root

comment = HP Color LaserJet 8550 PS
printable = yes
path = /var/spool/samba
public = yes
guest ok = yes
printer admin = prtadmin,root

comment = All Printers
path = /var/spool/samba
browseable = no
public = yes
guest ok = yes
writable = no
printable = yes
printer admin = ptradmin,root
------------------- end ---------------------

2. adduser prtadmin
prtadmin:x:500:100:Print Server Admin:/home/prtadmin:/bin/bash

3. addsmb users
smbpasswd -a root
passwd = adecentpasswd

smbpasswd -a prtadmin
passwd = anotherdecentpasswd

* Configuring CUPS
4. Configure cups to do the following;

------------------ begin --------------------
AccessLog /var/log/cups/access_log
ErrorLog /var/log/cups/error_log
LogLevel info
MaxLogSize 0
Printcap /etc/printcap
PrintcapFormat BSD
MaxClients 100

<Location />
Order Deny,Allow
Deny From All
Allow From 192.168.0.*

<Location /admin>
AuthType Basic
AuthClass System
Order Deny,Allow
Deny From All
Allow From 192.168.0.*

<Location />
Order Deny,Allow
Deny From All
Allow From

Browsing On
BrowseProtocols cups
BrowseOrder Deny,Allow
BrowseAllow from @LOCAL
------------------- end ---------------------

5. vi /etc/cups/mime.convs

application/octet-stream application/vnd.cups-raw 0 -

vi /etc/cups/mime.types

6. install drivers in /usr/share/cups/drivers
a. Download and install (on Win) PS driver for windows from
b. Extract the Following via the Windows "Find files and folders" utility
c. scp these files to /usr/share/cups/drivers on the print server

7. install printer ppt:
download approprete ppt file from
cp them into /usr/share/cups/model/


Find one from pre-existing printer on Windows. (find for *.PPD (this is prob better))

8. restart smb & cups:
/etc/init.d/cups stop
/etc/init.d/smb stop
/etc/init.d/smb start
/etc/init.d/cups start

9. add the printers:
download $printer.ppt to /usr/share/cups/model/$printer.ppd (see step 7.)
add smb.conf printer def
/etc/init.d/smb restart
lpadmin -p $smbptrname -D "printer description" -E -v socket:// -m $printer.ppd
cupsaddsmb -H -U root -h localhost -v $smbptrname
give above smb root passwd

9.5. Configure cups-lpd to run out of xinet.d for printing like `lpr -P doc /etc/hosts`:
a. vi /etc/xinet.d/cups-lpd
b. change "disable = yes" to no
c. reboot

10. Add printer to Windows:
a. start -> search -> for files or folders...
b. "Search for other items:" Computers
c. Computer Name: prtsvr
d. select "ptrsvr"
e. right click and "connect" any printer


(prefered) Add printer to windows via APW:
a. start -> settings -> Printers...
b. Add Printer Wizard
c. Next
d. Network Printer
e. "Type the Printer Name" = \\prtsvr\printername

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