# Samba problem: Unable to open printcap file /etc/printcap

## themaster.dk

Hey  :Smile: 

I have a problem with samba.

Then i run /etc/init.d/samba start i get these errors:

log.smbd ->

[2006/01/08 21:16:06, 0] smbd/server.c:main(798)

  smbd version 3.0.14a started.

  Copyright Andrew Tridgell and the Samba Team 1992-2004

[2006/01/08 21:16:06, 0] param/params.c:OpenConfFile(537)

  params.c:OpenConfFile() - Unable to open configuration file "/etc/samba/smb.conf":

        No such file or directory

[2006/01/08 21:16:06, 0] printing/print_cups.c:cups_cache_reload(85)

  Unable to connect to CUPS server localhost - Connection refused

[2006/01/08 21:16:06, 0] printing/print_cups.c:cups_cache_reload(85)

  Unable to connect to CUPS server localhost - Connection refused

[2006/01/08 21:50:35, 0] smbd/server.c:main(798)

  smbd version 3.0.14a started.

  Copyright Andrew Tridgell and the Samba Team 1992-2004

[2006/01/08 21:50:35, 0] printing/pcap.c:pcap_cache_reload(149)

  Unable to open printcap file /etc/printcap for read!

[2006/01/08 21:50:35, 0] printing/pcap.c:pcap_cache_reload(149)

  Unable to open printcap file /etc/printcap for read!

[2006/01/08 21:50:35, 1] auth/auth_util.c:make_server_info_sam(840)

  User samba in passdb, but getpwnam() fails!

[2006/01/08 21:58:58, 0] smbd/server.c:main(798)

  smbd version 3.0.14a started.

  Copyright Andrew Tridgell and the Samba Team 1992-2004

[2006/01/08 21:58:58, 0] printing/pcap.c:pcap_cache_reload(149)

  Unable to open printcap file /etc/printcap for read!

[2006/01/08 21:58:58, 0] printing/pcap.c:pcap_cache_reload(149)

  Unable to open printcap file /etc/printcap for read!

[2006/01/08 21:58:58, 1] auth/auth_util.c:make_server_info_sam(840)

  User samba in passdb, but getpwnam() fails!

log.nmbd ->

[2006/01/08 21:16:06, 0] nmbd/nmbd.c:main(668)

  Netbios nameserver version 3.0.14a started.

  Copyright Andrew Tridgell and the Samba Team 1994-2004

[2006/01/08 21:16:06, 0] param/params.c:OpenConfFile(537)

  params.c:OpenConfFile() - Unable to open configuration file "/etc/samba/smb.conf":

        No such file or directory

[2006/01/08 21:50:35, 0] nmbd/nmbd.c:main(668)

  Netbios nameserver version 3.0.14a started.

  Copyright Andrew Tridgell and the Samba Team 1994-2004

[2006/01/08 21:50:35, 0] nmbd/nmbd.c:terminate(56)

  Got SIGTERM: going down...

[2006/01/08 21:58:58, 0] nmbd/nmbd.c:main(668)

  Netbios nameserver version 3.0.14a started.

  Copyright Andrew Tridgell and the Samba Team 1994-2004

[2006/01/08 21:58:58, 0] nmbd/nmbd.c:terminate(56)

  Got SIGTERM: going down...

Here is my smb.conf:

[global]

workgroup = MYWORKGROUPNAME

server string = Samba Server %v

log file = /var/log/samba/log.%m

max log size = 50

socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

interfaces = lo eth0

bind interfaces only = yes

hosts allow = 127.0.0.1 192.168.0/255

hosts deny = 0.0.0.0/0

security = share

guest account = samba

guest ok = yes

[public]

comment = Public Files

browseable = yes

writeable = yes

public = yes

create mode = 0766

guest ok = yes

path = /edonkey2000/incoming/

I'm runnig on a 2.6.14-gentoo-r5-kernel an have gcc version 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8 ).

Samba version is 3.0.14a.

Any ideas anyone? (I really need some help with this one... :/ )

----------

## b-_-d

Use this is a base it works

[global]

netbios name = Tux

security = user

guest account = nobody

map to guest = bad user

encrypt passwords = yes

workgroup = Linuxmall

server string = Gentoo on %h Samba %v

local master = yes

preferred master = yes

os level = 33

message command = sh -c '/usr/bin/receivepopup.sh "%s" "%f"'

socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192

printing = cups

printcap name = cups

printcap cache time = 750

cups options = raw

[apache]

comment = Apache2 web server

path = /var/www/localhost/htdocs

public = no

writable = yes

read only = no

guest ok = no

valid users = @apache

[books]

comment = Bookkeeper's Stuff

path = /home/bookkeeper

public = no

writable = yes

read only = no

guest ok = no

valid users = @bookkeeper

[movies]

comment = Movies

path = /home/movies

public = yes

writable = no

read only = yes

guest ok = yes

guest only = yes

[public]

comment = Public Stuff

path = /home/smb.public.guest

public = yes

writable = yes

create mask = 0644

read only = yes

guest ok = yes

guest only = yes

[saved]

comment = Old HD

path = /mnt/olddrive/

public = yes

writable = yes

create mask = 0644

read only = yes

guest ok = yes

guest only = yes

[enyawix]

comment = Enyawix's Stuff

path = /home/enyawix

public = no

writable = yes

read only = no

guest ok = no

valid users = enyawix

[jmck]

comment = Jmck's Stuff

path = /home/jmck

public = no

writable = yes

read only = no

guest ok = no

valid users = jmck

[pdf]

comment = PDF creator

path = /var/tmp

printable = Yes

print command = /usr/bin/smbprngenpdf -J '%J' -c %c -s %s -u '%u' -z %z

create mask = 0600

[printers]

comment = All Printers

path = /var/tmp

printable = Yes

create mask = 0600

browseable = No

----------

## lAmY

Hi,

i have the same version of samba running and i get the same complain

about /etc/printcap missing. I touched /etc/printcap but this doesn't work. 

I don't use any printer. The samba version before worked well. 

Testparm says everything ok.

Here is a part of my smb.conf

[global]

        load printers = no

        netbios name = newton       

        socket options = TCP_NODELAY

        workgroup = bwhome

        os level = 10

        interfaces = eth1/192.168.2.0/24

        domain master = yes

        username map = /etc/samba/user.map

        encrypt passwords = yes

        security = user

        bind interfaces only = yes

        wins support = yes

        local master = yes

        preferred master = yes

----------

