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 |
|
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 |
try restarting the cups daemon
/etc/init.d/cups restart then try connecting again. |
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 |
i'd suggest starting over here
http://www.tldp.org/HOWTO/Debian-and...ows_cupsconfig now that cups is installed. |
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 |
done some reading,
Quote:
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://username:password@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. |
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 |
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, |
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 |
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:
|
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 |
All times are GMT -5. The time now is 08:50 PM. |