Their seem to be hundreds of posts on this same problem, but no solutions...
I need to first know if it is possible to print from a Windows XP box to a Linux box with a (cups) configured printer.
As for the usual details...
Yes, the printer is configured correctly with cups - I can print fine on the Linux box.
File sharing works fine - I can share files both ways on the network between the Linux and XP boxes
And I can add the printer on the win box fine - I select "add network printer..etc.." and it is listed and added fine, but once it is added, I am told "unable to connect, access denied" on the printer description.
Here is my samba config file, if theres something wrong with it, maybe someone can let me know. If it is gonna be too much of a problem - or if it is just not possible, I can just stick the printer on a windows box and share from it.
Thx.. Dean
deanrantala
12-03-2003, 12:43 PM
************************** my samba config file***************************
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options (perhaps too
# many!) most of which are not shown in this example
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentry and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command "testparm"
# to check that you have not many any basic syntactic errors.
#
#======================= Global Settings =====================================
[global]
# server string is the equivalent of the NT Description field
server string = File Server
# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
; hosts allow = 192.168.1. 192.168.2. 127.
# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
load printers = yes
# you may wish to override the location of the printcap file
; printcap name = /etc/printcap
# on SystemV system setting printcap name to lpstat should allow
# you to automatically obtain a printer list from the SystemV spool
# system
; printcap name = lpstat
# It should not be necessary to specify the print system type unless
# it is non-standard. Currently supported print systems include:
# bsd, sysv, plp, lprng, aix, hpux, qnx
# printing = cups
# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
# guest account = pcguest
# this tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba.%m
# Put a capping on the size of the log files (in Kb).
max log size = 50
# Security mode. Most people will want user level security. See
# security_level.txt for details. NOTE: To get the behaviour of
# Samba-1.9.18, you'll need to use "security = share".
security = share
# Use password server option only with security = server
# The argument list may include:
# password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
# or to auto-locate the domain controller/s
# password server = *
; password server = <NT-Server-Name>
# Note: Do NOT use the now deprecated option of "domain controller"
# This option is no longer implemented.
# You may wish to use password encryption. Please read
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
; encrypt passwords = yes
# Where to find the SSL certificates:
ssl CA certDir = /etc/ssl/certs
# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
; include = /usr/local/samba/lib/smb.conf.%m
# Most people will find that this option gives better performance.
# See speed.txt and the manual pages for details
# You may want to add the following on a Linux system:
SO_RCVBUF=8192 SO_SNDBUF=8192
socket options = TCP_NODELAY
# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# here. See the man page for details.
; interfaces = 192.168.12.2/24 192.168.13.2/24
# Browser Control Options:
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
; local master = no
# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
; os level = 33
# Domain Master specifies Samba to be the Domain Master Browser. This
# allows Samba to collate browse lists between subnets. Don't use this
# if you already have a Windows NT domain controller doing this job
; domain master = yes
# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
preferred master = yes
# Enable this if you want Samba to be a domain logon server for
# Windows95 workstations.
; domain logons = yes
# if you enable domain logons then you may want a per-machine or
# per user logon script
# run a specific logon batch file per workstation (machine)
; logon script = %m.bat
# run a specific logon batch file per username
; logon script = %U.bat
# Where to store roving profiles (only for Win95 and WinNT)
# %L substitutes for this servers netbios name, %U is username
# You must uncomment the [Profiles] share below
; logon path = \\%L\Profiles\%U
# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
# wins support = yes
# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
; wins server = w.x.y.z
# WINS Proxy - Tells Samba to answer name resolution queries on
# behalf of a non WINS capable client, for this to work there must be
# at least one WINS Server on the network. The default is NO.
; wins proxy = yes
# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The built-in default for versions 1.9.17 is yes,
# this has been changed in version 1.9.18 to no.
dns proxy = no
#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = no
writable = yes
# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
; comment = Network Logon Service
; path = /usr/local/samba/lib/netlogon
; guest ok = yes
; writable = no
; share modes = no
# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;[Profiles]
; path = /usr/local/samba/profiles
; browseable = no
; guest ok = yes
# NOTE: If you have a BSD-style print system there is no need to
# specifically define each individual printer
#[printers]
# comment = All Printers
# path = /var/spool/samba
# browseable = yes
# public = yes #to allow user 'guest account' to print
# guest ok = yes
# writable = yes
# printable = yes
# This one is useful for people to share files
;[tmp]
; comment = Temporary file space
; path = /tmp
; read only = no
; public = yes
# A publicly accessible directory, but read only, except for people in
# the "staff" group
;[public]
; comment = Public Stuff
; path = /home/samba
; public = yes
; writable = yes
; printable = no
; write list = @staff
# Other examples.
#
# A private printer, usable only by fred. Spool data will be placed in fred's
# home directory. Note that fred must have write access to the spool directory,
# wherever it is.
;[fredsprn]
; comment = Fred's Printer
; valid users = fred
; path = /homes/fred
; printer = freds_printer
; public = no
; writable = no
; printable = yes
# A private directory, usable only by fred. Note that fred requires write
# access to the directory.
;[fredsdir]
; comment = Fred's Service
; path = /usr/somewhere/private
; valid users = fred
; public = no
; writable = yes
; printable = no
# a service which has a different directory for each machine that connects
# this allows you to tailor configurations to incoming machines. You could
# also use the %U option to tailor it by user name.
# The %m gets replaced with the machine name that is connecting.
;[pchome]
; comment = PC Directories
; path = /usr/pc/%m
; public = no
; writable = yes
# A publicly accessible directory, read/write to all users. Note that all files
# created in the directory by users will be owned by the default user, so
# any user with access can delete any other user's files. Obviously this
# directory must be writable by the default user. Another user could of course
# be specified, in which case all files would be owned by that user instead.
;[public]
; path = /usr/somewhere/else/public
; public = yes
; only guest = yes
; writable = yes
; printable = no
# The following two entries demonstrate how to share a directory so that two
# users can place files there that will be owned by the specific users. In this
# setup, the directory should be writable by both users and should have the
# sticky bit set on it to prevent abuse. Obviously this could be extended to
# as many users as required.
;[myshare]
; comment = Mary's and Fred's stuff
; path = /usr/somewhere/shared
; valid users = mary fred
; public = no
; writable = yes
; printable = no
; create mask = 0765
[ftp]
comment = FTP dir
path = /home/ftp
public = yes
browseable = yes
guest ok = yes
writable = yes
ashoksagar
12-03-2003, 05:06 PM
AFAIK with XP you require to use encrypted passwords, so uncomment the option and try.
; encrypt passwords = yes
remove the ; to uncomment.
deanrantala
12-04-2003, 03:59 PM
Nope.... :(
And it is still sharing files fine. Like I said, I am not sure what the problem really is since I can share files both ways just fine - even with passwords.
This is why I was not really sure if you could share printers like this between different OS's. I personally have never seen it happen, so was kinda curious...
And I also tried the printer on the XP box and tried sharing it from that - the Linux box/cups can't connect to it either.
No sharing either way :(
Bummer....
deanrantala
12-05-2003, 12:24 AM
:(
Hrmrmmm....
posterboy
12-05-2003, 10:25 AM
I don't know what's wrong, but, I daily have someone printing from a win98 box, over here on a linux LJIII, using samba, and it's all no sweat. At least you can be confident that THAT arrangement will work. BTW, I used SWAT for the samba setup.
cowanrl
12-05-2003, 11:38 AM
It is possible to print from WinXP to a Samba shared cups printer.
I'm using Red Hat 9 with cups printing. I'm sharing out my printers using Samba 3.0 and I am able to print to them from my WinXP Professional machines. I don't have any XP Home machines to test from.
I am using a different security model for Samba than you are but since you have file sharing working OK, then at least we know that your printing problems might not be a security issue.
I do think you are missing some critical lines in your smb.conf file. In my global section I have:
Those are the only 4 lines I have in my global section that relate to printing.
Here's what my [printers] share looks like:
[printers]
comment = All Printers
path = /var/spool/samba
printing = cups
printcap = cups
browseable = yes
# Set public = yes to allow user 'guest account' to print
guest ok = yes
writable = no
printable = yes
If Samba was compiled properly with the cups libraries, the print commands in the share section will be ignored. I don't think you need them.
Another thing, I do is use a Raw print queue to share out the printer in Linux. This allows the printer driver on the Windows machine to do all the work. All the Linux machine does is just send the job to the printer, it doesn't process it.
If I'm also going to print to the printer from Linux, I create a separate printer using the proper driver and print to it.
Doing it this way is a little extra work up front but saves a lot of frustration.
Also, when I look at the status of the printer on my XP machines, it says "Access denied, unable to connect". However, I am able to print to the printer.
I read somewhere the explanation for this error but I can't find it now and can't remember the explanation for it. It is a bogus error messge though.
deanrantala
12-06-2003, 11:53 AM
hrrmm..
Well, heres the real crazy thing...
I can print from Linux box to Linux box... And since file sharing works fine, I just don't understand what it is.
This is the 5th major networking job I have done with Win and Lin boxes together and it never seems to work. SuSE, Mandrake, Slackware, and even Deb (via Knoppix) have never done it.
I just wiped Slack on the server for SuSE. Whole new system from what I had when I started this thread. Still the same prob. And the YaST config tool even has an option to let me "share printers for Windows machines" - nothing.
BTW - I have tried it on 3 XP machines on the network now, so it is not the XP box...
Also, when I go to add the printer in windows, it says the server does not have the proper driver installed and asks me to install the correct one. Something wrong there? I usually get the message even when sharing printers on XP boxes, but at least it works.. Not from linux however....
*damn*
There has to be a solution.....
cowanrl
12-06-2003, 01:07 PM
Originally posted by deanrantala
Also, when I go to add the printer in windows, it says the server does not have the proper driver installed and asks me to install the correct one. Something wrong there? I usually get the message even when sharing printers on XP boxes, but at least it works.. Not from linux however....
*damn*
There has to be a solution.....
The error message about the server not having the proper printer driver is normal. By default, the drivers on the Linux machine won't work on a windows machine. I just let XP load whatever driver comes with it for that particular printer.
You can configure Samba so you can load the Windows printer drivers on it. I've never done it though. If I had hundreds of workstations that would be using the printer I probably would. I've usually only had just a few workstations using the printer so it hasn't been worth the effort.
I've never had a problem printing from Windows machines to Samba shared Linux printers. However, I've never used security = share. But that should work. According to the Samba documentation I've read, security = share is designed for print servers to keep it simple.
Have you looked through the log files on your Linux machine and event viewer on the Windows machine for any hints as to why or where it's failing?
With the problems you are having, I think I'd have to use a Network Analyzer like Ethereal and see where your print jobs are failing. Are the print jobs getting to the Samba server but not being printed or are they never leaving the Windows machine. There has to be an answer.
deanrantala
12-07-2003, 12:49 AM
Well, I could try tracing it down.. and I DO have ethereal - although I have never sued it and have no idea what to even do with it.. I just really hope I am not learning to ride a bike for the 20-something'th time....
An update - I also tried using the raw printer method - same thing. Also - is there a specific port that is used for this? I have no idea what else it could be. Have you ever used anyhiotng else besides RH? Have you always configured by hand?
On a side note.. I never see the job get sent to the printer qeue on the Linux box. And since I can never see the status of the job from the win box ("access denied, unable to connect") - I have no idea what is ever happening to it on the windows end.
But this seems to be a common problem - Mandrake, SuSE, and Slackware all have done the same thing. This really bites me too... I am about inches from killing the Linux part for Win Server 2003 about now just to get back functionality it is that bad now. Never tried sharing printers on RH however.
I am gonna look into it some more tonight.. But I am not sure it will uncover anything. I have gone through these settings on multiple networks using 3 different distros and various windows versions and have yet to see this work. Both configuring it by hand AND wioth the proper GUI tools.
deanrantala
12-07-2003, 12:57 AM
Something interesting I just noticed on this SuSE box... When I go to set up cups manually from localhost:631, I get to where I can see the printers and jobs waiting (from the Linux box of coarse) but as soon as I select anyhitng that needs rot privilages, it says I do not have the proper privilages to accesss the resources on the server - not even Slackware ever gave me that error...
I have never done it with any distro but Red Hat. I lead a sheltered life and Red Hat is the only distro I've ever used.
I configure the printers with the GUI Printer Configuration app supplied by Red Hat. I've never used the cups web interface to configure the printers.
I always edit my Samba smb.conf file by hand. But that shouldn't make any difference. Other than the missning cups printing lines in your smb.conf file, yours looks OK. As long as you added the lines I mentioned in my previous post, Samba should be configured properly.
How are you printing from Linux to Linux? Are you connecting using the SMB share or are you connecting to the printer through cups? I do not have any network sharing of my printers set up through cups. All my sharing is done through Samba.
I can see in the Red Hat Printer Configuration utility the option to share the printer via cups but I don't use it.
Other than the printer status, do you get any error messages pop up when you print from Windows or do the print jobs just seem to go to bit heaven(or perhaps bit hell)?
How do you install Samba? Do you compile it yourself or do you install it from some sort of binary package? If you compile it yourself, perhaps you are missing some option to allow it to support sharing cups printers.
I've always installed Samba from the rpm packages supplied by Red Hat or samba.org. Since sharing printers has always worked properly, I assume Samba has been compiled with the necessary options.
Also - is there a specific port that is used for this? I have no idea what else it could be.
Printing to a Samba share would use some TCP/UDP ports between 135 and 139 plus also possibly TCP port 445. But those are the same ports used for file sharing. If your firewall is letting the file sharing traffic through, it should let the print jobs through.
It would be a shame to have to spend the money for Windows licensing just for printer sharing. But I can certainly understand your frustration.
I think before I did that if my printers would supoort it, I'd by a stand alone print server for under $100, attach my printers to it and use lpd printing. That has always proven to be extremely reliable for me.
Onager
12-07-2003, 12:44 PM
Perhaps you could try sharing the printer out with straight CUPS, rather than adding the SAMBA layer on top?
Windows XP supports IPP, the protocol that CUPS uses, natively, and quite well (Windows 2000, on the other hand.....).
It's really simple to quite simple to set up, also: A few edits to the /etc/cups/cupsd.conf file to set access permissions and security, and all the server side config is done. (You can tell if it's set up right if, from the system you want to print from, http://<IP of server>:631 shows you the CUPS dialog)
Once that's done, in the add printer dialog in XP, select "Add local printer", then create a new port, of "Standard TCP/IP" type, and paste in the URL to the printer (http://<IP of server>:631/printers/<Printer name>)
I can post more details of the changes you need to make to cupsd.conf if you need them, but there are walkthroughs and how-tos available that would cover that, if you want to hunt them down.
Good luck, hope that helps!
-Onager
cowanrl
12-07-2003, 03:22 PM
Onager,
I would like to use cups shared printing from XP just to know how to do it. A copy of your cupsd.conf file with the lines you added to support your XP machines highlighted would be much appreciated.
Deanrantala,
If you want to see if the copy of Samba you are using has been compiled to support cups printing, execute:
ldd /usr/sbin/smbd
Substitute the absolute path to where smbd is located on your machine in the command. In the response, you should see a line something like:
If you don't see that line, your copy of Samba hasn't been compiled with cups support.
Loki3
12-07-2003, 03:36 PM
All I can say is that I had the same problem with my setup and adding the encrypted password line in smb.conf made it work.
cowanrl
12-07-2003, 03:48 PM
If you are using security = share, I wouldn't think that encrypt passwords = yes would be necessary since no password information is needed from the Windows machine. I could be wrong though.
But, since file sharing works between deanrantala's Windows machines and Samba server, I don't think authentication should be the issue. Uncommenting that line in his smb.conf file sure wouldn't hurt anything and would eliminate that issue.
I know in older versions of Samba, the default was encrypt passwords = no. In Samba 3, the default is encrypt passwords = yes. I'm not sure when the transition was made from a default of no to yes.
deanrantala
12-08-2003, 01:37 AM
damn.. This has about got me at the end of my nerves...
Well, yes, I checked. I have cups support in my samba build. I went over the smb.conf file - I'll even post it to see if you can see anyhitng I have missed once again. Still no printing, of coarse - and no, there are no error messages (besides the usuall access denied) - the data just goes to .errrr.... data heaven. :(
Also checked up about the fact I needed a guest account to print?? This is getting deep. Guest account - I will then need to set a password (slack will not make an account withoug password) wich means I will have to enable encrypted passwords, wich means I need to set additional permissions on the server, etc, etc...
damn damn...
Also tried the IPP way on XP - nothing. What exactly do I need extra in my cupsd.conf file? If I can get this working, it will suffice. And when I try to create a new port - I can NOT enter the URL in the "printer name or IP address" box - only the IP address. It gives me no option to enter the path to the printer. And if I enter anyhitng else besides an IP in the "port name" box, it is the same thing - I get an error saying it is an invaliv port name. I However, I CAN see the printer already listed in the "Use the following port" box as you say - with the full URL and printer name, so once again - WinXP sees the damn thing, but is too stupid to use it - only this time I actually get an error message that says the test page failed to print. Well, At least it is now telling me to take a hike - so I am getting somewhere now...lol.
But I need to also figure out how to get this samba printing working as well.. They have been developing this now for years, it should not be this much of a headache to get working...
# server string is the equivalent of the NT Description field
server string = File Server
# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
; hosts allow = 192.168.1. 192.168.2. 127.
# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
load printers = yes
# you may wish to override the location of the printcap file
; printcap name = /etc/printcap
# on SystemV system setting printcap name to lpstat should allow
# you to automatically obtain a printer list from the SystemV spool
# system
; printcap name = lpstat
# It should not be necessary to specify the print system type unless
# it is non-standard. Currently supported print systems include:
# bsd, sysv, plp, lprng, aix, hpux, qnx
printing = cups
printcap = cups
printcap name = /etc/printcap
# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
; guest account = pcguest
# this tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba.%m
# Put a capping on the size of the log files (in Kb).
max log size = 50
# Security mode. Most people will want user level security. See
# security_level.txt for details. NOTE: To get the behaviour of
# Samba-1.9.18, you'll need to use "security = share".
security = share
# Use password server option only with security = server
# The argument list may include:
# password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
# or to auto-locate the domain controller/s
# password server = *
; password server = <NT-Server-Name>
# Note: Do NOT use the now deprecated option of "domain controller"
# This option is no longer implemented.
# You may wish to use password encryption. Please read
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
encrypt passwords = yes
# Where to find the SSL certificates:
ssl CA certDir = /etc/ssl/certs
# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
; include = /usr/local/samba/lib/smb.conf.%m
# Most people will find that this option gives better performance.
# See speed.txt and the manual pages for details
# You may want to add the following on a Linux system:
SO_RCVBUF=8192 SO_SNDBUF=8192
socket options = TCP_NODELAY
# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# here. See the man page for details.
; interfaces = 192.168.12.2/24 192.168.13.2/24
# Browser Control Options:
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
; local master = no
# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
; os level = 33
# Domain Master specifies Samba to be the Domain Master Browser. This
# allows Samba to collate browse lists between subnets. Don't use this
# if you already have a Windows NT domain controller doing this job
# domain master = yes
# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
preferred master = yes
# Enable this if you want Samba to be a domain logon server for
# Windows95 workstations.
; domain logons = yes
# if you enable domain logons then you may want a per-machine or
# per user logon script
# run a specific logon batch file per workstation (machine)
; logon script = %m.bat
# run a specific logon batch file per username
; logon script = %U.bat
# Where to store roving profiles (only for Win95 and WinNT)
# %L substitutes for this servers netbios name, %U is username
# You must uncomment the [Profiles] share below
; logon path = \\%L\Profiles\%U
# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
; wins support = yes
# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
; wins server = w.x.y.z
# WINS Proxy - Tells Samba to answer name resolution queries on
# behalf of a non WINS capable client, for this to work there must be
# at least one WINS Server on the network. The default is NO.
; wins proxy = yes
# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The built-in default for versions 1.9.17 is yes,
# this has been changed in version 1.9.18 to no.
dns proxy = no
#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = no
writable = yes
# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
; comment = Network Logon Service
; path = /usr/local/samba/lib/netlogon
; guest ok = yes
; writable = no
; share modes = no
# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;[Profiles]
; path = /usr/local/samba/profiles
; browseable = no
; guest ok = yes
# NOTE: If you have a BSD-style print system there is no need to
# specifically define each individual printer
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
printing = cups
printcap = cups
# Set public = yes to allow user 'guest account' to print
guest ok = yes
writable = yes
public = yes
printable = yes
# This one is useful for people to share files
;[tmp]
; comment = Temporary file space
; path = /tmp
; read only = no
; public = yes
# A publicly accessible directory, but read only, except for people in
# the "staff" group
;[public]
; comment = Public Stuff
; path = /home/samba
; public = yes
; writable = yes
; printable = no
; write list = @staff
# Other examples.
#
# A private printer, usable only by fred. Spool data will be placed in fred's
# home directory. Note that fred must have write access to the spool directory,
# wherever it is.
;[fredsprn]
; comment = Fred's Printer
; valid users = fred
; path = /homes/fred
; printer = freds_printer
; public = no
; writable = no
; printable = yes
# A private directory, usable only by fred. Note that fred requires write
# access to the directory.
;[fredsdir]
; comment = Fred's Service
; path = /usr/somewhere/private
; valid users = fred
; public = no
; writable = yes
; printable = no
# a service which has a different directory for each machine that connects
# this allows you to tailor configurations to incoming machines. You could
# also use the %U option to tailor it by user name.
# The %m gets replaced with the machine name that is connecting.
;[pchome]
; comment = PC Directories
; path = /usr/pc/%m
; public = no
; writable = yes
# A publicly accessible directory, read/write to all users. Note that all files
# created in the directory by users will be owned by the default user, so
# any user with access can delete any other user's files. Obviously this
# directory must be writable by the default user. Another user could of course
# be specified, in which case all files would be owned by that user instead.
;[public]
; path = /usr/somewhere/else/public
; public = yes
; only guest = yes
; writable = yes
; printable = no
# The following two entries demonstrate how to share a directory so that two
# users can place files there that will be owned by the specific users. In this
# setup, the directory should be writable by both users and should have the
# sticky bit set on it to prevent abuse. Obviously this could be extended to
# as many users as required.
;[myshare]
; comment = Mary's and Fred's stuff
; path = /usr/somewhere/shared
; valid users = mary fred
; public = no
; writable = yes
; printable = no
; create mask = 0765
[shared]
comment = Dean's shared folder
path = /home/deano/Shared
writable = yes
public = yes
deanrantala
12-08-2003, 01:55 AM
there is my *current* smb.conf file. I have set everyting you all have told me so far. Please go over it and let me know what is wrong - if there IS anyhitng wrong....
Yes, I can print from one Linux box to another via cups just fine. So it would tell that IPP is obviously working fine on the server end.
I might need another drink.....
thanks a million so far for all the help also, I really appreciate it.
deanrantala
12-08-2003, 02:14 AM
Update...
Got the printer added to the XP box via IPP - and it now says "ready" on the status.. but still can't print. In fact, I can't even open the printer properties dialog for it - it says "Printer properties cannot be displayed, opperation not permitted"
*sigh*
I am begining to think RH does somthing strange to the samba build - or even adds some proprietary software to the distro to print like you say it does because this seems to be a very common problem that is never solved (from looking at all the previous posts on the same thing)
and like I said, even setting it up through SuSE and YaST, I get the same thing, if YaST can't do it it seems it is just not possible. Perhaps this is a bug? But like a said, I have tried it on multiple Distros and win boxes on various networks - every last one is the same issue. So the problem is common. And yet.. I can print from windows to windows, From Linux to Linux, but not across the two. And even yet - I can share files amongst all. this just defies logic it seems.
cowanrl
12-08-2003, 07:04 PM
I wouldn't be too quick to give Red Hat any credit.
I think one of the differences on my network may be that my printers are not connected directly to my Linux server. I have 2 printers, an HP LJ2200 and an HP DJ 890C. They are both connected to a D-Link print server.
So, when I set them up in cups, the Queue type is Networked Unix(LPD), not Locally Connected.
I thought maybe that was the difference so I attached one of my printers directly to the server for testing. Sure enough, I had the same problems you did. No matter what I did, I could not print to the printer, either as a shared cups printer or as a Samba printer. I did get as far as having the light flash on the printer like it was receiving the job but it never printed. It just hung up in the queue.
If I looked in /var/log/cups/error_log I could see that the jobs had been handed to cups and it tried to print them but it never would. I'm not sure what the problem is.
But, when the printers are attached to my print server, everything works OK. I set the printer driver as a raw print queue and I can print from my XP machines.
When you read the Samba literature, Samba and cups should work together seamlessly. Somewhere there is a problem though. Maybe the answer may be on a Samba or cups mailing list.
I think if it was me, I'd either spend $80 on a networked print server or change back to lprng printing on my Linux/Samba server. I've never seen any problems with that not working with Windows.
deanrantala
12-09-2003, 02:26 AM
Hrmm. well, it looks like that is what I might end up doing...
Well, at least I feel better knowing I am not the only one who has the problem.... lol..
Antways, Thanks for all the help - although we didn't get too far, we managed to establish that there is obviously a slight issue with cups/samba. I might look into it a little and if I do find a solution, I will probably post it in "how I did it" for everyone else who seems to have this common issue.
Cheers :)
welo
02-29-2004, 07:54 AM
Okay, I realize this topic is kinda dormant and all involved parties consider it solved. Meantime, I have been though dozens of Linux print sharing tutorials and discussions over the last year, am no closer to getting print sharing to work by using a Linux box serving a LAN running Win computers, and it finally occurred to me why:
Nobody is explaining how to setup the Win computers. It's that simple.
Awhile back someone walked me through setting up print sharing between two Win computers (which only half worked; anytime the remote computer was rebooted the print initialization had to be reinitialized).
Meantime, I am running a home LAN on cable with two W2K computers hooked to an FC1 box setup exactly like This (http://forums.llamasery.com/showthread.php?t=3227) (I wrote that tutorial - any additional perpective there is welcome, since I may have misinterpreted a few things).
So let's work backwards here. Say I have done everything suggested on this thread regarding configuring Samba, CUPS and whatnot. What settings need to be applied to the Win computers to make them talk to the Linux box?
Hayl
02-29-2004, 08:18 AM
Dean.
Lose SAMBA for printer sharing - you don't need it. Win XP can print directly to CUPS without SAMBA in the picture at all.... Snag me on #justlinux next time you are on and I'll help.
1. make sure CUPS Daemon is set up to accept connections over the network
2. Set up the printer in Windows: In the wizard, pick "Connect to a printer on the Internet or on a home office network", enter the URL for the printer. The URL on mine looks like this: http://homesrvlinux01.home.bluffs.ab.ca:631/printers/lp
3. Tell it what driver to use, and print a test page :)
welo
02-29-2004, 02:39 PM
Originally posted by Hayl 1. make sure CUPS Daemon is set up to accept connections over the network
Okay, so for sake of clarity say I Have an HP OfficeJet T45 connected to the FC1 box, and did this (from KDE):
Start (or "Hat" :)) > System Settings > Printing
I have one printer listed as lp0, and it test prints fine. Now I select this printer and go to:
Action > Sharing... > Queue > This queue available... (select) > All hosts (select) > General > Automatically find... > Save and exit
Anything I missed there?
Originally posted by Hayl 2. Set up the printer in Windows: In the wizard, pick "Connect to a printer on the Internet or on a home office network", enter the URL for the printer. The URL on mine looks like this: http://homesrvlinux01.home.bluffs.ab.ca:631/printers/lp
This is where I run into trouble, probably becuase I don't know what url it's looking for. I had assumed since eth0 is assigned IP 192.168.1.1 I could just use that. No dice.
Any perspective is appreciated.
welo
02-29-2004, 03:43 PM
Progress by inches. From your example I used:
http://192.168.1.1:631/printers/lp0
(I would appreciate knowing exactly what that ':631' part is doing)
...and now get this message:
The server on which the 'HP OfficeJet T45 Foomatic/hpijs (recommended)' printer resides does not have the correct printer driver installed. If you want to install the driver on your local computer, click ok.
Obviously I don't want to install the driver locally (the printer is already working fine on the FC1 box), so what now?
Hayl
03-02-2004, 12:14 PM
Originally posted by welo
Progress by inches. From your example I used:
http://192.168.1.1:631/printers/lp0
(I would appreciate knowing exactly what that ':631' part is doing)
...and now get this message:
Obviously I don't want to install the driver locally (the printer is already working fine on the FC1 box), so what now?
ya you do... that is a window message to install the driver locally. you have to have the driver installed locally or windows can't spool the data. you can't not have the driver installed locally if you do it this way. trust me - install the driver and it will work. windows is just whining that the server doesn't have a copy of the driver for it to downlaod and install.
the :631 is the port - CUPS uses port 631
welo
03-02-2004, 01:25 PM
Okay, when you put it like that it makes sense. The reason I didn't want to install the HP drivers on my W2K machine(s) is because they come in a 30Mb exe file containing all kinds of extraneous crap for fax and image management etc. It takes a 2.66Ghz computer one minute to load them on boot, and it's just a flat out dodgy, buggy setup. However, I did manage to find just the the .inf files for the printer and scanner. Lemme see if I can figure out how to install them without having to lug this printer around and connect it to the various machines.
Hayl
03-02-2004, 01:34 PM
cool - ya there has to be a way to select the driver - only
welo
03-02-2004, 02:47 PM
Okay, it's working now :). So far I have been unable to get the drivers installed without actually connecting the printer to the Win machine. Works fine on mine, although my wife's is using the generic NT driver and will only do black and white printing for now. Guess I'll have to lug the printer upstairs after all :D (mine was easy because I have the W2K and FC1 boxes side by side with a KVM connection).
Cheers for all your help, man. I really appreciate it. I'll make sure to writeup something about this to add to the "How I Did It" forum. Someone else is bound to need it sooner than later.
justlinux.com
Copyright 2007 Jupitermedia Corporation All Rights Reserved.