[Samba] re. 3.4.9 printing addprinter command reparse doesn't see new printer

Gary Dale garydale at rogers.com
Mon Oct 4 22:09:50 MDT 2010

OK. Perhaps you can be more specific about what you are trying to 
accomplish. I don't recall adding printers to a server as being 
something that happens frequently. yet I get the impression that your 
concern is that you have to wait before the added printer becomes 
available. That doesn't seem like much of a problem.

How long do you have to wait?

Basically, all the smbaddprinter.pl script does is call lpadmin. At 
least on my system, that seems to be a CUPS specific version. I think 
that's probably usual for any system running CUPS. Perhaps you should be 
asking the maintainer(s) for lpadmin?

On 04/10/10 06:30 PM, Jack Downes wrote:
> ?  I didn't hijack a thread...  this is a mailing list.  All I did was 
> hit reply list to a random email, cleaned out the messages & subject 
> and started a new thread.  How is that wrong..?
> I did try your suggestion, and it doesn't do anything but interrupt 
> the operation... and I get an "Operation could not be completed 
> error."  Which makes sense...
> On 10/ 4/10 04:21 PM, Gary Dale wrote:
>> Please don't hijack threads.
>> You could try something like /etc/init.d/samba restart (or your local 
>> equivalent) to the end of perl script.
>> ------------------------------------------
>> hello
>> I have cups printing with cups 1.4.4.   I'm using the included 
>> smbaddprinter.pl command to add printers to my server.
>> Now, my error is that when I add the printer, I get ACCESS DENIED in 
>> the windows client, but if  I check cups, there the printer is.  And 
>> if I wait a bit with the windows client or reload samba, there the 
>> printer is within the share as well.
>> Now, from the man page on smb.conf
>> "Once the /|addprinter command|/ has been executed, |smbd| will 
>> reparse the | smb.conf| to determine if the share defined by the APW 
>> exists. If the sharename is still invalid, then |smbd | will return 
>> an ACCESS_DENIED error to the client."
>> So... is there a way for me to ask Samba to wait a few seconds before 
>> reparsing the smb.conf to check for the new printer?  I tried adding 
>> a sleep() to the perl script, but that seems to make the issue worse, 
>> so that's not the choice it seems.
>> thanks!

More information about the samba mailing list