Printer Sharing Windows 7 and Snow Leopard 10.6


Posted on 18th December 2009 by Mike in Atlanta Computer Repair

, , , , , , , ,

Today we ran into a problem between Mac OS 10.6.2 Snow Leopard and Windows 7 Printer Sharing. Both machines had the correct drivers installed, and the printer was shared from the Win7 box with full permissions for everyone, yet we could not connect to it from the Mac. SMB file sharing was working fine, and other windows machines could easily connect to the printer. I couldnt find a single web site with the correct solution, and eventually we figured it out after an hour of head scratching.

Here’s the fix…

After installing the printer using a USB cable on both machines, hook the printer to the windows box and do the following…

1st – Share the printer on the windows box, and share it as “printer” or something easy to remember without special characters and spaces, etc. We named ours HP because it was an hp psc 4210. Now, give the windows box a static IP address, and setup user for printing (or you can use the admin user / password for a later step). Make sure the permissions are set correctly on the printer.

2nd – Setup a printer on the Mac (though it wont work yet). Go to System Preferences > Print & Fax > “+” (Plus) sign / add printer > Select IP > Select LPD (Line Printer Daemon) > type in the IP address of the windows box in the address field > change the name of the printer to the printer model or something simple (HP in our case) > Select “Print Using” > Select “Printer Software” > Select the printer model / driver for the printer you have.

3rd – Open Terminal from Utilities in the Applications menu within Finder. Type in the following:

sudo -i (enter your password)
ps -ef|grep cupsd (note the number in the second column)
kill X (where X is the number from above)
cp /etc/cups/printers.conf /etc/cups/printers.conf.backup (copies your current printer.conf to printer.conf.backup)
nano /etc/cups/printers.conf

Locate the line that says LPD://[IP Address of Windows Box] and change it to “smb://username:password@[ip address of windows box]/[Printer Share Name]

Ours looked like this

After making the change, use ctrl+o to write the changes to printer.conf, then ctrl+x to exit nano editor.

4th – Now restart cupsd again or reboot the computer
ps -ef|grep cupsd (note the number in the second column)
kill X (where X is the number from above)

You should be able to print now!

