Samba + CUPS "Access denied, unable to connect" error
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Samba + CUPS "Access denied, unable to connect" error
I was setting up printer sharing to Windows machines on my home network via Samba yesterday, and got following bizarre problem -- I can print from Windows fine but printer status on Windows box reads "Access denied, unable to connect" instead of Ready or Printing or whatever. Effectively there is no access to the printer queue for some reason. I was googling for quite some time, and it seems many people having the same problem but very few solutions were offered. At the end I came across this page which solved my problem. So I am posting it here in case if other linux users have the same problem.
Quoting the page linked above:
I managed to get that fixed by adding the line use client driver = yes to the [printers] section of /etc/samba/smb.conf.
Also as Colin points out it is important to activate raw octet-stream mime type in CUPS.
One questions bugs me though -- why "use client driver = yes" solved the problem with printer queue accessibility from Windows? On a side note, my Mac printed through Samba perfectly without this option and was able to read a queue as far as I remember.
Hey I have the same problem and I had already done what you mentioned in the post since a long time but I still get the "Unable to Connect" error. I don't know what's the problem. I have a dual-boot desktop (mostly run linux) and a printer connected to it. I also have a laptop (also a dual-boot) from where I am trying to print. One amazing thing is that I am unable to print via windows on laptop but if I boot in Linux I can print just fine. I don't know what the problem is?
tuxrules, if you really can't print from windows, then you problem may lie elsewhere. Since the problem I had was different -- I was able to print, but could not access printer queue status.
When you are printing from linux are you printing over Samba as well? Or is it just plain CUPS? I am quite a newbie in Samba administration and can't really recommend anything apart from regular 1. run testparm 2. take a look into samba logs 3. if above steps do not help, increase logging verbosity and examine logs again
I am trying to print from my laptop (via a wireless network) to the printer attached my desktop. Now my desktop mostly runs on linux with samba on. My laptop (also dual boot with Linux) with windows on can access files on my desktop via samba but cannot print. However, when i turn on linux on my laptop its prints perfects via samba. I've checked error logs and I've also done what you said in your post. I am kinda thinking it may be a permission question with cups. I am kinda thinking of making a group which contains all the users who can print via samba and then adding that group via chown to cups.
Hi philiplawlor,
Thanks for the input. However I've already done what you suggested but to no avail. I followed the article your referred and doesnt seem to do the trick for me.
Here's my smb.conf
Code:
# Samba config file created using SWAT
# Global parameters
[global]
workgroup = KUIPERBELT
server string = Samba Server on K2
guest account = No
log file = /var/log/samba/%m.log
max log size = 0
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
ldap ssl = no
valid users = user1,user2
admin users = user1
write list = user1, user2
hosts allow = xxx.xx.
[homes]
comment = Home Directories
read only = No
[Baroda]
comment = LexmarkX63
path = /var/spool/samba
read only = No
guest ok = Yes
printable = Yes
printer name = Baroda
use client driver = Yes
When I first saw this I thought I might have found my solution. However, I still can't print from my Windows Laptop to a Linux-based HP Deskjet printer. The error in the log says:
smbd/nttrans.c:call_nt_transact_ioctl(2463)
call_nt_transact_ioctl(0x280004): Currently not implemented.
printing/print_cups.c:cups_job_submit(656)
Unable to print file to DESKJET_895C - clitent-error-document-format-not-supported
The document was the Windows Test Page. Any thoughts?
Having already applied the "use client driver = yes" line to my smb.conf I was a bit disappointed to discover this topic did nothing to resolve my "access denied" error when trying to print to the (CentOS-6/cups/samba) shared DELL 3110cn printer on my network.
I could print fine from the Linux Server with Dell's PS drivers but no joy when attempting to print from XP machines - until I took my clue from "use client driver = yes" . . .
I have been successfully printing to this printer for years when it was served via a Win2000 server but I used the DELL PCL drivers. However, when I installed it to print to the Linux Server I chose the PS drivers (since it seemed to work so well for CUPS) - bad move - once I reinstalled the network printer using the PCL drivers. . . It Worked Perfectly!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.