Hello all, I have a question that I hope somebody out there can help with. Samba doesn't seem to see new printers added to the printcap until it is restarted. Am I doing something wrong or is there a way to set samba up to check the printcap periodically, or to force it to without restarting the service? I have 500 clients that will attach to this print server and would like to not have to interrupt there activities if I don't have to to add a new printer... Any ideas would be helpful, Wade Winright "Build a better mantrap, and the rats will beat a path to your door..." -Neil Fallon -------------- next part -------------- HTML attachment scrubbed and removed
Wade Winright wrote:> Hello all, > > I have a question that I hope somebody out there can help with. Samba > doesn't seem to see new printers added to the printcap until it is > restarted. Am I doing something wrong or is there a way to set samba > up to check the printcap periodically, or to force it to without > restarting the service? I have 500 clients that will attach to this > print server and would like to not have to interrupt there activities > if I don't have to to add a new printer... > > Any ideas would be helpful, >I believe the printcap file is only read when the smb connection starts. There is a Unix signal you can send to all smbd processes to tell them to re-read their initialization files (including the /etc/printcap). I've found the easiest way to do it is use SWAT and push the button "Commit changes" even if there are no changes. This will properly send the signal to all smbd processes to access new printcap printers or see newly added shares. Ken Cobler
Thanks for all of the suggestions, but nothing seemed to work. I've tried the killall -HUP command and it doesn't read the printcap apparently. I've tried hitting the Commit Changes to no avail. I've tried skill, no dice. I've tried logging off the windows client and logging back in, nada. On the linux side, the printer appears immediately using lpstat, and for printing. In SWAT if I go to the printers area, the printer is there. When I try to view the printers from a client, no printer. Does anyone have any more ideas? I am running CUPS if that makes a difference(don't think it would...). Thanks again, Wade -----Original Message----- From: Rashkae [mailto:rashkae@wealthmap.ca] Sent: Friday, January 11, 2002 10:36 AM To: Ken Cobler Cc: Wade Winright; samba@lists.samba.org Subject: Re: Printcap On most Linux systems and probably many others, (your mileage may vary) killall -HUP nmbd killall -HUP smbd On Fri, 11 Jan 2002, Ken Cobler wrote: Wade Winright wrote:> Hello all, > > I have a question that I hope somebody out there can help with. Samba > doesn't seem to see new printers added to the printcap until it is > restarted. Am I doing something wrong or is there a way to set samba > up to check the printcap periodically, or to force it to without > restarting the service? I have 500 clients that will attach to this > print server and would like to not have to interrupt there activities > if I don't have to to add a new printer... > > Any ideas would be helpful, >I believe the printcap file is only read when the smb connection starts. There is a Unix signal you can send to all smbd processes to tell them to re-read their initialization files (including the /etc/printcap). I've found the easiest way to do it is use SWAT and push the button "Commit changes" even if there are no changes. This will properly send the signal to all smbd processes to access new printcap printers or see newly added shares. Ken Cobler
Thanks for the input. I only have on smb.conf on the system. Double-checked just to be sure. Smbclient command showed the same thing as Win2k clients. I know I can restart the smb service to make it see printcap (lpstat) but it will kill all other print jobs in the process. So, I need to find a way to get samba to reread the printcap without restarting. I hope there is a way to do this.... -----Original Message----- From: Ken Cobler [mailto:kcobler@coblercorp.com] Sent: Friday, January 11, 2002 12:27 PM To: Wade Winright Subject: Re: Printcap Wade Winright wrote:> Thanks for all of the suggestions, but nothing seemed to work. I've tried > the killall -HUP command and it doesn't read the printcap apparently. I've > tried hitting the Commit Changes to no avail. I've tried skill, no dice. > I've tried logging off the windows client and logging back in, nada. Onthe> linux side, the printer appears immediately using lpstat, and forprinting.> In SWAT if I go to the printers area, the printer is there. When I try to > view the printers from a client, no printer. > Does anyone have any more ideas? I am running CUPS if that makes a > difference(don't think it would...). > Thanks again, > Wade >I don't know about CUPS, but, I do know that printers available from /etc/printcap are reported by Samba. The only thing you might want to check is your Samba version and your SWAT version. Are they both pointing to or reading from the same smb.conf file ? Sometimes people use one version that reads from /etc/samba/smb.conf and another they built that points to /usr/local/samba/lib/smb.conf After you make a change to /etc/printcap, you are restarting your lp daemon process ? You mention lpstat, which is a SysV lp daemon. I'm used to Linux where you restart lpd after making changes to /etc/printcap. Once you restart lp daemon and then SWAT commit changes, you should be able from the console type: "smbclient -L //Server -U root", type in the root password and see the new printer you added in the list (without having to go to Windows workstation to see if it worked). Just a couple of thoughts. Ken Cobler