Operating System - HP-UX
1848365 Members
7368 Online
104024 Solutions
New Discussion

Samba startup takes very long time (due to printers)

 
Ladislav Kostal
Advisor

Samba startup takes very long time (due to printers)

Hello all,

We have about 7000 printers defined. Samba 3.x is cacheing them on start, which takes very long time. We don't use them in Samba.

Is it possible to disable this loading at startup?

Many thanks in advance,

Ladislav
3 REPLIES 3
Geoff Wild
Honored Contributor

Re: Samba startup takes very long time (due to printers)

Are you using winbind?

Make sure you have set:

winbind enum users = No
winbind enum groups = No

For printers - only thing I can think of is:

load printers = No

All in Global...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Ladislav Kostal
Advisor

Re: Samba startup takes very long time (due to printers)

So finally I found solution after reviewing of Samba source codes.

Adding following line to smb.conf helps:

printcap name = /bin/false

Because this command is used for checking printers (default set to "lpstat").

Regards,

Ladislav
Geoff Wild
Honored Contributor

Re: Samba startup takes very long time (due to printers)

Yes - I see that too - in the online docs (http://yourserevr:901)

printcap name (S)
This parameter may be used to override the compiled-in default printcap name used by the server (usually /etc/printcap). See the discussion of the [printers] section above for reasons why you might want to do this.

To use the CUPS printing interface set printcap name = cups . This should be supplemented by an addtional setting printing = cups in the [global] section. printcap name = cups will use the "dummy" printcap created by CUPS, as specified in your CUPS configuration file.

On System V systems that use lpstat to list available printers you can use printcap name = lpstat to automatically obtain lists of available printers. This is the default for systems that define SYSV at configure time in Samba (this includes most System V based systems). If printcap name is set to lpstat on these systems then Samba will launch lpstat -v and attempt to parse the output to obtain a printer list.

A minimal printcap file would look something like this:

print1|My Printer 1
print2|My Printer 2
print3|My Printer 3
print4|My Printer 4
print5|My Printer 5

where the '|' separates aliases of a printer. The fact that the second alias has a space in it gives a hint to Samba that it's a comment.

Note
Under AIX the default printcap name is /etc/qconfig. Samba will assume the file is in AIX qconfig format if the string qconfig appears in the printcap filename.

Default: printcap name = lpstat

Example: printcap name = lpstat


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.