6/5/2010 – Change printer.conf to printers.conf as per Jeffrey’s comment. Thanks Jeffrey!

  1. Mike says:

    Just found this on apple’s site…

    Tip: See Mac 101: File Sharing for details about how to add your Mac to a Windows Workgroup. This is often needed to see Windows printer shares.

    18th December 2009 at 9:17 pm

  2. alex says:

    thanks for posting this, but it difficult to understand. under windows 7, once you installed the printer. you cant right click and share printer. but i do have file and printer sharing ‘on’ under advanced network setting. anywhow, i couldnt get it to work. any further help?

    18th December 2009 at 1:07 am

  3. Mike says:

    Should be able to right click and go to printer sharing or printer properties (about half way down the list that appears). If you go the printer properties route, then you will need to click on the sharing tab, then share the printer. I’ll double check on my virtual machine running win7 later and post pics if possible.

    18th December 2009 at 5:53 pm

  4. Printer Sharing Windows 7 and Snow Leopard 10.6 « Chicago Mac/PC Support says:

    […] Sharing Windows 7 and Snow Leopard 10.6 Nice instructions if you have this problem. I would rather buy a wireless hardware print server myself that has printer sharing built […]

    18th December 2009 at 7:52 pm

  5. Aaron says:

    After adding the printer, I still didn’t have any entries in the printer.conf file. Any reason why that is?

    18th December 2009 at 3:02 pm

  6. Mike says:

    Did you add the printer using a USB cable first? I’m not sure if that is required, it had already been done prior to our arrival with this particular incident.

    18th December 2009 at 4:20 pm

  7. Mauricio says:

    oppss…I think that I did something wrong.
    I have the same problem, I cant print from my mac in my windows network. So, I tried the solution above. However, in the second step, terminal shows four numbers :
    0 1256 xxxx 0 > xxxx I dont remember those numbers, but I am sure the first and the second were : cero and 1252
    Then, I typed the command: “kill X ” which I supposed was 1256, but got “such not file” or something like that.
    then, I entered again “kill ” and in this time I typed “1” because It was the second number. This time my computer reboot automatically, (I am not a computers expert but I knew I did something wrong). My mac works fine, but I am afraid that I erased something vital. Could anyone tell me what I have done to my mac, please?
    ps: Now, when I entered the comand “ps -ef|grep cupsd” It shows ” 0 165 160 0″

    18th December 2009 at 3:44 pm

  8. Mark says:

    I love my MBP but this is crazy (I had no printers.conf).

    The “Im a Mac” dude on tv clearly never had to do this:)

    18th December 2009 at 3:14 pm

  9. Mike says:

    if you “kill x” you are ending a process numbered “x”. So by issuing the command “kill 1” you killed the #1 process. That’s the process known as init. Without init, your computer is un-initiallized and thus reboots. You didn’t do any harm though, aside from possible disk corruption and data loss (of course). If you had sustained disk corruption, you probably would have been required to run fsck upon reboot. I think you’re going to be fine from what you’ve said.

    Here’s where you went wrong. When you typed in “ps -ef|grep cupsd” you probably got two lines of output. One had the process number for cupsd, and the other was the “grep cupsd” process you had just started. Cupsd will generally start before process number 1256 so I believe you tried to kill the grep process, which had already ended because it stops after returning the results.

    Here’s an example:

    root 5127 1 0 Mar11 ? 00:00:11 /usr/sbin/cupsd
    unkown 9655 9636 0 10:55 pts/0 00:00:00 grep cupsd

    Here the output of running “ps -ef|grep cupsd”. The top line is the /usr/sbin/cupsd process (on my linux box). The second line is where I piped “ps -ef” into the grep command. Now if I try to “kill 9655” it will say unknown process because it has already completed, however if I type in “kill 5127” it will end the /usr/sbin/cupsd process instead.

    18th December 2009 at 10:58 am

  10. Mike says:

    If you dont have a printers.conf then you didnt install the printer using a USB cable first. Try the directions from top to bottom again. It is that or you’re looking in the wrong place for printers.conf. You could try using the locate command to find it.

    locate printers.conf

    …gives me the following on one of my linux machines:


    18th December 2009 at 11:09 am

  11. Jeffrey says:


    Very handy walkthrough, thanks, it got my problem solved getting an OSX 10.6 machine to print to a Windows shared printer.

    Your example refers to a file called “printer.conf” but on my Mac the file is actually called “printers.conf”.


    18th December 2009 at 1:41 pm

  12. Scott says:

    Worked for OS X 10.6 -> XP -> Epson Stylus Photo R300.

    Fix may be a little intimidating for those with no ‘nix command line exposure but follow it step by step and it works.

    THANK YOU!!!

    18th December 2009 at 2:10 pm

  13. Adobe photo shop cs v8 says:

    […] Printer Sharing Windows 7 and Snow Leopard 10.6 | BentleyPC's Blogs Posted on 18th December 2009 by Mike in Atlanta Computer Repair. After installing the printer using a USB cable on both machines, hook the printer to the windows box and do.. Phone: Phone Hours: 404-702-2865, Mon – Fri : 9am – 5pm. – Printer Sharing Windows 7 and Snow Leopard 10.6 | BentleyPC's Blogs […]

    18th December 2009 at 5:13 am

  14. Josh says:

    Great fix. I had spent a good bit of time trying to figure out how to get Snow Leopard to use a printer connected to a Vista PC in my home network without success, and this worked perfectly. I think this fix just goes to show how useful it i to understand cups and know how to use the *nix command line when using a mac. It would be great if Apple would fix this problem in the OSX GUI considering how common it is for folks to want to do something like this!


    18th December 2009 at 5:34 pm

  15. Mike says:

    This blog post gets nearly 200 visits a month. I surely hope Apple is working on this 😀

    18th December 2009 at 3:24 am

  16. Paul says:

    Shame on you Apple for not making this work out of the box like everything else.. oh wait… better read this! LOL…

    18th December 2009 at 8:37 pm

  17. James says:

    After reading Mike’s solution 2009, it looked much more difficult then it really needs to be. After going thru all the comments Paul’s made the most sense. The link was the answer and very straight forward and not complicated. Although I did have problem because I did not realize that my computer had a workgroup when this was included for the url wha laaaaa I was printing to Canon MP210 printer.

    18th December 2009 at 3:23 pm

Leave a comment

You must be logged in to post a comment.