Samba printer - access denied, unable to connect

I’m trying to get a printer working under Samba. The printer is a rather ordinary HP Officejet R40. Samba is working (I can read and write to the shared drive). The printer works under Cups (I can print a test page and OO printing works just fine. I can view the printer on my Windows boxes and install the print driver.

However when I install the print driver, it displays the message, “Access denied, unable to connect.” This happens on all computers.

I’m using Open SUSE 11.0, KDE 4.0

Here is my smb.conf:


[global]
add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
domain logons = Yes
domain master = Yes
security = user
usershare max shares = 100
workgroup = seaside5
netbios name = linux5
usershare allow guests = Yes
local master = Yes
os level = 65
preferred master = Yes
passdb backend = smbpasswd
username map = /etc/samba/smbusers
log level = 1
syslog = 0
log file = /var/log/samba/%m
max log size = 0
name resolve order = wins bcast hosts
time server = Yes
printcap name = CUPS
set primary group script = /usr/sbin/smbldap-usermod -g ‘%g’ ‘%u’
logon script = logon.bat
logon path = \bar\profiles%u
logon drive = H:
wins support = Yes
printer admin = root
printing = cups
idmap gid = 10000-20000
idmap uid = 10000-20000

; =====================Share Definitions=============
[linux5_data]
comment = most of the disk space is here
inherit acls = Yes
path = /samba1
read only = No
browseable = Yes
valid users = bruce, diane, BRUCE1
writable = yes
create mask = 7777
directory mask = 7777
inherit permissions = Yes

[netlogon]
comment = Network Logon Service
path = /var/lib/samba/netlogon
write list = root

[printers]
comment = All Printers
path = /var/tmp
guest ok = Yes
printable = Yes
create mask = 0600
browseable = No

[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
guest ok = Yes
write list = @ntadmin root
force group = ntadmin
create mask = 0664
directory mask = 0775

[officejet5]
comment = Officejet 5
path = /var/tmp
printable = Yes
browseable = Yes
guest ok = Yes

I’m desperate. If I don’t get this printer working in 24 hours, the office manager will have me dragged to the town square and flogged.

Please post also the file cupsd.conf located at /etc/cups/cupsd.conf

Regarding Samba:

Suggest some changes below. It’s a good idea to make a copy of your smb.conf before you alter it as per the suggestions below, but I suppose you would do that anyway.

You’ve got this stuff in [global] for printing:

printcap name = CUPS
printer admin = root
printing = cups

Regarding “printer admin”, smb.conf man pages say this: “Use caution with use in the global stanza as this can cause side effects” and testparm says it is deprecated. Do you really need it? I suggest that you comment it out (use #)

I’d recommend these in [global] for printing

printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
load printers = yes
use client driver = yes

Where you’ve got this:

[printers]
comment = All Printers
path = /var/tmp
guest ok = Yes
printable = Yes
create mask = 0600
browseable = No

I’d make this change: create mask = 0700

For this one:

[officejet5]
comment = Officejet 5
path = /var/tmp
printable = Yes
browseable = Yes
guest ok = Yes

If you put in [global] the line “load printers = yes”, then you don’t need the share at all because the share [printers] already has it shared, maybe comment it out entirely (use #) to cut down confusion.

I have exactly the same problem. By adding the line:

use client driver = yes

I can now have access to the printer but I have an error message when I try to print a test page.

Your issue will likely be different from that of brucerowe. Running them together in the same thread will make understanding difficult. Please start a new thread in the appropriate Forum (Networking). And when you do, please post your config files, cupsd.conf and smb.conf and try to include some information to help us diagnose your problem.

To say you have the line "use client driver = yes " and that “I have an error message when I try to print a test page”, is a bit like telling an electrician that “the power is on” and “but the lights aren’t working”. lol! So tell us a lot more about the situation when you start your thread.

We are making progress. I changed my smb.conf as you suggested. I completely removed the entry under [officejet5] I deleted the entry in cups and re-entered it. I gave the command rcsmb restart

I PRINTED A WINDOWS 2000 TEST PAGE!

Next, I went to print on the Win2K machine from Open Office. I got a message, “Could not start printer. Please check your printer configuration.”

I tried printing a Windows test page. It did not work and I got a message, “Test page failed to print. Access is denied.” I looked at the entry on the Win2K machine. It said, “Printer not found on server. Unable to connect.”

Once again, I am at a loss. This is the same printer that worked fine 2 minutes earlier.

Any ideas? And, thanks for your help.

Bruce

Here is my cupsd.conf:

LogLevel info
SystemGroup sys root

Allow remote access

Port 631
Listen /var/run/cups/cups.sock

Enable printer sharing and shared printers.

Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseAddress @LOCAL
DefaultAuthType Basic
<Location />
Allow From 127.0.0.2

Allow shared printing and remote administration…

Order allow,deny
Allow From all
Allow From 192.168.1.*
</Location>
<Location /admin>
Encryption Required

Allow remote administration…

Order allow,deny
Allow From all
</Location>
<Location /admin/conf>
AuthType Default
Require user @SYSTEM

Allow remote access to the configuration files…

Order allow,deny
Allow From all
</Location>
<Policy default>
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit CUPS-Authenticate-Job>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>

Three questions to start with:
1: Can you think of any reason why your cupsd.conf is quite different from mine? I have 11.0 too.
2: Is the IP of the printer server (Suse) in this net: 192.168.1.X?
3: You have a wins server and a PDC, so is the IP address of the windows client also in the net 192.168.1.X?

I started a new thread for the same issue and I will post my config files tonight. I can print when I have the printer displaying ready but I receive and error in the log

rpc_client/cli_pipe.c:cli_rpc_pipe_open(2227)
cli_rpc_pipe_open: cli_nt_create failed on pipe \spoolss to MACHINE
owner-PC. Error was NT_STATUS_ACCESS_DENIED

thanks