# Unable to connect printer using Vista on smb network [SOLVED

## hanj

Hello all

I'm having a hard time connecting a Windows Vista (Home Premium) laptop to the samba server for printing. Vista can connect and view shares fine, but is unable to connect to the printer and print. All other machines on the network are Windows XP Pro, and can share and print fine. When connecting the printer, the following shows in the samba logs:

```
[2007/12/04 17:15:28, 1] rpc_client/cli_pipe.c:cli_rpc_pipe_open(2222)

  cli_rpc_pipe_open: cli_nt_create failed on pipe \spoolss to machine comp.  Error was NT_STATUS_ACCESS_DENIED

[2007/12/04 17:15:28, 1] rpc_client/cli_pipe.c:cli_rpc_pipe_open(2222)

  cli_rpc_pipe_open: cli_nt_create failed on pipe \spoolss to machine comp.  Error was NT_STATUS_ACCESS_DENIED

[2007/12/04 17:22:13, 1] rpc_client/cli_pipe.c:cli_rpc_pipe_open(2222)

  cli_rpc_pipe_open: cli_nt_create failed on pipe \spoolss to machine comp.  Error was NT_STATUS_ACCESS_DENIED

[2007/12/04 17:22:14, 1] rpc_client/cli_pipe.c:cli_rpc_pipe_open(2222)

  cli_rpc_pipe_open: cli_nt_create failed on pipe \spoolss to machine comp.  Error was NT_STATUS_ACCESS_DENIED

[2007/12/04 17:22:30, 1] rpc_client/cli_pipe.c:cli_rpc_pipe_open(2222)

  cli_rpc_pipe_open: cli_nt_create failed on pipe \spoolss to machine comp.  Error was NT_STATUS_ACCESS_DENIED

[2007/12/04 17:24:27, 1] smbd/ipc.c:api_fd_reply(290)
```

I see plenty of mention of this on this forum and using Google, but the methods suggested don't seem to work for me. I've disabled the Windows Firewall, and it appears that the communication back to the laptop is denied. Not sure where to look from here.

Below are relevant snips of the smb.conf. I've seen mention about 'disable spoolss = yes', but when I add this, printing is broken for all the other machines.

```
#disable spoolss = yes

printcap name = cups

load printers = yes

cups options = raw

use client driver = yes

map to guest = bad user

security = user

printer admin = @adm

[printers]

comment = All Printers

path = /var/spool/samba

browseable = no

guest ok = yes

writable = no

printable = yes

create mode = 0700

print command = lpr-cups -P %p -o raw %s -r   # using client side printer drivers.

[print$]

path = /var/lib/samba/printers

browseable = yes

read only = yes

write list = @adm root

guest ok = yes
```

Here is the version of samba running on the server:

```
[ebuild   R   ] net-fs/samba-3.0.27a  USE="acl cups pam python readline -ads -async -automount -caps -doc -examples -fam -ipv6 -ldap -quotas (-selinux) -swat -syslog -winbind" LINGUAS="-ja -pl" 0 kB
```

Please let me know if you need any more information, etc.

Thanks!

hanji

----------

## hanj

bump

----------

## hanj

Hello

Can anyone lend a hand on this? This week I need to get it working.. so any suggestions are greatly appreciated. Frankly, I have no idea why this is not working.. seems like it should.. just not sure where to look now.

Thanks!

hanji

----------

## Dagger

Is your samba server stand alone, or NT domain member?

I had a hard time with samba 3.0.27a with NT authentication

I don't think this will solve anything, but try

```

msdfs root = yes

```

searching for your error message I found:

 *Quote:*   

> 
> 
> Printing to a shared printer on XP without a  valid username for the XP 
> 
> box in the Print Utility  interface results in this error. Even if 
> ...

 

I also found this

```

on samba you can try:

client ntlmv2 auth = yes

```

and/or VISTA you can change the registry

```

HKLM/CurrentControlSet/LMAuthenticationMode

change it from a 3 to a 1 to get it to use NTLM rather than NTLMV2.

```

I had above problem when vista came out, and didn't want to connect to any samba machine (although I believe this was already corrected).

----------

## hanj

 *Dagger wrote:*   

> Is your samba server stand alone, or NT domain member?
> 
> I had a hard time with samba 3.0.27a with NT authentication
> 
> I don't think this will solve anything, but try
> ...

 

Hello Dagger

Thanks so much for the reply. The samba server is stand along and NOT NT domain member. Workstations connect to a workgroup. I'll give that setting a try. It really seems like the problem is how samba is communicating back to the Vista machine. The NT_STATUS_ACCESS_DENIED error occurs during the 'connect' of the printer. Vista shows the printer connected, but when a test page is sent, nothing happens. No chatter in cups log, so I'm thinking that the printer is not actually connected.

Thanks!!!

hanji

----------

## Dagger

btw does it work at all without any authentication?

also what printer do you have and drivers are you using under VISTA (PCL or PS)?

