I have configured Samba on both a RH Linux 7.2 box and Solaris 8 box and am not able to remove print jobs. The lprm command is not getting called. I know that for a fact because I changed lprm command to equal a script which will log when it is called. And that script is never called. There are no errors in any log files - system or samba. The printing parts of the smb.conf file are: [global] printcap nbame = /etc/printcap load printers = yes [printers] comment = All Printers path = /var/spool/samba/public browseable = no printable = yes public = yes writable = no create mode = 0700 [lp99] comment = test printer create mask = yes writable = yes public = yes guest ok = yes hosts allow = 172.16. printable = yes printing = lprng print command = /usr/bin/lpr -r -P%p %s lprm command = /tmp/lprm %p %j # This script logs if it is called. It never is. David Neilson Western Family Foods, Inc. System Administrator 503 639 6300 x370
Well, I can detect a note of desperation creeping in. Now, this is where the real learning begins. Some ideas: You are using lprng, not cups, right? Just for fun, try: strings `which smbd` | grep command | less and see what commands smbd recognizes. You might try other commands, like lppause and queuepause and see if they are being ignored. Since this may be all permissions, try this: lprm command = echo "you tried to remove me" %s > /tmp/junk We assume permission on /tmp are proper? Mine are: drwxrwxrwt Joel On Wed, Dec 11, 2002 at 05:54:53PM -0800, David Neilson wrote:> I have configured Samba on both a RH Linux 7.2 box and Solaris 8 box and am > not able to remove print jobs. The lprm command is not getting called. I > know that for a fact because I changed lprm command to equal a script which > will log when it is called. And that script is never called. There are no > errors in any log files - system or samba. > > The printing parts of the smb.conf file are: > > [global] > printcap nbame = /etc/printcap > load printers = yes > > [printers] > comment = All Printers > path = /var/spool/samba/public > browseable = no > printable = yes > public = yes > writable = no > create mode = 0700 > > [lp99] > comment = test printer > create mask = yes > writable = yes > public = yes > guest ok = yes > hosts allow = 172.16. > printable = yes > printing = lprng > print command = /usr/bin/lpr -r -P%p %s > lprm command = /tmp/lprm %p %j # This script logs if it is called. It > never is. > > David Neilson > Western Family Foods, Inc. > System Administrator > 503 639 6300 x370 > > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailman/listinfo/samba
Joel: In response to your questions: 1) I am using lprng, not cups. 2. Here is the strings output of smtp: ### START SMBD STRINGS OUTPUT ### Incorrect program usage - are you sure the command line is correct? disk_free: Running command %s disk_free: sys_popen() failed for command %s. Error was : %s Unsupported API fd command Got API command 0x%x on pipe "%s" (pnum %x) named pipe command on <%s> name named pipe command from Win95 (wow!) Unsupported API command Supplied buffer too small in API command Got API command %d of form <%s> <%s> (tdscnt=%d,tpscnt=%d,mdrcnt=%d,mprcnt=%d) no messaging command specified unknown command type (%s): type=%d (0x%X) smb_create_user: Running the command `%s' gave %d smb_delete_user: Running the command `%s' gave %d Invoking magic command %s gave %d dfree command message command delete share command change share command add share command deleteprinter command addprinter command enumports command queueresume command queuepause command lpresume command lppause command lprm command lpq command print command Expected %s response, got command 0x%02x Expected SMBnttrans response, got command 0x%02x A File Search command can find no more files matching the specified criteria. The server did not recognize the command received. The tree ID (TID) specified in a command was invalid. Unknown command. _srv_net_share_set_info: change share command = %s _srv_net_share_add: No add share command api_rpcTNP: rpc command: %s print_run_command Invalid snum %d for command %s Running the command `%s' gave %d process_local_message: unknown UDP message command code (%x) - ignoring. ### END SMBD STRINGS OUTPUT ### 3. The commands which are called from the smb.conf file include: lpr command, lpq command, and queuepause and queueresume commands. The commands which are NOT called from the smb.conf file include: lprm command, lppause command, and lpresume command. I tested this as you suggested (setting the command to something like: echo "processed %s" > /tmp/file.out. The /tmp/file.out file was never created. 4. The /tmp permissions are 1777: drwxrwxrwt. As I mentioned in an earlier email, I can now delete the files, but it hangs the application. Also, when I try to pause a specific print job, it doesn't work. -----Original Message----- From: Joel Hammer [mailto:Joel@HammersHome.com] Sent: Wednesday, December 11, 2002 6:37 PM To: David Neilson; samba@lists.samba.org Subject: Re: [Samba] lprm command not getting called. Well, I can detect a note of desperation creeping in. Now, this is where the real learning begins. Some ideas: You are using lprng, not cups, right? Just for fun, try: strings `which smbd` | grep command | less and see what commands smbd recognizes. You might try other commands, like lppause and queuepause and see if they are being ignored. Since this may be all permissions, try this: lprm command = echo "you tried to remove me" %s > /tmp/junk We assume permission on /tmp are proper? Mine are: drwxrwxrwt Joel On Wed, Dec 11, 2002 at 05:54:53PM -0800, David Neilson wrote:> I have configured Samba on both a RH Linux 7.2 box and Solaris 8 box andam> not able to remove print jobs. The lprm command is not getting called. I > know that for a fact because I changed lprm command to equal a scriptwhich> will log when it is called. And that script is never called. There areno> errors in any log files - system or samba. > > The printing parts of the smb.conf file are: > > [global] > printcap nbame = /etc/printcap > load printers = yes > > [printers] > comment = All Printers > path = /var/spool/samba/public > browseable = no > printable = yes > public = yes > writable = no > create mode = 0700 > > [lp99] > comment = test printer > create mask = yes > writable = yes > public = yes > guest ok = yes > hosts allow = 172.16. > printable = yes > printing = lprng > print command = /usr/bin/lpr -r -P%p %s > lprm command = /tmp/lprm %p %j # This script logs if it is called. It > never is. > > David Neilson > Western Family Foods, Inc. > System Administrator > 503 639 6300 x370 > > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailman/listinfo/samba
Joel: I will forego answering your questions since I finally got it working so that I can now delete files without hanging the application. I did the following three things, and I am not sure what combination made it work. I think it was probably the first two. 1) Made the printer path equal to a Samba file share. (This doesn't make sense because the original printer path was 777, and the parent directories were read/execute, thus allowing anybody to "cd" through them.) 2) Deleted and re-added the printer in question (I have made lots of changes to the smb.conf file over the past week, and thought maybe there were some "inconsistencies" between the samba server and the printer configuration on the W2K client.) 2) Modified the Samba printer from the W2K client (i.e., changed the orientation to Landscape, clicked apply, then changed it back again). I read in a document titled "Samba Project Documentation", dated Apr 1, 2002, that "for a printer to be truly usable by a W2K client, a valid Device Mode needed to be generated for the printer". And that paper suggested the action mentioned at the beginning of this paragraph. I know there are some security issues to work out here. Thanks for your help. -----Original Message----- From: Joel Hammer [mailto:Joel@HammersHome.com] Sent: Thursday, December 12, 2002 7:10 PM To: David Neilson; samba@lists.samba.org Subject: Re: [Samba] lprm command not getting called. Well, there a lot of error messages saying it can't run command %s. What is command %s ? BTW, what is smtp? Isn't that a mail program? Have you run testparm ? Joel On Thu, Dec 12, 2002 at 04:13:27PM -0800, David Neilson wrote:> Joel: > > In response to your questions: > > 1) I am using lprng, not cups. > > 2. Here is the strings output of smtp: > ### START SMBD STRINGS OUTPUT ### > Incorrect program usage - are you sure the command line is correct? > disk_free: Running command %s > disk_free: sys_popen() failed for command %s. Error was : %s > Unsupported API fd command