SV: [Samba] RH9, Samba 2.2.8a and printing with CUPS

Roy Otto Kleiv roy.otto.kleiv at nc-spectrum.no
Thu Jun 26 13:35:05 GMT 2003


Hi again
 
Thank you all for helping me out, really appreciate it. 
 
Works like a charm now, I added
 
[global]
        printing = cups
        printcap name = lpstat
        load printers = yes

and in [printers]-section:

[printers]
        comment = All Printers
        path = /var/spool/samba
        browseable = no
        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
        printer admin = @users

to my smb.conf and now both printers prints like crazy.
 
Now I gotta get the upload function to work ;-)
 
Thanks again to all
 
Regards
Roy

	-----Opprinnelig melding----- 
	Fra: Karl Banasky [mailto:kbanasky at heatcon.com] 
	Sendt: to 26.06.2003 15:15 
	Til: Roy Otto Kleiv 
	Kopi: samba at lists.samba.org 
	Emne: Re: [Samba] RH9, Samba 2.2.8a and printing with CUPS
	
	

	Some quick things to look at.
	The [global] settings:
	
	printing = cups (not bsd -My understanding is that you want to use cups)
	No print comman needed with cups
	add printcap name = lpstat
	
	Under [printers]:
	
	[printers]
	       comment = Alle Printere
	       path = /var/spool/samba
	       read only = Yes
	       create mask = 0700 (I do not use this in mine)
	       guest ok = Yes
	       public = Yes
	       printable = Yes
	       browseable = Yes
	
	Use these setting and see the results.  Sorry for my hurry, admin'n for
	the staff this morning.  Hope this helps, and look over the document links
	the other posting sent.  Cheers
	Karl-
	
	
	> Hi there
	>
	> I just installed the above mentioned system and try to print from a W2k
	> box to the Samba box but nothing happens. There's no problem in printing
	> from the RH box or via Webmin but when I try to print from the W2k box
	> nothing happens. I don't get an error or anything.
	>
	> I installed the printer by the help of the add printer tool in RH, and
	> simply go to the Printer--->Add Printer on the W2k box. I install the
	> driver and try to print. I have two printers, a HPDeskJet710C and an
	> Okipage8wLite. The Oki printer doesn't work at all though, I need the
	> oki4drv daemon. Not sure what that is. But I'll get that to work later,
	> right now I need the HP printer to work from the W2k machine.
	>
	> At this point I don't want to upload the drivers, just get it to print.
	> I'll worry about the uploading of the drivers at a later point =) The
	> thing is this worked great on an earlier system i had, RH 7.1 and an
	> earlier version of Samba (can't remember which). No problems whatsoever.
	> But I can't seem to get this one to work.
	>
	> My logs and conf files are listed below
	>
	> Thanks in advance
	> Roy
	>
	> ------------------------------------------------------
	> smb.conf
	>
	>
	> # Global parameters
	>
	> [global]
	>
	>       workgroup = XXXX
	>
	>       netbios name = XXXXX
	>
	>       server string = XXXXX
	>
	>       encrypt passwords = Yes
	>
	>       unix password sync = Yes
	>
	>       security = User
	>
	>       log file = /var/log/samba/samba-log.%m
	>
	>       log level = 3
	>
	>       max log size = 50
	>
	>       name resolve order = wins lmhosts hosts bcast
	>
	>       socket options = SO_KEEPALIVE TCP_NODELAY SO_SNDBUF=8192
	> SO_RCVBUF=8192
	>
	>       logon path = \\%N\profiles\%U
	>
	>       logon script =  logon.bat
	>
	>       add user script = /usr/sbin/useradd -d /dev/null -g 100 -s
	> /bin/false -M %u
	>
	>       time server = Yes
	>
	>       domain logons = Yes
	>
	>       os level = 4
	>
	>       message command = csh -c 'xedit %s;rm %s' &
	>
	>       preferred master = True
	>
	>       domain master = True
	>
	>       local master = Yes
	>
	>       wins support = Yes
	>
	>       lock dir = /var/lock/samba
	>
	>       guest account = ftp
	>
	>       guest ok = Yes
	>
	>       show add printer wizard = Yes
	>
	>       printer admin = XXXXXX
	>
	>       load printers = Yes
	>
	>       #printing = cups
	>
	>       #printcap name = cups
	>
	>       printing = bsd
	>
	>       #default devmode = Yes
	>
	>       print command = /usr/bin/lpr -P%p -r %s
	>
	>       min print space = 2000
	>
	>       case sensitive = Yes
	>
	>       password level = 4
	>
	>       passwd chat = *password* %n\n *password* %n\n *updated*
	>
	>       smb passwd file = /usr/local/samba/private/smbpasswd
	>
	>       passwd program = /usr/bin/passwd %u
	>
	>
	>
	> [profiles]
	>
	>       path = /usr/local/samba/lib/profiles
	>
	>       read only = No
	>
	>       browseable = No
	>
	>       writeable = Yes
	>
	>       create mask = 0600
	>
	>       directory mask = 0700
	>
	>
	>
	> [netlogon]
	>
	>       path = /usr/local/samba/lib/netlogon
	>
	>       guest ok = No
	>
	>       browseable = No
	>
	>       read only = Yes
	>
	>       write list = XXXXX
	>
	>
	>
	> [homes]
	>
	>       comment = Hjemmekatalogen til: %U
	>
	>       read only = No
	>
	>       browseable = No
	>
	>       writeable = Yes
	>
	>
	>
	> [public]
	>
	>       comment = Public katalog
	>
	>       path = /public
	>
	>       read only = No
	>
	>       browseable = Yes
	>
	>       writeable = Yes
	>
	>       public = Yes
	>
	>       guest ok = Yes
	>
	>       create mask = 2770
	>
	>       directory mask = 2770
	>
	>
	>
	>
	>
	> [print$]
	>
	>       path = /usr/local/samba/print
	>
	>       browseable = Yes
	>
	>       guest ok = Yes
	>
	>       read only = Yes
	>
	>       writeable = Yes
	>
	>       write list = XXXXX
	>
	>
	>
	> [printers]
	>
	>       comment = Alle Printere
	>
	>       path = /var/spool/samba
	>
	>       read only = Yes
	>
	>       create mask = 0700
	>
	>       guest ok = Yes
	>
	>       public = Yes
	>
	>       printable = Yes
	>
	>       writeable = Yes
	>
	>       browseable = Yes
	>
	>  ------------------------------------------------------
	>
	> the first and last lines of the cups error_log
	>
	>
	> I [23/Jun/2003:12:28:38 -0400] Listening to 7f000001:631
	>
	> I [23/Jun/2003:12:28:38 -0400] Configured for up to 100 clients.
	>
	> I [23/Jun/2003:12:28:38 -0400] Allowing up to 10 client connections per
	> host.
	>
	> I [23/Jun/2003:12:28:38 -0400] LoadPPDs: Wrote "/etc/cups/ppds.dat", 13
	> PPDs...
	>
	> E [23/Jun/2003:12:28:38 -0400] StartListening: Unable to find IP address
	> for server name "localhost.localdomain" - Host name lookup failure
	>
	> E [23/Jun/2003:12:28:38 -0400] StartListening: Unable to bind socket -
	> Cannot assign requested address.
	>
	> I [23/Jun/2003:18:51:33 +0200] Listening to 7f000001:631
	>
	> I [23/Jun/2003:18:51:33 +0200] Configured for up to 100 clients.
	>
	> I [23/Jun/2003:18:51:33 +0200] Allowing up to 10 client connections per
	> host.
	>
	> I [23/Jun/2003:18:51:33 +0200] LoadPPDs: Read "/etc/cups/ppds.dat", 13
	> PPDs...
	>
	> .
	> .
	> .
	> .
	> .
	>
	> I [26/Jun/2003:12:07:05 +0200] Hint: Do you have the raw file printing
	> rules enabled?
	>
	> E [26/Jun/2003:12:32:41 +0200] print_job: Unsupported format
	> 'application/octet-stream'!
	>
	> I [26/Jun/2003:12:32:41 +0200] Hint: Do you have the raw file printing
	> rules enabled?
	>
	> I [26/Jun/2003:12:33:15 +0200] Listening to 7f000001:631
	>
	> I [26/Jun/2003:12:33:15 +0200] Configured for up to 100 clients.
	>
	> I [26/Jun/2003:12:33:15 +0200] Allowing up to 10 client connections per
	> host.
	>
	> I [26/Jun/2003:12:33:15 +0200] LoadPPDs: Read "/etc/cups/ppds.dat", 13
	> PPDs...
	>
	> I [26/Jun/2003:12:33:15 +0200] LoadPPDs: No new or changed PPDs...
	>
	> E [26/Jun/2003:12:33:16 +0200] LoadAllJobs: Unable to queue job for
	> destination http://smarti:631/printers/printer!
	>
	>
	> ------------------------------------------------------
	> last lines of the cupsd.conf
	>
	>
	> # End of "$Id: cupsd.conf.in,v 1.8 2002/12/13 16:23:54 mike Exp $".
	>
	> #
	>
	> <Location /printers/lp0>
	>
	> Order Deny,Allow
	>
	> Allow From 127.0.0.1
	>
	> Deny From All
	>
	> AuthType None
	>
	> </Location>
	>
	> <Location /printers/HPDeskJet710C>
	>
	> Order Deny,Allow
	>
	> Deny From All
	>
	> Allow From 127.0.0.1
	>
	> AuthType None
	>
	> </Location>
	>
	> <Location /printers/Okipage8wLite>
	>
	> Order Deny,Allow
	>
	> Deny From All
	>
	> Allow From 127.0.0.1
	>
	> AuthType None
	>
	> </Location>
	>
	> <Location />
	>
	> Order Deny,Allow
	>
	> Deny From All
	>
	> Allow From 127.0.0.1
	>
	> </Location>
	>
	> Browsing On
	>
	> BrowseProtocols cups
	>
	> BrowseOrder Deny,Allow
	>
	> BrowseAllow from @LOCAL
	>
	> Listen 127.0.0.1:631
	>
	>
	>
	> ----------------------------------------
	>
	> the samba-log.w2ktest Samba file
	>
	>
	> [2003/06/26 13:13:28, 3] rpc_server/srv_pipe.c:api_pipe_request(1165)
	>
	>   Doing \PIPE\spoolss
	>
	> [2003/06/26 13:13:28, 3] rpc_server/srv_pipe.c:api_rpcTNP(1197)
	>
	>   api_rpcTNP: pipe 29598 rpc command: SPOOLSS_WRITEPRINTER
	>
	> [2003/06/26 13:13:28, 3] rpc_server/srv_pipe_hnd.c:free_pipe_context(444)
	>
	>   free_pipe_context: destroying talloc pool of size 4096
	>
	> [2003/06/26 13:13:28, 3] smbd/process.c:process_smb(846)
	>
	>   Transaction 2441 of length 4228
	>
	> [2003/06/26 13:13:28, 3] smbd/process.c:switch_message(685)
	>
	>   switch message SMBtrans (pid 3685)
	>
	> [2003/06/26 13:13:28, 3] smbd/ipc.c:reply_trans(520)
	>
	>   trans <\PIPE\> data=4148 params=0 setup=2
	>
	> [2003/06/26 13:13:28, 3] smbd/ipc.c:named_pipe(334)
	>
	>   named pipe command on <> name
	>
	> [2003/06/26 13:13:28, 3] smbd/ipc.c:api_fd_reply(296)
	>
	>   Got API command 0x26 on pipe "spoolss" (pnum 739e)free_pipe_context:
	> destroying talloc pool of size 0
	>
	> [2003/06/26 13:13:28, 3] rpc_server/srv_pipe.c:api_pipe_request(1165)
	>
	>   Doing \PIPE\spoolss
	>
	> [2003/06/26 13:13:28, 3] rpc_server/srv_pipe.c:api_rpcTNP(1197)
	>
	>   api_rpcTNP: pipe 29598 rpc command: SPOOLSS_WRITEPRINTER
	>
	> [2003/06/26 13:13:28, 3] rpc_server/srv_pipe_hnd.c:free_pipe_context(444)
	>
	>   free_pipe_context: destroying talloc pool of size 4096
	>
	>
	>
	> This messages keeps repeating over and over again.
	>
	>
	>
	>
	>
	>
	> --
	> To unsubscribe from this list go to the following URL and read the
	> instructions:  http://lists.samba.org/mailman/listinfo/samba
	>
	
	




More information about the samba mailing list