----------

## hanj

 *Dagger wrote:*   

> btw does it work at all without any authentication?
> 
> also what printer do you have and drivers are you using under VISTA (PCL or PS)?

 

Hello

We are using authentication (samba user created to match system user on the vista machine). We have not tried straight no-auth to see if that improves or not.. will do.

Currently the samba server has two printers connected to it (HP LaserJet 4100 TN and HP1220C PS). The HP LaserJet 4100 TN needs drivers installed on the machine, but the HP1220C PS has built in Vista support. During these tests, we were only trying to work with the 1220C to take additional variables out of the loop.

Thanks

hanji

----------

## quantumsummers

Bumping in order to be emailed updates to this thread.

I have a friend with this issue.  It may be an issue with Vi$ta's lack of local security policy on Home Premium.

Thanks,

Summers

----------

## Dagger

Home premium lacks most of the corporate features. The one which completely blow my mind was lack of network password manager. I can't map network drive on login, because I need to type my password after each login!! Such basic feature was presend since early days of W95... I have to use external programs (net profiles) which does all what home premium lacks.

----------

## hanj

So do you think that Home Premium might be the problem??

```
HKLM/CurrentControlSet/LMAuthenticationMode

change it from a 3 to a 1 to get it to use NTLM rather than NTLMV2. 
```

We did change this reg value.. and no improvement. We'll be going on site on Thursday, and will try a few of the samba settings. I guess what I'm hoping to find out in the meantime.. is this even possible with Vista Home Premium? What is the flavor that will work ('for sure')? Vista Enterprise?

Thanks!

hanji

----------

## Dagger

I'm sorry, but I don't have too much experience with the worst microsoft system ever and samba printers :S

Have you tried M$ tech support?

So far I've got only 5 Vista Business/Ultimate in my company and they give me more headache than all other 50 machines. Never had problems with printers as all of them have network cards and are controlled from W2k3 server.

----------

## hanj

I wonder for a 'kludge' I could share printing through a XP box.. or do you think we'd run into the same problem? Basically, create a print share on the XP box, and Vista would use that print share vs Samba??

hanji

----------

## Dagger

 *hanj wrote:*   

> I wonder for a 'kludge' I could share printing through a XP box.. or do you think we'd run into the same problem? Basically, create a print share on the XP box, and Vista would use that print share vs Samba??
> 
> hanji

 

