LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   remote cups printing to a smb/cups print server? (http://www.linuxquestions.org/questions/linux-networking-3/remote-cups-printing-to-a-smb-cups-print-server-227861/)

justanothergeek 09-07-2004 05: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://1.2.3.4:9100 -m $printer.ppd
cupsaddsmb -H fqdn.somewhere.edu -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 06: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
/usr/bin/printconf-gui
to create new queue's

justanothergeek 09-15-2004 09: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:
samba-client-3.0.3-5
samba-3.0.3-5
samba-common-3.0.3-5
system-config-samba-1.2.9-2
cups-1.1.20-11.1
cups-libs-1.1.20-11.1
Omni-foomatic-0.9.1-6
foomatic-3.0.1-3
hpijs-1.6-1

* Configuring Samba
1. Configure smb.conf;

------------------ begin --------------------
[root@prtsvr samba]# cat smb.conf
[global]
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

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

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

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

[printers]
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
users:x:100:prtadmin

3. addsmb users
smbpasswd -a root
passwd = adecentpasswd

smbpasswd -a prtadmin
passwd = anotherdecentpasswd

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

------------------ begin --------------------
ServerName prtsvr.at.some.university.edu
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>

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

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

Browsing On
BrowseProtocols cups
BrowseOrder Deny,Allow
BrowseAllow from @LOCAL
Listen 127.0.0.1:631
------------------- end ---------------------

5. vi /etc/cups/mime.convs

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

vi /etc/cups/mime.types
umcomment:
application/octet-stream

6. install drivers in /usr/share/cups/drivers
a. Download and install (on Win) PS driver for windows from http://www.adobe.com/support/downloa...atform=Windows
b. Extract the Following via the Windows "Find files and folders" utility
ADOBEPS4.DRV
ADOBEPS4.help
ADOBEPS5.DLL
ADOBEPSU.DLL
ADOBEPSU.HELP
ADFONTS.MFM
DEFPRTR2.PPD
ICONLIB.DLL
c. scp these files to /usr/share/cups/drivers on the print server

7. install printer ppt:
download approprete ppt file from http://www.linuxprinting.org/printer_list.cgi
cp them into /usr/share/cups/model/

or

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://1.2.3.4:9100 -m $printer.ppd
cupsaddsmb -H prtsvr.at.some.university.edu -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

OR...

(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 03:49 AM.