Solved

Can not access linux printer from windows

Posted on 2002-07-21
10
18,444 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Tried that too, but without success...still the same exact error message :-(
0
 
LVL 1

Expert Comment

by:leochan72
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 1

Accepted Solution

by:
leochan72 earned 100 total points
Comment Utility
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
Comment Utility
0
 

Expert Comment

by:kaptain404
Comment Utility
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
Comment Utility
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
Comment Utility
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
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…
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.:
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…

744 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

8 Experts available now in Live!

Get 1:1 Help Now