Solved

Can not access linux printer from windows

Posted on 2002-07-21
10
18,449 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
 

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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
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 find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

911 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now