[SLE] Notes on Samba / CUPS printer configuration

From: Paul W. Abrahams (abrahams_at_acm.org)
Date: 01/20/04

  • Next message: marcia: "Re: [SLE] Home building software"
    To: suse-linux-e@suse.com
    Date: Mon, 19 Jan 2004 22:27:56 -0500
    
    

    I've finally gotten my Samba / CUPS interactions to work, after lots of
    fiddling and unsuccessful experimentation, so I thought it might be useful to
    note here a few critical points that I missed the first time around.
    Corrections are invited.

    There are two separate configuration challenges: Windows client/Linux server,
    and Linux client/Windows server. To keep things straight, the server machine
    is the one that has the printer and the client machine is the one that wants
    to print something. I'm working with Windows ME, but I assume that most of
    this works for other Wins also.

    Linux client is the easier case, assuming that the Windows printer is working
    correctly within Windows. On the Windows side, you have to bring it up in
    Control Panel and give it a share name (WINPRINT, say). Now supposedly that
    should make it available for Linux printing without further ado under the
    name WINPRINT@HOST, but I have not been able to get that to work.

    So what you need to do is to create an appropriate printer (let's call it WPR)
    on the Linux client such that printing to that printer will cause the print
    file to print on the Windows server. There are three ways to create the
    printer: using the CUPS configurator via the local webpage http://
    localhost:631/admin, using Yast2 via Hardware / Printer, or adding the
    necessary entries to the file /etc/cups/printers.conf.

    Using Yast2, you choose to add a printer named WPR. The critical choice is
    the next one, where you select to print via an SMB network server; the
    following choices are straightforward.

    Using the CUPS configurator, you choose Add Printer, then set the name as WPR
    and the location as the hostname of the Windows machine (I'm not sure if
    that's really necessary, though). For the device, choose Windows Printer via
    Samba. For the Device URI, choose

       smb://workgroup/HOST/WINPRINTER

    (you can usually omit the workgroup, though). The rest is straightforward.

    For the case of a Linux server and a Windows client, the configuration is best
    done via the Samba configuration program SWAT, available as a webpage at
    http://localhost:901. (Bug: you may need to run /etc/init.d/xinit restart to
    get SWAT to work.) You should create a spooling directory at /var/spool/
    samba with all permissions turned on and the sticky bit (t) set, though /tmp
    can also be used for the spooling directory. Now go to the PRINTERS section
    and create a printer with the same name as the Linux printer you want to
    print on. Using any other name won't work. (The name is the same one you'd
    use in an lpr command.) Set the path to /var/spool/samba. Note that this is
    the path of the spool directory, not of the printer itself; /dev/lp0 will
    *not* work here. Set "guest OK", "printable", "browseable", and "available"
    all to "yes" and "printing to "CUPS". Now you can create the printer.

    Next, go to the GLOBALS section of SWAT and under Printing Options, set the
    printcap name to CUPS and printing to cups. Confirm the changes and you're
    ready to print to your new printer.

    To do all this under Yast2 (not possible in pre-9.0 versions of Yast2), you go
    to the Samba Server section of Network Services, then Next, then Advanced,
    then Add. Then add the new printer, again with the same name as the Linux
    printer you want to print on. The path should be /var/spool/samba as with
    SWAT.

    Now for the Windows side. Bring up Network Neighborhood, then look at the
    available hosts. One of them should be your Linux machine. Click on that to
    see what's available. The name of your printer should appear. Right-click
    on that, then choose Install. The rest should be straightforward, and you'll
    have a new printer in the Printers section of Control Panel.

    Good luck!!

    Paul Abrahams

    -- 
    Check the headers for your unsubscription address
    For additional commands send e-mail to suse-linux-e-help@suse.com
    Also check the archives at http://lists.suse.com
    Please read the FAQs: suse-linux-e-faq@suse.com
    

  • Next message: marcia: "Re: [SLE] Home building software"

    Relevant Pages

    • Re: Future of IT in Lebanon
      ... It's the same Linux code base. ... Microsoft Office on a Windows server, it will install and run fine, the main ...
      (soc.culture.lebanon)
    • Re: Question about Red Hat Linux Enterprise
      ... we have is running Windows 2000 Server ... Luckily running Apache + MySQL on a Linux system is not a lot ... MySQL database and injecting it back into the MySQL installation ...
      (comp.os.linux.networking)
    • Re: Sweet Success
      ... Let's continue to assume that I prefer Windows to anything else: ... neither Linux nor Windows may be the answer. ... While it may well be initially less expensive to install a Linux-based ... of Linux simultaneously, along with Windows Server, AIX, and OS/400. ...
      (RedHat)
    • Re: [Full-disclosure] 70 million computers are using Windows 98 right now
      ... Linux is definitely not a natural migration pathway. ... Windows 2000, Windows XP, and Mac OS X seem to work pretty ... > desktop to server. ... But then the persons across the sea just can't install ...
      (Full-Disclosure)
    • Re: Samba
      ... the one asking about setting up a linux file ... allow Linux to work with files on a Windows PC and not vice-versa. ... Samba works both ways, as a client _and_ as a server. ...
      (Debian-User)