Samba + XP Home = Access Denied, unable to connect
I am trying to get my networked computers to share a printer that is hooked up to a debian 3.0r0 printserver running samba and cups. See attached network diagram for more information on my lan's structure. I set the printer up in Windows XP using the wizard and it found the printserver and the attached printer (\\printserv\epson). When I try to print with XP I get the error: "epson on printserv: Access denied, unable to connect". My samba logs show this:
Code:
[2003/06/21 03:23:19, 0] printing/printing.c:print_job_start(952)
print_job_start: insufficient permissions to open spool file /var/spool/cups/s
mbprn.000234.2tbqId.
printserv:/var/log/samba# ls -l /var/spool/cups |grep 000234.2tbqId
printserv:/var/log/samba# ls -l /var/spool |grep cups
drwx------ 3 lp sys 1024 Jun 21 02:48 cups
printserv:/var/log/samba#
From people with a similar samba configuration I learned that the permissions are correctly set /var/spool/cups. Doing a chmod 777 on /var/spool/cups and restarting cups, smbd and nmbd have no effect.
All machines in question can ping each other. Printing works locally from the printserver and over the lan from the windows 98 machine. People on irc.freenode.net suggest it is most likely a local windows XP spooling issue. All network machines have user accounts and samba accounts on the printserver. Tried adding the following to XP's registery to force a login prompt but no luck there either.
If anyone has any advice on how to fix this or learn more about what is causing the problem please post. This seems to not be a common samba problem and I have found very little information on what to troubleshoot or how to find out more about the fix. If someone could tell me what I did wrong in configuration I would be very thankful.
We had the same issue here at work with our XP machines ... get an "Unable to connect: Access Denied" error.
Managed to find post to the Samba lists through a Google search that related to this issue. It invovles setting the "use client driver = yes" option. As described below:
From smb.conf manual:
"use client driver (S)
This parameter applies only to Windows NT/2000 clients. It has no affect on Windows 95/98/ME clients. When serving a printer to Windows NT/2000 clients without first installing a valid printer driver on the Samba host, the client will be required to install a local printer driver. From this point on, the client will treat the print as a local printer and not a network printer connection. This is much the same behavior that will occur when disable spoolss = yes.
The differentiating factor is that under normal circumstances, the NT/2000 client will attempt to open the network printer using MS-RPC. The problem is that because the client considers the printer to be local, it will attempt to issue the OpenPrinterEx() call requesting access rights associated with the logged on user. If the user possesses local administator rights but not root privilegde on the Samba host (often the case), the OpenPrinterEx() call will fail. The result is that the client will now display an "Access Denied; Unable to connect" message in the printer queue window (even though jobs may successfully be printed).
If this parameter is enabled for a printer, then any attempt to open the printer with the PRINTER_ACCESS_ADMINISTER right is mapped to PRINTER_ACCESS_USE instead. Thus allowing the OpenPrinterEx() call to succeed. This parameter MUST not be able enabled on a print share which has valid print driver installed on the Samba server.
Well whatever I did, I am in a much worse position now. Here's what I did to best of my memory:
1)Added use client driver = yes to /etc/samba/smb.conf
2)Yah! XP lists printer as "ready"
3)XP still does not print
4)Remembers that I'll probably need to run XP's print wizard again
5)Tries to delete old printer configuration for epson
6)Nothing happens, tries to add new printer, nothing happens.
7)Reboot printserver and set bios clock to correct time
8)In XP:Nothing happens
9)Try everything to reconfigure XP's printer driver... nothing happens
10)Check to see if windows 98 still prints... it doesn't
11)4 hours later XP still lists printer as "deleting"
12)98 informs me of "There was an error writing to \\printserver\epson... network name cannot be found"
13)Copy my old semi-working smb.conf from above post into printserver
14)XP still 'deleting' despite 4.5 hours and twice as many reboots and 98 gives same error message as above
Can still print from printserver locally and ping all computers on network.
Currently laying in a fetal position underneath of the desk crying. I'll sort through the mess tomorrow. Any ideas until then are quite welcome. Thanks in advance.
Did you browse the network to add the printer?
If you did then it won't work.
What I've noticed since W2K on is that you add the network printer as a a local port i.e; \\fileserver\theprintername
That has always worked for me. To make you life easier while connecting XP is to disable its firewall until all is working, then re-enable it.
XP's firewall is disabled. I did browse the network when I set up XP but I cannot deleted that printer entry, (right click, delete and it just says deleting for 4 hours), if I could delete it I would try again. At this point I'm considering uninstall cups and samba and starting over again because I cannot tell what I did wrong.
Add the printer in XP again, give it a different name, such as pleaseworklaser
You'll have to load the drivers for it locally.
When asked whether it is local or net, chose local, add port, type in path \\server\printer\
or add the printer as if it was plugged into lpt1 and later change the port to \\server\printer, both ways will work.
This is a Windows problem and I've seen it on non-Linux print servers.
If cups still works for '98 systems, you don't need to remove and reload.
To get rid of the ^%^%#@^% printer I think you may have to disconnect from the network, via the control panel, can't remember since I haven't run into this in a while.
Yah! I got XP to delete the old printer driver by your method! Thank you very much. Tried adding the printer again using both technques but using the location \\printserv\epson resulted in a network path could not be found. I tried to add the printer to XP by setting it up as a network printer and then browsing the network to find the printer's location which apparently was printserv\\printserv\epson. I tried the local printer/switch port method using the new path and it replied with a "path does not exist". Windows 98 still does not work and gives me this error: "There was an error printing to \\printserv\epson... network name not found" Now i am really confused on why 98 no longer prints smb.conf and all cups config files are exatcly the same as when 98 worked. Assuming once again both these problems are problems with the windows machines. Any other ideas? Thanks in advance.
Try this on the Linux box:
Log in with the account name of the Windows box user
type in:
smbclient -L samba_svr_name
This should list your shares, including the printer.
What is the share name of the printer via samba?
I've run into names where they acted as if they were too long for windows, an example was this printer:
The Linux share was
//fileserver/hpofficejetG85cxi
Windows would see it as
\\fileserver\hpofficejetG
I had to type in the full path (\\fileserver\hpofficejetG85cxi) even though the share name was truncated when browsing to the server via Windows.
dad@printserv:/home/admin$ smbclient -L \\printserv
added interface ip=192.168.1.103 bcast=192.168.1.255 nmask=255.255.255.0
Got a positive name query response from 192.168.1.103 ( 192.168.1.103 )
Password:
Domain=[HOMELAN] OS=[Unix] Server=[Samba 2.2.3a-6 for Debian]
Sharename Type Comment
--------- ---- -------
IPC$ IPC IPC Service (Samba 2.2.3a-6 for Debian)
ADMIN$ Disk IPC Service (Samba 2.2.3a-6 for Debian)
epson Printer Local Raw Printer
Server Comment
--------- -------
PRINTSERV Samba 2.2.3a-6 for Debian
Workgroup Master
--------- -------
HOMELAN PRINTSERV
MSHOME DRAGONMISTRESS
dad@printserv:/home/admin$
It seems to me that the computer DRAGONMISTRESS (192.168.1.101) is on a different workgroup and that the windows 98 machine isn't even listed. Would a netbios name = *** fix that issue? I have no idea how to get the 98 machine reconized by samba. Many thanks for help.
Definitely change the MSHOMW WKGRP to HOMELAN, it'll make browsing easier, of course you'll have to reboot that pc when you change names.
From Win98: start, run, type in:
\\printserv
if it fails to find the shares on printserv, try from a command prompt:
net view \\printserv
if it fails, do the same as above, but use the ip:
\\192.168.1.103
Does it come up and show the printer on printserv?
Yes is good, no is not_so_good
If the shares showed on any of these than samba is sharing, at least to a point.
If the ip address worked but the name didn't:
Create a hosts file (hosts is in the Windows directory on '98)
192.168.0.103 printserv
If no then samba doesn't seem to be sharing...
at the samba machine (as root) type:
service smb status
it should show smbd and nmbd pid's .. running
If not restart 'em and check the status.
If the smbd and nmbd are running, but the shares aren't working, then it is in the smb.conf
If the services are failing, then it is going to take a bit longer : (
The printserv doesn't need to "see" the '98 system, but you could if you want (as root) add it to the hosts file (/etc/hosts)
192.168.0.win98machine-number win98machine-name
Can the Windows machines see each other? Are the gateways all set correctly?
Well I've run out of time. Windows wins again. Anyway, I really want to thank you for your excellent help in this matter. I'm very sorry that your guys effort on my part is a waste but I had a week to configure it and get it to work and a weeks up. Thanks again, and I'm sorry.
I know everybody says this distro is better than that distro, etc. For the less experienced, yet wanna be a power user group, I'd recommend Mandrake. I Iearned on it, tried several other distro's from the easy, but somewhat lacking (Lycoris, Xandros, Lindows), to the Linux mainstays ( Suse, Yoper, RedHat, and Debian). I came back to Mandrake because I like it's swiss army knife approach. If you ever want to try setting up printers, samba servers, email servers, Mandrake makes it pretty damn easy, without losing the power of Lunux and opensource.
I've been using linux for about a year now and debian was a real big jump for me from redhat 7.3, this was pretty much the first time I've ever tried to do any networking/printing/samba work in linux. I needed to press print on computer B and have it print on computer A in a week and I didn't get it done in time. However, there's no way in hell I'm giving up my personal debian system! Once again, you provided very excellent help.
heh, we must have chosen the same week to do the same thing, I'm not having much luck either, although with 2 deb machines on my network I have manged to get linux to linux network printing working.
Well I'm trying again. From the Windows 98 machine, a \\jeeves (I renamed the printserver) and net view \\jeeves all came back as "You need to be logged in to perform that action". From the XP home machine it said, no network path. nmblookup -T jeeves said this:
querying jeeves on 192.168.1.255
192.168.1.103 jeeves<00>
testparm epson:
Load smb config files from epson
params.c:OpenConfFile() - Unable to open configuration file "epson":
No such file or directory
Error loading services
testparm with no agruements passed.
Right now the printer is not hooked up to the printserver (jeeves) so I assume that's why testparm epson failed.
"I know where you're from but where do you belong?"