Click to See Complete Forum and Search --> : Samba + XP Home = Access Denied, unable to connect
Loki3
07-27-2003, 07:25 PM
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:
[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.
My /etc/samba/smb.conf is as follows:
[global]
workgroup = homelan
security = share
encrypt passwords = yes
printing = cups
printcap name = cups
load printers = yes
log file = /var/log/samba/samba-log.%m
lock directory = /var/log/samba
[printers]
comment = All Printers
security = share
path = /var/spool/cups
browseable = no
printable = yes
read only = yes
public = yes
writable = yes
guest ok = yes
create mode = 0700
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.
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servi
ces\netlogon\parameters]
"RequireSignOrSeal"=dword:00000000
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.
EDIT:Spelling and no smilies
Gday,
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.
See also disable spoolss
Default: use client driver = no"
Further reading:
http://au1.samba.org/samba/docs/man/smb.conf.5.html#USECLIENTDRIVER
Hope that helps.
Cya round
Jinx
Loki3
07-28-2003, 03:48 AM
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"
[2003/07/27 15:48:18, 0] smbd/service.c:make_connection(589)
(192.168.1.102) Can't change directory to
/var/spool/cups (Permission denied)
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.
swiftnet
07-28-2003, 03:17 PM
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.
Loki3
07-28-2003, 04:04 PM
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.
swiftnet
07-28-2003, 04:17 PM
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.
Good Luck!
Loki3
07-28-2003, 07:49 PM
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.
swiftnet
07-28-2003, 09:21 PM
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.
Please get me the share name info.
Thanx
Loki3
07-29-2003, 01:45 AM
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.
swiftnet
07-29-2003, 03:21 AM
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?
Try these commands - any errors?
nmblookup -T machine-name
testparm
testprns printer-name
I know alot of questions, but it is hard without laying hand and eyes on a system.
Please keep me updated on these things - I'll be posting again tomorrow evening
Loki3
07-29-2003, 07:03 PM
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.
swiftnet
07-29-2003, 07:31 PM
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.
Loki3
07-29-2003, 07:47 PM
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.
anarcholinuxism
08-02-2003, 06:46 PM
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.
Loki3
11-02-2003, 03:16 AM
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.
cowanrl
11-02-2003, 09:38 AM
The reason "testparm epson" fails is because testparm sees the option epson as the name of a Samba configuration file. That's why you got this response:
Unable to open configuration file "epson":
If you don't have the SWAT help pages available to you, then try looking at the man page for testparm for details on it's use.
One thing to remember about testparm, it only checks the syntax of your smb.conf file, not the logic. Just because testparm doesn't generate any error responses doesn't mean Samba will work correctly.
If you want to check the validity of the use of a specific printer, try the testprns command. See the man page for help with it. Here's an example of how it ran on my Red Hat 9 machine for my LaserJet 2200:
[root@delldim etc]# testprns HPLJ2200 /etc/printcap
Looking for printer HPLJ2200 in printcap file /etc/printcap
Printer name HPLJ2200 is valid.
But once again, just because the name is valid doesn't mean anyone will be able to print to the printer.
Are your Samba and Windows machines on the same workgroup as suggested before? That sure simplifies things.
Post the contents of your current smb.conf file.
Loki3
11-02-2003, 05:26 PM
Here's where I am right now:
jeeves:/var/spool/cups# testprns epson
Looking for printer epson in printcap file /etc/printcap
Printer name epson is not valid.
jeeves:/var/spool/cups# smbclient -L jeeves
added interface ip=192.168.1.103 bcast=192.168.1.255 nmask=255.255.255.0
Password:
Domain=[HOMELAN] OS=[Unix] Server=[Samba 2.2.3a-12 for Debian]
Sharename Type Comment
--------- ---- -------
IPC$ IPC IPC Service (Samba 2.2.3a-12 for Debian)
ADMIN$ Disk IPC Service (Samba 2.2.3a-12 for Debian)
epson Printer Local Raw Printer
Server Comment
--------- -------
JEEVES Samba 2.2.3a-12 for Debian
MARVIN Upstairs 1
Workgroup Master
--------- -------
HOMELAN MARVIN
jeeves:/var/spool/cups#
Doing a net view \\jeeves on both the XP Home machine and the 98 machine list jeeves with the printer share. Network neighboorhood shows the printer on the 98 machine. I get a "Network name not found" when trying to print on the 98 and a StartDocFile problem when trying to print on the XP. Intrestingly enough the 98 machine doesn't show up when I do a smbclient -L jeeves. Here's my samba.conf:
[global]
workgroup = HOMELAN
security = share
printing = cups
printcap name = cups
# load printers = yes
# log file = /var/log/samba/samba-log.%m
# lock directory = /var/log/samba
[printers]
comment = All Printers
path = /var/spool/cups
browseable = yes
printable = yes
public = yes
writable = yes
create mode = 0700
guest only = yes
use client driver = yes
guest account = smbprint
Any help would be really great. Thanks.
Loki3
11-02-2003, 06:57 PM
I got both of the window machines to print.