Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Can not access linux printer from windows

Posted on 2002-07-21
10
18,460 Views
Last Modified: 2013-12-15
All,

I have a linux machine running Mandrake 8.2 and a windows machine running Windows 2000. The printer is installed on the linux machine and I am trying to access it from windows. I can access all the linux directories and files from my windows machine and even setting up 'Network Printer' on windows also went through fine but when I try to print a test page, I get this message 'Access denied, unable to connect'

Can anyone help me with this ? It looks like a user permission issue. I am logged in as 'Administrator' on windows and 'nkapoor' on linux machine but the user 'Administrator' exists on linux machine as well.

Here is partial smb.conf:

#========= Global Settings ==============
[global]

   workgroup = Workgroup
   server string = MandrakeLinux Samba Server %v

# 2. Printing Options:
# CHANGES TO ENABLE PRINTING ON ALL CUPS PRINTERS IN THE NETWORK
# (as cups is now used in linux-mandrake 7.2 by default)
# if you want to automatically load your printer list rather
# than setting them up individually then you'll need this
   printcap name = lpstat
   load printers = yes

# It should not be necessary to spell out the print system type unless
# yours is non-standard. Currently supported print systems include:
# bsd, sysv, plp, lprng, aix, hpux, qnx, cups
   printing = cups

# Samba 2.2 supports the Windows NT-style point-and-print feature. To
# use this, you need to be able to upload print drivers to the samba
# server. The printer admins (or root) may install drivers onto samba.
# Note that this feature uses the print$ share, so you will need to
# enable it below.
# This parameter works like domain admin group:
# printer admin = @<group> <user>
  printer admin = @adm

# Security mode. Most people will want user level security. See
# security_level.txt for details.
   security = share

   encrypt passwords = yes
   smb passwd file = /etc/samba/smbpasswd
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   dns proxy = no
   log file = /var/log/samba/log.%m
   max log size = 50
   hosts allow = 192.168.1. 127.

#=========== Share Definitions =============
[aprinter]
        path = /tmp
        writeable = false
        printable = true
        guest ok = true


Thanks
Nishi
0
Comment
Question by:nkapoor
10 Comments
 
LVL 1

Expert Comment

by:leochan72
ID: 7191865
Did you set up the printer in your Linux? In my opinion, you should change "writable" to "yes" or "true" instead of false. And in my setting, there should be a "printer=" the name of the printer setup in Linux. Hope it helps.

Leo
0
 

Author Comment

by:nkapoor
ID: 7192481
I tried it but the error is still the same - Access denied, unable to connect. It is something to do with 'Administrator' login in Windows, not able to have access to 'aprinter' in Linux. I can get to /tmp and /usr/local and all the other directoris though.

Nishi
0
 
LVL 1

Expert Comment

by:leochan72
ID: 7193919
Try change the "security = share" to "security = user". That's what I'm setting. It's probably the reason that denied your access.

Leo
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

by:nkapoor
ID: 7195374
Tried that too, but without success...still the same exact error message :-(
0
 
LVL 1

Expert Comment

by:leochan72
ID: 7196485
Just curious. What's the permission of /tmp? My printer path is rwxrwxrwt, that's for your reference. And can you print something in linux itself.
Another reminder, after you changed the conf file, you should restart that service in order to have immediately effect.

Actually, my setting of "printing" is bsd and not cups. I have no idea is that a difference between mine and yours too.

Leo
0
 
LVL 1

Accepted Solution

by:
leochan72 earned 100 total points
ID: 7196490
And how about uncomment the "printer adim"? ah, you use Win2k, right? Maybe you need to setup the printer by administrator and let the user to use the printer.

Leo
0
 

Author Comment

by:nkapoor
ID: 7367855
0
 

Expert Comment

by:kaptain404
ID: 8133423
I have this problem too.  Have you checked the samba logs?
I put "debuglevel = 3" in the smb.conf file to get this error "access DENIED for printer open"

my setting of printing is lprng

Also i don't have that admin either, as far as i can gather its just the samba server sharing out printer drivers.

I've also noticed that sometimes my "printers and faxes" folder comes up  in winxp and sometimes it doesn't.

nkapoor : I'd be curious if your getting the same errors as me.

I get the feeling the problem is with my path variable.
0
 

Expert Comment

by:fpoint
ID: 8472004
Have the same problem twice !

:(

BUT found the anwser twice on internet :)

1) Verify if u have access on the printer on host where samba server is :
     # lpstat (no answer is good !)
     NB: if not check /etc/cups/client.conf and after cupsd.conf for      security access

2) Then if u want to use raw driver on samba server (and intalled driver on each windows client) , dont forget to put this line in smb.conf

[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = no
   use client driver = yes                 <----- THIS ONE
   print command = lpr -P %p -o raw %s -r   # using client side printer drivers.


3) If that doesnt still work see :
    http://homex.subnet.at/~max/comp-10_cups.php

good luck
0
 
LVL 1

Expert Comment

by:jebradl
ID: 20878311
I think that the easiest way to setup a linux printer to be used from Windows is to setup the windows printer to print to a TCPIP port.

You install the printer as a local printer on Windows, then select "Standard TCP/IP Port" as the port, plugin the IP address of the linux machine, and the port name (whatever you named it, lp, lp0, etc), and the RAW format, and you're good to go.

You don't have to fool with SAMBA with this method. If your'e planning to swap storage, scanners, etc., it might be worth going the samba route, but if it's just for the printer, it's overkill.
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question