LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Samba/Cups print sharing problems (/var/spool/samba files) (https://www.linuxquestions.org/questions/linux-general-1/samba-cups-print-sharing-problems-var-spool-samba-files-152568/)

Gates1026 03-02-2004 08:41 AM

Samba/Cups print sharing problems (/var/spool/samba files)
 
I am setting up a print server for the company I am working for and ran into a little trouble. Right now I am running the print server on Fedora Core 1 and sharing printers to linux and windows machines. The problem that I am having is that when someone tries to print, and there is no file in /var/spool/samba nothing happens at all. If I do # touch IT_Dept (that is the share name of the printer), and then they try to print everything works like a charm but the file then disappears. I am not sure why this happens really and how to resolve the problem. If someone could give me some advice, I would appreciate it very much. People are getting testy without being able to print properly and the old Windows print server is on its death bed.

Thanks in advance for any help :)

Here is my smb.conf file for printing:

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
public = yes
guest ok = yes
writable = no
printable = yes
create mode = 0700
print command = lpr -p %p -o raw %s -r
lpq command = lpstat -o %p
lprm command = cancel %p-%j


homey 03-02-2004 09:40 AM

My printing section looks a little more basic than yours...

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
# Set public = yes to allow user 'guest account' to print
guest ok = no
writable = no
printable = yes


But I also edit the following files to enable Windows printing to my Linux printer.

Remove the hash mark ( # ) to enable that feature.

/etc/cups/mime.convs
application/octet-stream application/vnd.cups-raw 0 -

Also uncomment the following line from this file....

/etc/cups/mime.types:
application/octet-stream

Don't forget to restart cups with the command: service cups restart

When setting up a printer from a Redhat client to the Redhat server.
In cups, select
Device URI: smb://mydomain.com/multiscan/printer

Gates1026 03-02-2004 09:56 AM

I checked and I do have these values entered into the /etc/cups files, so that is all squared away. I still have nothing in /var/spool/samba. I was under the impression that when I added printers through the browser utility that there should be a file made for each printer:

# pwd
/var/spool/samba
# ls -l
total 0

I still get nothing. Would it matter at all that most of the 7 printers are JetDirect printers and not actually connected directly? The only way I am able to make it work temporarily is to do # touch IT_Dept. When I do that a user can print 1 time and 1 time only, as it will remove that file. I have been digging around for a while and still haven't come up with anything yet :(

homey 03-02-2004 10:01 AM

Quote:

/var/spool/samba
My box never does anything in that folder that I'm aware of, but does use the /var/spool/cups.

Gates1026 03-02-2004 10:09 AM

What permissions do you have on everything inside the folder /var/spool/cups?

homey 03-02-2004 10:32 AM

[root@multiscan cups]# ls -al
total 28
drwx--x--- 3 root sys 4096 Mar 1 22:00 .
drwxr-xr-x 18 root root 4096 Feb 13 15:59 ..
-rw------- 1 lp sys 631 Mar 1 17:40 c00001
-rw------- 1 lp sys 629 Mar 1 18:28 c00002
-rw------- 1 lp sys 629 Mar 1 18:34 c00003
-rw------- 1 lp sys 629 Mar 1 22:00 c00004
drwxrwx--T 2 root sys 4096 Mar 1 08:07 tmp

Gates1026 03-02-2004 10:41 AM

Same as mine. Here is an error message from the log file for samba:

[2004/03/02 08:32:53, 1] smbd/service.c:make_connection_snum(705) <ipaddress> (ipaddress) connect to service IT_Dept initially as usersamba (uid=501, gid=501) (pid 28673)lpr: Unable to access "IT_Dept" - No such file or directory

IT_Dept is the printer name that I assigned the JetDirect connected printer.

Here are the permissions for /var/log/samba:
drwxrwxrwt 2 root root 4.0K Sep 24 20:57

I still think it has something to do with this directory b/c when I add that file, it works fine and then removes it.

homey 03-02-2004 10:45 AM

Here is a site which may help you with the jetdirect setup.....
http://www.redhat.com/docs/manuals/l...t-printer.html

Gates1026 03-02-2004 11:04 AM

All of the printing from the print server itself is ok, I can print off test pages........so I dont think cups is the problem. I still believe that it is a samba issue.

Jarekczek 06-23-2013 01:33 AM

While trying to diagnose my printing problems in similar environment, I found out that the spool files were empty. Samba and cups reported no problems at all, on Windows side it also seemed to work seemlessly. However no print jobs appeared in cups monitor and of course nothing was printed. Except Windows test pages which surprisingly were passing their way to printer.

The rescue came from setting use client driver = yes. It helps in communication between Windows and Samba in simplified printing environment, details in man smb.conf.

Strange thing in my case was that the problem emerged only after upgrading Debian from 6 to 7, which upgraded cups from 1.4.4 to 1.5.3 and Samba from 2:3.5.6 to 2:3.6.6. Previously I was using mapping of port LPT1 through command line, which was also a workaround. Now things got cleared and having a printer mapped directly by Windows is better, as it doesn't require me to do the mapping manually after every reboot.


All times are GMT -5. The time now is 09:39 PM.