Solved

Can not access linux printer from windows

Posted on 2002-07-21
10
18,468 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
[X]
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
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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 

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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Unix process listing into CSV format 3 87
php56-php-mcrypt for rhel7 php56 1 169
how to write and save a unix script 12 36
Linux 6 34
Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
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.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

739 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