Jan 21 2012

Printing to Windows Shared Printers with Lion

This week has been a struggle of getting Lion to play nicely with Windows Server 2003 based print queues.  After numerous visits to a variety of forums, trying everything from forcing them out with Workroup Manager to IP Printing, I have found a (somewhat) simple solution.

Scenario:  I would add a printer that was hosted on a Windows share, send a print job and the printer would act like it was going to print, then pause.

It usually would never prompt me to enter a username and password (as required with Windows Server, even when group EVERYONE can print.) and would just set the print queue to paused.  Having had an issue with Keychain entries not working, my first step was to delete any keychain entries for the printers, which made no difference.

The logs would be generally full of this type of error:

Backend returned status 1 (failed)
[Job 58] Printer stopped due to backend errors; please consult the error_log file for details.
[Job 58] End of messages
[Job 58] printer-state=5(stopped)

This didn’t help much because I was consulting the error_log file, and this was the error. I tweaked just about every imaginable setting, even attempting to add it via the localhost:631 web based CUPS interface.  No matter what I tried, I never got much further than this.

Eventually it dawned on me to check the config files using the command line.  One thing I noticed right away was that in the /etc/cups/printers.conf file, there was a line called AuthInfoRequired and the value was negotiate.  I had an old printer that was working that I had added prior to the Lion upgrade, and that value was set to username,password instead of negotiate.  Surely it can’t be this easy.  I made the change in vi, saved it, tried again and it still failed.  It then occurred to me that since I was modifying this file, I needed to restart cups.   Even after this, it never prompted me for the username and password, which made me believe it wasn’t the solution and I moved on.

Fast forward three days and it’s 3:30 on Friday afternoon.  I just kept going back to that printers.conf file knowing there had to be something with that one difference.  Nothing else I found in three days of working on this was different, that was the only piece.  I tried it again, and made sure I cleared out every Keychain entry for the variety of printers I had tried.  I completely cleared my printer list and started fresh.  Step by step, here is what I did:

  1. Cleared all references to the printer out of Keychain.
  2. Deleted the printer(s)
  3. Click + to add Other Printer or Scanner.
  4. Click the Advanced Tab.  (If Advanced Tab isn’t available, Control-Click in the toolbar and choose Customize Toolbar and drag the advanced button to the toolbar)
  5. Under Type choose Windows printer via spoolss
  6. In the URL, make it smb://servername/printername
  7. Give it a Name in the Name: field.  I stuck with the same name just for kicks, but it shouldn’t make a difference.
  8. Choose the printer driver/model and click Add.
  9. Jump over to Terminal and edit /etc/cups/printers.conf and change the AuthInfoRequired negotiate to AuthInfoRequired username,password using vi or text editor of choice.
  10. Save the changes and restart the computer
  11. Print a test page and you should be prompted to enter Windows credentials.  Save them in Keychain and bask in the glory of a functioning printer.

If you are not familiar with how printers.conf looks, each printer is included in a section that will start with <Printer the_printer_name_here> and all settings between that tag and </Printer> apply to that printer.  If you have multiple printers, you may have to scroll through it to locate it.  The AuthInfoRequired is about three lines down, directly under the UUID field.

By now, you’re probably wondering why didn’t I just click Windows and add it there.  For whatever reason, when I did, it would eventually show the domain, but only one or two random computers.  Thinking it was taking a bit to scan the network, I let it sit and think.  Nothing.  Once the server happened to be one of the random computers that showed up, so I clicked the printer and added it with no problems, just as in Snow Leopard.  For whatever, reason it doesn’t work the same in Lion, especially (it seems) when the server is on a different subnet than the client machine.

As background of why I discovered this, we moved away from central print queues due to some networking/territorial disputes/politics on our Macs and moved to strictly IP based printing.  If the printer was not networkable, we would use direct USB connections.  We are now moving to a managed printing system that requires it to go through a server to track page counts for supply replenishment and billing.  We are also moving toward using PaperCut to monitor and eventually attempt to reduce unnecessary printing.  Both of these tasks require a hosted print queue.

The IP based printing works flawlessly.  With my Snow Leopard machines, moving to the Windows print queues has been painless and worked (so far) without any problems.  Part of the problem with our old way of managing them had to do with some integration issues with the Macs.  Over the course of the past few months, I believe we’ve solved most of them.


May 10 2010

Ubuntu and Microsoft’s Increasing Irrelevance

For the longest time while a Mac user over a decade ago, there was a definite boundary of “stuff” that one could do with a Mac.  I’ve tried to pinpoint my switch to Windows and I think it was just by sheer lack of “stuff” to do on my computer.  Couple that with becoming part of the corporate world, and I suppose that’s just what happens.  During my time as a Mac user, I dabbled with various flavors of Linux and always ran into the same thing.  If you were not a programmer or hardcore computer “techie” there was not much for you in Linux.  Web browsing, e-mail, basic word processing, and that was about it as far as mainstream applications go on a desktop computer.  It never lost its value as a server, and has increased in that regard even more so.  For this discussion, however, I’m talking about the desktop computer that you check your bank account, check Facebook and share digital media.

