Can not access linux printer from windows

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
nkapoorAsked:
Who is Participating?
 
leochan72Connect With a Mentor Commented:
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
 
leochan72Commented:
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
 
nkapoorAuthor Commented:
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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
leochan72Commented:
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
 
nkapoorAuthor Commented:
Tried that too, but without success...still the same exact error message :-(
0
 
leochan72Commented:
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
 
nkapoorAuthor Commented:
0
 
kaptain404Commented:
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
 
fpointCommented:
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
 
jebradlCommented:
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
All Courses

From novice to tech pro — start learning today.