Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Using password protected Windows printers System
Adding Windows based printers to MacOS X can be a bit tricky. The Print Center and CUPS web interface don't quite do everything that's needed if passwords are necessary to print to Windows printers. The Unix shell tools lpadmin and lpoptions are the key. Here's a recipe that has been successful for me.

First, you've got to find out the name of the printer and the name of the Windows server. The smbclient tool can be used from the command line if you know the name of the server. For example...
 % smbclient -n user -W workgroup -L serverName>
...generates a list of all the available file servers and printers on a server. Otherwise, if there's a Windows computer somewhere nearby, start up the 'Add Printer' tool and it will browse Windows network printers. Note the name of the server and the name of the printer.

Next, use the Apple-provided CUPS software to equip the printer. CUPS provides a web interface for printers at http://localhost:631/ which is pretty slick. I couldn't figure out how to provide a Windows password using that interface, though. Going down a level to the lpadmin tool works well. In the following example, 'printerName' means whatever name you want to give to the printer, 'winServer' is the Windows server, 'Domain' is the authenticating domain, and 'winName' is the printer name provided by Windows. To create the printer and give the correct Windows address:
 % lpadmin -p printerName -v
That should be entered on one line, with a space after the '-v'; it was broken here to narrow the display width. To provide the (required) PPD file:
 % lpadmin -p printerName -P ppdFile
PPD files can be found in /Library -> Printers -> PPDs -> Contents -> Resources -> English.lproj/. Once the printer is defined, you've got to force the CUPS daemon to re-read it's configuration with:
 % sudo killall -HUP cupsd
To debug this whole business, it can be very useful to enable CUPS debug-level logging. This can be done by editing the file /private -> etc -> cups -> cupsd.conf and changing the line 'LogLevel info' to 'LogLevel debug'. CUPS writes its log files in the directory /var/log/cups.
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)

Using password protected Windows printers | 1 comments | Create New Account
Click here to return to the 'Using password protected Windows printers' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Using password protected Windows printers
Authored by: ichou on Mar 09, '03 06:14:43PM
The posts found on printing to Windows printers via SAMBA/CUPS/Gimp-Print are great. After much fighting with Windows, I finally got my wife's new iBook (MacOS X 10.2.4) to print to a very old Canon BubbleJet BJ-100 printer that is connected to an old Windows 98 box that I use as a file/print server and router for my home LAN.

There are two things that I needed to realize to allow this all to work. First of all, Gimp-Print does not provide any old BJ-100 drivers. However, I used the lowest end driver from the same manufacturer (BJC-30 -- the lowest end color Bubble Jet drivers for my old B&W inkjet). For people like me who have these old printers, I recommend people try drivers for the same manufacturer and see if one works.

The other very important detail was that I was fighting with the SMB// URI. I tried all the various permutations if username, password, workgroup, server name, and shared printer name that people have suggested to no avail. Finally I remembered that Domans and Workgroups were really a Windows NT addition, and Windows 9X, although they are capable of participating in a Workgroup, really don't care about much except username and password. So instead of all the fancy workgroup/server URI's, I simply used:


Spaces and all and it worked without complaint. I had all kinds of problems because my "workgroup" is "@HOME" (from the defunct excite@home ISP). I feared that messing with my workgroup would prevent the local broadband ISP's DHCP server that took over @home's customers from assigning my machine an IP address, but now I don't have to worry about it. MacOS prints to it fine.

I'm rediscovering the Mac with my wife's new computer, and the secret to the success of various tasks, such has printing to a password protected Windows printer or other such things, is that the simplest solution will probably work, so one should try the simplest solution rather than all the crazy stuff.

[ Reply to This | # ]