LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 04-29-2004, 11:57 PM   #1
a1flecke
LQ Newbie
 
Registered: Apr 2004
Posts: 9

Rep: Reputation: 0
Connect to shared network printer on WinXP machine for all users (Slackware)


Hello,

I am new to Linux and I am not sure how to do this. I have a WinXP machine that has a shared printer. How do I configure Linux to find and then allow all users to use this resource?

Aaron
 
Old 04-30-2004, 12:31 PM   #2
Peacedog
Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,292

Rep: Reputation: 167Reputation: 167
have a look at this

http://www.tldp.org/HOWTO/Debian-and...o_windows.html

good luck.
 
Old 04-30-2004, 05:19 PM   #3
a1flecke
LQ Newbie
 
Registered: Apr 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Followed the walkthrough.

I was able to connect to the Win Computer (Addie) with:

smbclient -L Addie -u USERNAME

I found the printer (HPPSC950) , created the file:

ln -s 'which smbspool' /usr/lib/cups/backend/smb

and then tried to do the lpadmin command:

lpadmin -p AddiePrinter -v smb://USERNAME:PASSWORD@Addie/HPPSC950 -P /root/hppsc950.ppd

as the walkthrough said to do. This last command resulted in the error:

lpadmin: Unable to connect to server: Connection refused.

In Konqueror I tried:

smb://Username:Password@Addie/HPPSC950

and this connected successfully. (Though I still had to enter my password again). It brought it up as a folder though. I am not sure what to do next.

Any suggestions?

Aaron
 
Old 04-30-2004, 05:37 PM   #4
Peacedog
Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,292

Rep: Reputation: 167Reputation: 167
try restarting the cups daemon

/etc/init.d/cups restart

then try connecting again.
 
Old 04-30-2004, 06:50 PM   #5
a1flecke
LQ Newbie
 
Registered: Apr 2004
Posts: 9

Original Poster
Rep: Reputation: 0
I did not have CUPS. I installed it and tried the command again:

lpadmin -p AddiePrinter -v smb://USER:PASSWORD@Addie/HPPSC950 -P /root/hppsc950.ppd
lpadmin: add-printer (set model) failed: client-error-not-found

I am sure that is the name of the printer:

smbclient -L Addie -U USERNAME
added interface ip=192.168.0.113 bcast=192.168.0.255 nmask=255.255.255.0
Got a positive name query response from 192.168.0.127 ( 192.168.0.127 )
Password:
Domain=[FLECKS] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Sharename Type Comment
--------- ---- -------
E$ Disk Default share
IPC$ IPC Remote IPC
print$ Disk Printer Drivers
I$ Disk Default share
K$ Disk Default share
HPPSC950 Printer Addie's Printer

Suggestions?

Aaron
 
Old 04-30-2004, 07:10 PM   #6
Peacedog
Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,292

Rep: Reputation: 167Reputation: 167
i'd suggest starting over here

http://www.tldp.org/HOWTO/Debian-and...ows_cupsconfig

now that cups is installed.
 
Old 04-30-2004, 08:14 PM   #7
a1flecke
LQ Newbie
 
Registered: Apr 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Nope same result.

I tried adding the printer with the CUPS "Add
Printer" method. Below is the infomation I added:

<First Page>
Name: Addie's Printer
Location: //Addie
Description: Addie's Printer

<Second Page>
Device: Unknown Network Device(smb)

<third Page>
Device URL: smb://Addie/HPSC950

<fourth Page>
Make: HP

<fifth Page>
Model: HP PSC 950, Foomatic + hpijs (recommended) (en)

<sixth Page>
Added Successfully

Tried Printing test page

Nothing out of the printer.

Aaron
 
Old 05-01-2004, 11:39 AM   #8
Peacedog
Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,292

Rep: Reputation: 167Reputation: 167
done some reading,
Quote:
Apparently in Slackware 9.1 the LPrng package prevents cups from writing a good printcap file
from this thread

http://www.linuxquestions.org/questi...threadid=99073

per the reading, make sure LPrng package is removed, remove the printer, then add the printer again. i'm posting my /etc/printcap, and, my /etc/cups/printers.conf for you to look at. i connect to my windows printer via cups by way of samba so i hope this helps.

/etc/printcap

# This file was automatically generated by cupsd(8) from the
# /etc/cups/printers.conf file. All changes to this file
# will be lost.
hppsc2110|hppsc2110:rm=peacedog:rp=hppsc2110:


/etc/cups/printers.conf

# Printer configuration file for CUPS v1.1.19
# Written by cupsd on Sat Apr 3 10:02:35 2004
<DefaultPrinter hppsc2110>
Info HP PSC 2110, hpijs
Location
DeviceURI smb://usernameassword@WORKGROUP/SERVERNAME/hppsc2110
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
AllowUser peacedog
AllowUser root
</Printer>

hope that gets you going, post any success/failure.
good luck.
 
Old 05-01-2004, 05:12 PM   #9
a1flecke
LQ Newbie
 
Registered: Apr 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Removed LPRNG, removed Printer, added printer. Here are the files you mentioned.

/etc/printcap
AddiePrinter|Addie Printer:rm=AaronLinux:rp=AddiePrinter:

