System Administration

How to configure remote printer using command line

 
SOLVED
Go to solution
Carles Viaplana
Valued Contributor

How to configure remote printer using command line

Hello,

I need to create more than 150 printers in a Suse Linux 8, so I'm interested to create an script that generates all automatically.

My system uses lprng and cups for printer configuration but I just know shell menu so I haven't any idea if I can create a printer via command line instead shell menu.

Is it possible? What're commands I should use in order to create a printer?

Thanks in advance for your help.
Regards,

Carles
4 REPLIES 4
Ivan Ferreira
Honored Contributor
Solution

Re: How to configure remote printer using command line

You can use the lpadmin command to create printers from the command line.

The CUPS System Admin Manual gives the exact details of the command and it's options:

padmin -p local_printer_name -v ipp://linux-box/printers/Printer_Name -m laserjet -E

See also:

http://www.bo.infn.it/alice/alice-doc/mll-doc/linux/advanced/node9.html
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Carles Viaplana
Valued Contributor

Re: How to configure remote printer using command line

Hello,

Thanks for your help but I still have one question: Does this command work with windows printer servers?

newmoscu:~ # ping wprserver
PING wprserver.santpau.es (193.146.12.36) from 193.146.12.113 : 56(84) bytes of data.
64 bytes from seti.santpau.es (193.146.12.36): icmp_seq=1 ttl=128 time=0.409 ms
64 bytes from seti.santpau.es (193.146.12.36): icmp_seq=2 ttl=128 time=1.62 ms

--- wprserver.santpau.es ping statistics ---
2 packets transmitted, 2 received, 0% loss, time 1009ms
rtt min/avg/max/mdev = 0.409/1.016/1.623/0.607 ms
newmoscu:~ # lpadmin -p pinfo7 -v ipp://wprserver/pinfo7 -E
lpadmin: Unable to connect to server: Connection refused
newmoscu:~ #

Thanks in advance for your help.
Regards,

Carles
Ivan Ferreira
Honored Contributor

Re: How to configure remote printer using command line

It should work, but ensure that you enabled IPP in the windows print server:

http://support.microsoft.com/kb/323428/en-us
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Carles Viaplana
Valued Contributor

Re: How to configure remote printer using command line

Hello,

Service was stopped manually. After restarting it worked fine.

Thanks and regards,

Carles