Fast forward to now.  Since it’s release, I have upgraded two machines to Ubuntu 10.04 and I am just blown away in how far it has come.  Every release of Ubuntu Linux is better.  I’ve even got a few friends and family running Ubuntu exclusively, and they have never even noticed that Windows XP is gone.  In fact, you tend to notice the OS even less with Linux.  And really, that’s the way it should be.  I guess that’s why I’ve fallen in love with my Mac.  It just does what I want and stays out of my way.  A few software updates here and there, but otherwise the OS stays out of my way.

Ubuntu started out as a very polished and commercial-looking flavor of Linux.  I have been regularly using it since 5.10.  Each version brings us closer to even more freedom in our desktop computing needs.  I kept a virtualized copy of Windows XP and Windows 7, just in case.  Since leaving one of my customers that had a VPN that wouldn’t work in anything other than XP, I have not booted up those virtual machines since.

Where once I was dependent on the applications in Windows XP, I find that I no longer need it for anything.  I’m at a point where I’m surprised that Microsoft products are completely irrelevant in my personal life, and increasingly less relevant in my business role.  Do I love Office for Mac?  Not really, I could switch to something else if I had the ambition to learn it.  Could I live without it?  Absolutely.   That makes me happy.

If suddenly my Mac went away, I would have not trouble switching to Ubuntu exclusively.  The Mac is still obviously a commercial release and the hardware/software integration is second to none.  I doubt they have much to fear from Ubuntu, but the other player in this business sure does.  What I don’t understand is that probably significantly more development and resources went into Windows 7 and it wouldn’t even be a consideration for me if my Mac self-destructed.  If you haven’t yet, go get Ubuntu.  It’s free and easy.  You just might find yourself surprised.


Feb 10 2010

Mac vs. PC is dumb

This whole game of Mac vs. PC is really a game that takes a lot of energy, but yields no results.  I, myself, have been sucked into this game and really it has served nothing but waste time.  Both sides think theirs is better and, really, there’s no changing minds.  It’s one of those divisions that people become emotionally invested in for some reason.

In my position, I find that I must remove myself from that and try to find the right tool for the job.  There’s no sense buying shovels if you need rakes.  Sure, you can do some raking functions with a shovel, but wouldn’t it make more sense to buy a rake if you need to rake?  But what I see in this paradigm is people arguing why rakes are better than shovels and vice versa.

If you step back and look at your task, either you need a rake or a shovel.  I know, my analogies are odd, but I think it’s relevant.  If we’re editing spreadsheets and word processing, give me a PC with a huge monitor any day.  If I’m creating something other than an Office document, give me a Mac any day.  It all depends on the task at hand.

So as I investigate technology for our school district, I find that these tired old Mac vs. PC debates start up. What I attempt to do in every aspect of my job is to find the right tool for the job.  I ask questions, I see what works and try to avoid what doesn’t.  Networking in today’s world is excellent.  Lots of people blog about what works and what doesn’t.  It’s just a matter of seeking out that information and using it.  There really is no sense in repeating the same mistakes someone else has already made.

I think what bothers people more than anything is change.  Change is both difficult and wonderful.  What is becoming more and more apparent is that in the years ahead, it’s not going to matter one bit what camp you live in.  Whether it be Mac, PC, Linux, or whatever else, it’s all just a different way of getting to the same place.  Google doesn’t care what I use to search, nor does most of the web for that matter.

I just get frustrated arguing over whether we should buy shovels just because everyone else rakes with a shovel.


Oct 21 2009

Lovin’ Linux – Again

The highlight of my day today was getting even closer to having my Ubuntu Linux lab ready for production.  I have not been able to devote the time to it that I wanted, so I’m working on it in bits and pieces, which is why it seems it’s gone on forever.  However, I’m now about one day away from having it ready to pilot.

I worked out the problem that I was having with the wireless network connection and have had the ones that are fully operational working all of this week without a hitch.  The trick was to leaving the roaming mode enabled, and then removing the requirement to enter the a password to unlock the keyring to connect to the wireless.  This was an ugly hack, but simply leaving the password blank was fine.

Security was mitigated because the only thing that is stored on the keyring is this password.  And since the username and password are posted all over the place and everyone knows it, there’s really no point in actually making you enter it.  When dealing with kids aged 9-12, there’s really no way to implement rock solid security in a lab environment.  Anyway, I digress, security is another matter entirely and a project for another decade.

The second part of my day was spent configuring a lab for Kindergarten through second grade students. It was a rush job, but my team and I managed to get it going in just over an hour.  We still have a little tweaking to do, but it is much better than it was and fully operational.

During that fun job, we were struggling with the problem of teachers that cannot play DVD’s on their computer.  Why this has to be such a difficult process is beyond me.  In my Mac, I put the DVD in and it plays.  With a few minor tweaks, any Linux disto will do the same.  Why, in a PC, is getting a DVD to play so hard and unreliable?  And why does Windows associate Windows Media Player with DVDs when it cannot play them?  I just don’t get why this has to be so difficult to play a DVD.  I don’t want to spend a lot of time on it anyway, because I have written a grant and been funded to buy new laptops for all of the teachers, so it’s only a matter of time before I have to go through all of it again.

I love my job, even on days like today when I want to drop kick computers just to see what happens.