/etc/cups/printers.conf
# Printer configuration file for CUPS v1.1.19
# Written by cupsd on Sat May 1 18:06:55 2004
<DefaultPrinter AddiePrinter>
Info Addie Printer
Location Addie
DeviceURI smb://Addie/HPPSC950
State Stopped
StateMessage
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>

I realized I forgot to mention that the WinXP computer is part of a domain (flecks.us), but it is in the same intranet range 192.168.0.X as the linux. I do not know how to add the Linux machine to the domain (the settings necessary on the Linux box), if that is needed.

Aaron
 
Old 05-01-2004, 06:09 PM   #10
bbo
Member
 
Registered: Mar 2004
Location: VA
Distribution: Slackware 10.0
Posts: 50

Rep: Reputation: 15
I got this error

lpadmin: add-printer (set device) failed: client-error-not-possible

when I tried to type this line

usr/sbin/lpadmin -p RicePrinter -v smb://fred:mypass@rice/INKJET -P /root/inkjet.ppd

(I changed my printer name and anything I had to change in that command line)
any idea?

Thanks,
 
Old 05-01-2004, 08:27 PM   #11
a1flecke
LQ Newbie
 
Registered: Apr 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Yeah that is what I also get when I try that command. No suggestions other than try what has been suggested to/tried by me already. I am still trying to get it to work.

Aaron
 
Old 05-02-2004, 05:51 AM   #12
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
OK, a bunch of things I'll suggest:

1. Are the Samba daemons running at the time that you're trying to add the printers? Neither of you with the problem has named your distribution, and all distributions do not necessarily set up Samba to run at boot without the user intervening. The Samba daemons are called smbd and nmbd, and are likely found in /usr/sbin (you can do a whereis smbd/nmbd to find or confirm their exact location). You can run the 'top' command in a terminal to see if they are running, or use the System Monitor of your DE to see the currently running processes. If not, you should start the daemons by opening a terminal, using the 'su' command to switch to a root terminal, and then run the daemons. If everything else is properly configured, the printer may now be able to be added and work properly. If you've had to start them manually, check your distribution's documentation for how to add them to the default runlevel so they start automatically.

2. Stupid question, but you both are trying to add these printers as root, right? Only root has the right to manage hardware.

Configuration issues:

1. Look at /etc/samba/smb.conf. Is the workgroup/domain set to the same as the Windows workgroup/domain that shares the printer? The default Samba workgroup is usually wrong, and if it is, you won't be able to connect to the printer, as you are not a member of the authorized group to use it.

2. In my experience (HP printer directly connected to a Win2K machine via a workgroup and not a domain), the only command that successfully adds the printer in a working state is smb://username:password@ip_of_the_windows_box_(but you can maybe use the hostname instead)/share_name_of_the_printer.

There are a couple of caveats with this command; the user/pass must be known to the Windows box (meaning the user must be added to the list of known users by the Windows Administrator), and the user must have administrative privileges on that box. Otherwise, apparently CUPS won't have access to some file that it needs to add the printer. This may also be a fluke of my particular printer or setup with Win2K; certainly this is not an issue with Win98 (which doesn't even have administrative rights), and it may be possible to work around this with a finer-grained user security policy (or by having an "extra" box used exclusively as a print server, which wouldn't have anything that might be in danger of being hacked in the first place).

If necessary, it's very unfortunate, though, as the "smb:\\blah_blah_blah" command is sent in cleartext. But there seems to be nothing to be done except to make a junk admin who doesn't have access to any other shared files on the network, and to make sure your firewall is protecting you from unauthorized outside access so that this data won't get hacked.

3. As for the "lpadmin: add-printer (set model) failed: client-error-not-found" error that a1flecke and bbo report, this Samba+CUPS HOW-TO (which both a1flecke and bbo should read, it seems quite comprehensive) indicates that:
Quote:
If you received "error: client-not-possible" then chances are there is a typo
in your URI, or your link to smbspool is missing or pointing to the wrong place.
So that's pretty clear. I think that whatever is not covered by my post is covered by the document linked above, so I hope that this information helps to solve the problems that both of you are encountering. Good luck.
 
Old 05-03-2004, 07:27 PM   #13
a1flecke
LQ Newbie
 
Registered: Apr 2004
Posts: 9

Original Poster
Rep: Reputation: 0
FYI: This is not a dead thread, I am working on this in my spare time. I have made some progress. lpadmin is now working without error. It was a combination of samba not starting when it should and have an incorrect link. Now the problem is that the printer keeps stopping right after I start it. Possibly a result of uninstalling LPRNG. Looks like lpr and other commands are incorrectly refering to the LPRNG package and not CUPS. If that is the case, what in CUPS do I redirect them to?

Aaron
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Print from a winxp shared printer on Solaris9.0 UltraSoul Solaris / OpenSolaris 4 02-18-2005 11:30 AM
Printing to a WinXP shared printer? DStar Linux - Newbie 24 04-20-2004 03:14 AM
How doi I connect my Mandrake 9.2 to WinXP Shared Folders and Printer? nicolo Linux - Newbie 3 03-10-2004 02:20 AM
Printing to WinXP shared printer from Linux? DStar Linux - Networking 6 12-25-2003 12:24 PM
setup printer on client machine(slackware 8) to server (slackware7) network printer changwoo Slackware 9 05-02-2003 05:37 PM


All times are GMT -5. The time now is 06:16 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration