-   Linux - Newbie (
-   -   Printing to a WinXP shared printer? (

DStar 11-23-2003 04:38 PM

Printing to a WinXP shared printer?
Hi. I would appreciate if you could either help me with this or point me to a thread / site to get me started.

Three computers are on my home network:

One Windows 2000 SP4 box (ICS/gateway)
One Windows XP SP1 box (has a shared printer)
My computer, dualbooting WinXP SP1 and Slackware 9.1

The Win2000 box is running Internet Connection Sharing and this has worked fine with Linux from the start. I have no problem using the Internet from Slackware 9.1.
Both the Win2000 and the WinXP box have a couple of folders shared, and I can access those without problems from Slack.
The Win boxes can see my computer when it's booted into Slackware and access shared directories.

The Windows XP box has a HP 960c printer connected to it, and it's shared over the network. However, I have not been able to add it or print to it from Linux on my box.

In KDE, I found that a cute little program for adding and managing printers was already included in the control central. That's great! This will be easy! Except, it doesn't work...

I selected the CUPS printing system. I then right-clicked and selected ?Add Printer/Class?. A wizzard with cute graphics and helpful text came up. I clicked next and was asked to select a device. I got to choose from Local Printer, LPD, TCP printer etc. ?SMB-Shared Printer (Windows)? was also in the list of options. However, that particular option is greyed out. I obviously need to add *something* to be able to print from a Windows shared printer, but what, and how?


david_ross 11-23-2003 04:46 PM

You will probably need to install samba first.

DStar 11-24-2003 06:05 AM


Originally posted by david_ross
You will probably need to install samba first.

Samba is already installed and I think it's configured properly - The Linux machine can see the Windows machines and access shared files and folders. The Windows machines can also see the Linux system. Anything else I need to do with samba to enable printing to a Windows shared printer?

nbccbn 12-01-2003 03:27 AM

same problem here with slack9.1 . i can see shares from the linux machine but not print.

XavierP 12-22-2003 05:47 PM

Is the printer shared in Windows (I assume the file and print sharing is fully turned on)?

jillyt 12-25-2003 04:35 PM

I have the same problem too, Using SuSE 9.0 I keep trying but I cant get the WinXP to see the Linux machine,but the Linux machine sees WinXP and the printer, but after choosing the HP Deskjet 5550 and then the driver from the list no test page and cups keeps coming up asking for a password???? I plan on keeping my eyes on this thread and maybe a whole bunch of us it seems can find solutions, Thanks Everybody! Have a Great day

XavierP 12-25-2003 04:37 PM


Have you tried your normal WinXP name and password in the login box?

jillyt 12-26-2003 03:31 PM

I am the only one on the WinXP
Thanks for the reply, I am the only one on the WinXP box and dont have a password, just the user name, so I dont know what password I would use :)

XavierP 12-26-2003 03:57 PM

Try the administrator id and pw.

mghere 12-27-2003 08:20 PM

Printing to a winXP computer?

as a preface, i know nothing more than what i copied below...and don't know if this is cool to do, but, since i did see a post on another list about accessing a scanner connected to a windows box from a linux box, i thought i'd paste it in here...notice it is refers to red hat linux, so commands might be slightly different for you..take it for what it is worth? Hope it helps...or provokes a reply that says it won't or posts what will... ;]

It's as easy as this:

client$ ssh scanner-machine
scanner=machine$ xsane

That is, ssh from the machine where you want to do the scanning to the
machine where the scanner is installed and then run "xane" or "gimp" or
whatever. Unless you're unluckly, it'll just work. It's possible
that you'll have permissions problems associated with access to the
scanner device, but that's a different problem.

Note that you're running xsane or gimp or whatever on the machine where
the scanner is instaleld so you'll either have to copy the files back to
the first machine or use NFS or similar


wdingus 12-27-2003 09:55 PM

Command-line still reigns supreme when it comes to diagnosing some problems :)

Try something like this:

# smbclient -L PC

Replace PC with the Windows box NETBIOS name. This views shares and you should see the printer share name here if it is truly shared.

# echo "test" | smbclient //PC/SHARE -P -U administrator -c 'print -'

Replace PC with the netbios name of the PC and SHARE with the printers share name.

This command sequence sends some sample text as input to smbclient which connects to a PC named "PC" and attaches to a shared printer with a share name of "SHARE" and prints the data. The -P says to connect to this share as a printer. "-U administrator" says connect with this username and it should prompt you for a password. Try different usernames as appropriate for whatever is setup on the Windows box. The "-c 'print -'" says to run that command on the remote machine, print from stdin which is the stream of text your piping to the command ("test").

Somewhere in this series of things to try you should get more meaningful errors or warnings or messages that will help diagnose what the problem is. Once you get this method of printing working you should be able to set it up in CUPS.

kwunderlich 01-08-2004 12:56 AM

Thanks for the command line wdingus. My situation is similar to the above. My system prompts for a password, which for troubleshooting is <enter>. However, even though I have created a guest account, printing account, and user account with full control of the share it provides the error below.
I have pasted the machine response to smbclient -L <machine name with LOCAL printer>

I am using the LPRing standard, without installation of CUPS. My samba installation carries version 2.2.5-* samba.

Sharename Type Comment
--------- ---- -------
Error returning browse list: NT_STATUS_ACCESS_DENIED

Any help would be appreciated.

elluva 01-08-2004 01:07 AM

that's no real problem, it just means you are not permitted to browse the list of printers. If you know your printer share name try what wdingus told you:

$> echo "test" | smbclient //PC/SHARE -P -U administrator -c 'print -'

baldy3105 01-08-2004 02:06 PM

I played with this for quite a while and I found that you MUST have a password. It appears that Samba's idea of a blank password is not the same as Windows idea of a blank password. Create a new user "printer" with a password of "printer" and use these in the printer config box i.e


this was the only way I could get around the NT Access denied message. You can stop this new user appearing in the log in screen on XP, in the control panel somewhere.



filipanu 01-09-2004 03:03 PM

I tried your above command and received the following output. Other windows machines print flawlessly to this share.

# echo "test" | smbclient //diana/hpdeskj -P -U filipan -c 'print -'

added interface ip= bcast= nmask=
Got a positive name query response from ( )
Domain=[ART] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME

Any help woud be appreciated

All times are GMT -5. The time now is 03:07 PM.