LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   CUPS Shared Printer problems (https://www.linuxquestions.org/questions/linux-networking-3/cups-shared-printer-problems-205742/)

1kyle 07-16-2004 04:17 AM

CUPS Shared Printer problems Kernel 2.6
 
Hardware details -- all in the same LAN IP address range 192.168.7.2/24


LAPTOP A (SUSE 9.1 no printers attached)

DESKTOP B with local printer (SUSE 9.1) Blackdog
DESKTOP C with local printer (SUSE 9.1) Greyfox
DESKTOP D with local printer (WINDOWS XP PRO) Gingercat


LAPTOP A wants to use printers on DESKTOP B, DESKTOP C and DESKTOP D

Now setting up the LAPTOP as a CUPS CLIENT I get no problem connecting up to use the printer(s) on ONE machine (YAST Printer setup) whichever box I want --even the SAMBA printer shares are OK.

BUT if I want to add another (MACINE not Printer) it deletes the configuration and starts again -- even setting up to connect to the SAMBA SHARE (For the Windows box) the setup dialog deletes the previous configuration. There's no option to ADD extra queues / remote machines .

I can access as many printers as I like so long as they are connected to ONE BOX.

Note all these printers are LOCALLY attached to their respective machines.

I don't seem as a CUPS CLIENT to be able to access more than ONE BOX.

Is this a restriction or have I done something wrong or do I have to set one box up as a ROUTER BOX which I don't really want to do.

Surely I should be allowed to access ANY RESOURCE anywhere in the enitire NETWORK (provided I have the necessary permission authority).

Note on SUSE 9.1 there's no KPPrintersetup or setup printers via KDE -- It's all done in YAST.

Thanks

1kyle 07-17-2004 05:25 AM

I see plenty of people have viewed this topic -- but no suggestions.

I'm surely not the only person who surely needs to connect a computer to access a printer on more than 1 remote Box -- and what do you guys do in a network of mixed Windows and Linux machines when you need to access LOCAL printers on the remote machines.

CUPS seems to allow you only to configure print share access to 1 REMOTE machine , and if then you want to add SAMBA print shares you then lose your CUPS configuration for the remote Linux box.

Thanx

andrewdodsworth 07-17-2004 06:12 AM

Well I have pretty much the same setup as you (SuSE 9.0 rather than 9.1) but no local printers but using 2 remote Windows printers via samba client.

What I did was use the web CUPS admin tool - first you need to add a printer admin user before you can use this tool - in a shell as root 'lppasswd -a linux_user_name'.

Then - 'localhost:631 in Konqueror' - this should bring up a nice web interface - click on Manage Printers - you should see your existing printer there - click on add printer ..

at this point it prompts you for the username and password that you set up using lppasswd (moment of panic for me as I had to try and remember the password which was different from my linux one!)

Fill in the name location and description with whatever you want and Continue - for Samba printers device is Windows samba printer. When you get to the url the only configuration I found that worked for me was
smb://win_user:password@win_machinename/win_printer_sharename

You then need to select the model and diriver for your selected printer - on my CUPS installation there are separate lists for HP and Hewlett Packard so if it's an HP check both lists for the model - use the recommended driver if there is one. That's it - if you click on Printers again it should show you the printer active accepting jobs - try a test print. (Then when nothing happens turn on the Windows machine!).

For remote linux CUPS printers I don't know the answer (yet - as it's one of the things on my to-do list) but presumably if you set up one of the remotes first then look at the configuration in the CUPS web manager you should be able to work it out (if it's there).

Good luck

1kyle 07-17-2004 06:22 AM

Thanks Andrew -- That's great for the Windows printers -- works OK

Now for the Linux one's. I see your in the UK as well - so being a horrible rainy Saturday I'll try and investigate this further -- Can't wait for the Footy to start again --Aug 15 Chelsea V Man Utd -- great game for season start.

Thanks again
-K

andrewdodsworth 07-17-2004 07:51 AM

The sun's now shining but what the heck - had a look at YaST (I've got SuSE 9.0 also on a laptop and I haven't bothered adding printers yet) and if you go into printers it has already installed 'Listen to remote CUPS servers..' is there but like you I can't get it to see any! Although my main server is linux running CUPS server and is the one that has the remote Windows printers, to my mind they should also be available for remote CUPS clients to attach to.

Anyway went to configure (top box) .. Other kind of setup (bottom button) .. Other Printer (set URL) .. smb://user:password@server/queue .. and the rest of it follows the CUPS configuration routine and it works!

Now in YaST printers I have 'New Queue for Already Configured Printer' in the top box and my new installed printer in the bottom box.

Now back to my server to see what YaST can find:

Well apart from listen to remote it has under Already installed printers (and I guess you have something similar)
- not Yast2 -
Configured as:
queue1, queue2

Now to hit change .. Advanced .. CUPS server settings

Browsing is on
Access .... tried adding IP address of laptop - no dice - time to read the manual!

Well at least I now know that you can successfully use YaST to add a Windows printer!

andrewdodsworth 07-17-2004 11:43 AM

Yes - I see what you mean. Ithought that I'd cracked it by configuring the client to use CUPS client only and then attaching to the remote CUPS server. However, as you pointed out you can only have one server. In my case, that server does in fact have connections to all the remote printers. So therefore I can print to any of the printers it can see. Therefore could you set up one of your linux desktops to be able to print to all your printers and then use that as a gateway for the laptop as CUPS client only.

A nasty fixit but until I work out how to get the CUPS to CUPS stuff working it may do.

andrewdodsworth 07-17-2004 04:22 PM

Got it!

You need to make sure that all linux machines are running CUPS server and in their /etc/cups/cupsd.conf find the bits that relate to Browsing and <location />

In server with printer you want to share

BrowseAllow @LOCAL
Browsing On
<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From 127.0.0.2
Allow From 192.168.1.0/24
Allow From @LOCAL
</Location>

{192.168.1.0 is my local network}

In client

BrowsePoll 192.168.1.250:631

where 192.168.1.250 is the IP address of the server with the printer.

If you want to poll more than one print server I think you just add more addresses.

Restart cups and it'll find all the printers on the remote server.

I also found out that you can use a shell command to add remote printers :

lpadmin -p <printername> -E -v ipp://192.168.1.250/printers/<printername>

{replace 192.168.1.250 with the IP address of the server}

Once again you can add more remote printers

This is appears to be persistent - I now need to undo that one now I've found the other way as I've got duplicate printers now!

{edit}
/etc/cups/printers.conf apparently gets written by cups - it contained my command line remote printers - deleting the entries here removed them from my printers list.


1kyle 07-18-2004 04:46 AM

Thanks for your time and effort Andrew.

That's what I like about this Forum -- people are always willing to post their answers / expriences.

Cheers
-K

andrewdodsworth 07-18-2004 05:46 AM

No problem - as I said it's been on my to-do list for a while - good to get it ticked off! I'll double check it later on by setting up another linux box with remote printers to make sure multiple remote servers are found.

By the way it also triggered some more research - as a result of changing my configuration for CUPS it reset the order of my init scripts back to the default which in SuSE 9.0 is network before PCMCIA (SuSE 9.1 is the other way round) - no good for a laptop with cardbus wireless card!

Now about to crack that one and learn how to write my own init.d script!


All times are GMT -5. The time now is 09:32 PM.