well I think is has bigger changes to work since both wxp and vista are m$ products. Tomorrow at work I install one of the printers directly under linux box and share it over the samba, and will try to map it from vista business (I know it won't solve your problem, but at least should eliminate/confirm home premium issue).

----------

## hanj

 *Dagger wrote:*   

>  *hanj wrote:*   I wonder for a 'kludge' I could share printing through a XP box.. or do you think we'd run into the same problem? Basically, create a print share on the XP box, and Vista would use that print share vs Samba??
> 
> hanji 
> 
> well I think is has bigger changes to work since both wxp and vista are m$ products. Tomorrow at work I install one of the printers directly under linux box and share it over the samba, and will try to map it from vista business (I know it won't solve your problem, but at least should eliminate/confirm home premium issue).

 

Hello Dagger

Thanks for helping on this. That would be awesome if you can verify if it's home premium vs business issue and samba. Also, what was the external programs (net profiles) you had to use? Was the program called 'net profiles'?

Thanks!

hanji

----------

## Dagger

take a look here. This tiny program saved me a lot of frustration with home premium

ok printers...

For the testing purposes I've used OKI ES3640 

```

* net-print/cups

    gentoo:                  (1.1.23-r8)K 1.2.10-r1 1.2.12-r2 1.2.12-r3 1.3.4-r3 {:0} 

    installed:               1.3.4-r3* {:0} 

* net-fs/samba

    gentoo:                  3.0.24-r3 3.0.25c-r2 3.0.26a-r1 3.0.26a-r2 (3.0.27)R 3.0.27a 3.0.28 {:0} 

    installed:               3.0.28* {:0} 

```

/etc/cups/printers.conf

```

<Printer OKI>

Info 

Location 

DeviceURI socket://10.0.5.3:9100

State Idle

StateTime 1197301630

Accepting Yes

Shared Yes

JobSheets none none

QuotaPeriod 0

PageLimit 0

KLimit 0

OpPolicy default

ErrorPolicy stop-printer

</Printer>

```

I've installed this printer from windows vista ultimate and vista business without any problems. Printing works fine, although you need to wait 2-3 sec longer than from W2k3.

I'm using NT auth for samba.

I will also try to change my config to work without NT auth (but can't do it before 5pm today as I've got quite a few people using this samba server :p) I will stay a bit later today, and will check it for you!

----------

## hanj

We ended up using a wireless print server.. so I declared defeat, but we had to get some solution in place. Conclusion.. vista + samba + printing is a pain in the ass.

hanji

----------

## tp11235

Hi,

I have spent a long time trying to get the following mix to work:

Gentoo Server with Canon MP160 on USB working fine from the server itself. (However, you need to do some work to get an MP160 going - there is a lot of help on the forums).

WinXP Laptop

Vista Business PC

I Emerged SAMBA and CUPS from Gentoo.

Created root, tim and judith using smbpasswd.

File sharing, including writing to the shared drives worked straight away, but printing would not. I was getting Access Denied reported by the clients.

To be honest I have been trying all sorts of changes so I am unsure how far my config files are from the Gentoo vanilla. However, it seemed that the critical change was to add the line:

CUPS OPTIONS = RAW

to the [PRINTERS] section of smb.conf.

I still get "Access Denied, unable to connect" on the printer queue windows in the clients, but then the clients print OK. It takes a while (30-45 seconds) for a job to come through from Vista.

Here are my config files in case they are useful to people.

#======================= Global Settings =====================================

[global]

# 1. Server Naming Options:

   workgroup = WORKGROUP

   netbios name = Fred

# server string is the equivalent of the NT Description field

   server string = Fred

# 2. Printing Options:

   printcap name = cups

   load printers = yes

   printing = cups

# 3. Logging Options:

   log file = /var/log/samba/log.%m

# Put a capping on the size of the log files (in Kb).

   max log size = 50

# 4. Security and Domain Membership Options:

  hosts allow = 192.168.1. 127.

# Uncomment this if you want a guest account, you must add this to /etc/passwd

# otherwise the user "nobody" is used

;  guest account = printeruser

# Allow users to map to guest:

  map to guest = bad user

# Security mode. Most people will want user level security. See

# security_level.txt for details.

  security = user

# 5. Browser Control and Networking Options:

# Most people will find that this option gives better performance.

# See speed.txt and the manual pages for details

   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

   domain master = yes

# Preferred Master causes Samba to force a local browser election on startup

# and gives it a slightly higher chance of winning the election

   preferred master = yes

# 6. Domain Control Options:

 passdb backend = smbpasswd

# 7. Name Resolution Options:

# Windows Internet Name Serving Support Section:

# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server

   wins support = yes

# WINS Proxy - Tells Samba to answer name resolution queries on

# behalf of a non WINS capable client, for this to work there must be

# at least one  WINS Server on the network. The default is NO.

   wins proxy = yes

# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names

# via DNS nslookups. The built-in default for versions 1.9.17 is yes,

# this has been changed in version 1.9.18 to no.

   dns proxy = no

#============================ Share Definitions ==============================

[homes]

   comment = Home Directories

   browseable = yes

   writable = yes

[printers]

   comment = All Printers

   path = /var/spool/samba

   guest ok = yes

   valid users = tim judith root

   cups options = raw

   browseable = yes

   printable = yes

[print$]

   path = /var/lib/samba/printers

   browseable = yes

   read only = yes

   write list = @adm root

   guest ok = no

[Datadrive]

   comment = Access to the Data Drive

   path = /data

   valid users = tim root

   guest ok = no

   public = no

   writeable = yes

[Backup]

   comment = Access to the back up drive

   path = /iomega

   valid users = tim root

   guest ok = no

   public = no

   writeable = yes

And the CUPSD.conf file:

LogLevel info

SystemGroup lpadmin

# Allow remote access

Port 631

Listen /var/run/cups/cups.sock

# Enable printer sharing and shared printers.

Browsing On

BrowseOrder allow,deny

BrowseAllow @LOCAL

BrowseAddress @LOCAL

DefaultAuthType Basic

<Location />

  # Allow shared printing...

  Order allow,deny

  Allow @LOCAL

</Location>

<Location /admin>

  # Encryption Required

  Order allow,deny

  Allow @LOCAL

</Location>

<Location /admin/conf>

  AuthType Basic

  Require user @SYSTEM @LOCAL

  Order allow,deny

  Allow localhost

</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 @LOCAL

    Order deny,allow

  </Limit>

  <Limit Pause-Printer Resume-Printer Set-Printer-Attributes 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-Add-Printer CUPS-Delete-Printer CUPS-Add-Class CUPS-Delete-Class CUPS-Accept-Jobs CUPS-Reject-Jobs CUPS-Set-Default>

    AuthType Basic

    Require user @LOCAL

    Order deny,allow

  </Limit>

  <Limit Cancel-Job CUPS-Authenticate-Job>

    Require user @OWNER @SYSTEM @LOCAL

    Order deny,allow

  </Limit>

  <Limit All>

    Order deny,allow

  </Limit>

</Policy>

Hope its useful and if anyone solves the strange problem of Windows saying it cannot access the printer but printing anyway please let me know.

Cheers

Tim.

----------

## tp11235

I found this solution here

http://lists.samba.org/archive/samba/2002-March/039619.html

I added the line:

USE CLIENT DRIVER = YES

in the [PRINTERS] section of smb.conf.

Everything works perfectly now.

Tim.

----------

