# Samba stuck on starting

## marco.difresco

Hi,

I am re-installing (or installing for the first time since it is a new computer) Gentoo and I am experiencing a problem with Samba that I haven't experienced in the past.

When I start Samba, it stucks in starting without finishing:

```
# /etc/init.d/samba start

 * samba -> start: smbd ...
```

If I check the status from another terminal:

```
# /etc/init.d/samba status

 * status: starting
```

The log doesn't report any particular error (I trimmed the log to the last entry because the previous are the same from previous attempts):

```
cat /var/log/samba/log.smbd 

....

[2014/09/06 11:56:59,  0] smbd/server.c:1072(main)

  smbd version 3.6.23 started.

  Copyright Andrew Tridgell and the Samba Team 1992-2011
```

The following is the smb.conf that I am using (I carried over from the previous installation and it worked there):

```
[global]

workgroup = RETTORGOLE

netbios name = PC-MARCO

# Of course this has no REAL purpose other than letting

# everyone knows it's not Windows!

# %v prints the version of Samba we are using.

#server string = Samba Server %v

# We are going to use cups, so we are going to put it in here ;-)

printcap name = cups

printing = cups

load printers = yes

# We want a log file and we do not want it to get bigger than 50kb.

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

max log size = 50

# We are going to set some options for our interfaces...

socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

# This is a good idea, what we are doing is binding the

# samba server to our local network.

# For example, if eth0 is our local network device

interfaces = lo enp5s0

bind interfaces only = yes

# Now we are going to specify who we allow, we are afterall

# very security conscience, since this configuration does

# not use passwords!

hosts allow = 127.0.0.1 192.168.0.0/24

hosts deny = 0.0.0.0/0

# Other options for this are USER, DOMAIN, ADS, and SERVER

# The default is user

security = user

client lanman auth = yes

client ntlmv2 auth = no

# No passwords, so we're going to use a guest account!

guest ok = yes

# Now we setup our print drivers information!

[print$]

comment = Printer Drivers

path = /etc/samba/printer # this path holds the driver structure

guest ok = yes

browseable = yes

read only = yes

# Modify this to "username,root" if you don't want root to

# be the only printer admin)

write list = marco,root

# Now we'll setup a printer to share, while the name is arbitrary

# it should be consistent throughout Samba and CUPS!

#[HPDeskJet930C]

#comment = HP DeskJet 930C Network Printer

#printable = yes

#path = /var/spool/samba

#public = yes

#guest ok = yes

# Modify this to "username,root" if you don't want root to

# be the only printer admin)

#printer admin = marco,root

# Now we setup our printers share. This should be

# browseable, printable, public.

[printers]

comment = All Printers

browseable = no

printable = yes

writable = no

public = yes

guest ok = yes

path = /var/spool/samba

# Modify this to "username,root" if you don't want root to

# be the only printer admin)

printer admin = marco,root

# We create a new share that we can read/write to from anywhere

# This is kind of like a public temp share, anyone can do what

# they want here.

[Cartella condivisa]

#comment = Public Files

browseable = yes

public = yes

create mode = 0766

guest ok = yes

path = /archive/shared
```

Here it is the output of "emerge --info net-fs/samba"

```
Portage 2.2.8-r1 (default/linux/amd64/13.0/desktop/kde, gcc-4.7.3, glibc-2.19-r1, 3.14.14-gentoo x86_64)

=================================================================

                        System Settings

=================================================================

System uname: Linux-3.14.14-gentoo-x86_64-Intel-R-_Core-TM-_i7-4790K_CPU_@_4.00GHz-with-gentoo-2.2

KiB Mem:     8124500 total,     66096 free

KiB Swap:   16777212 total,  15713248 free

Timestamp of tree: Fri, 05 Sep 2014 22:45:01 +0000

ld GNU ld (Gentoo 2.23.2 p1.0) 2.23.2

app-shells/bash:          4.2_p45

dev-java/java-config:     2.2.0

dev-lang/python:          2.7.7, 3.3.5-r1

dev-util/cmake:           2.8.12.2-r1

dev-util/pkgconfig:       0.28-r1

sys-apps/baselayout:      2.2

sys-apps/openrc:          0.12.4

sys-apps/sandbox:         2.6-r1

sys-devel/autoconf:       2.13, 2.69

sys-devel/automake:       1.11.6, 1.12.6, 1.13.4

sys-devel/binutils:       2.23.2

sys-devel/gcc:            4.7.3-r1

sys-devel/gcc-config:     1.7.3

sys-devel/libtool:        2.4.2-r1

sys-devel/make:           3.82-r4

sys-kernel/linux-headers: 3.13 (virtual/os-headers)

sys-libs/glibc:           2.19-r1

Repositories: gentoo kde x-portage

ACCEPT_KEYWORDS="amd64"

ACCEPT_LICENSE="* -@EULA"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=native -O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /usr/share/themes/oxygen-gtk/gtk-3.0"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/rc_keymaps/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-march=native -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FCFLAGS="-O2 -pipe"

FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"

FFLAGS="-O2 -pipe"

GENTOO_MIRRORS="http://gd.tuwien.ac.at/opsys/linux/gentoo/ ftp://gd.tuwien.ac.at/opsys/linux/gentoo/ http://mirrors.linuxant.fr/distfiles.gentoo.org/ ftp://mirrors.linuxant.fr/distfiles.gentoo.org/"

LANG="en_US.utf8"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

MAKEOPTS="-j9"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/var/lib/layman/kde /usr/local/portage"

SYNC="rsync://rsync.at.gentoo.org/gentoo-portage"

USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam firefox flac fortran g15 gdbm gif gpm gtk iconv ipv6 jpeg kde kipi lcd lcms ldap libnotify mad mmx mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qt3support qt4 readline sdl semantic-desktop session spell sse sse2 ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xcb xcomposite xinerama xml xscreensaver xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="g15" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================

                        Package Settings

=================================================================

net-fs/samba-3.6.23-r1 was built with the following:

USE="acl aio client cups fam ldap netapi pam readline server smbclient winbind -addns -ads -avahi -caps -cluster -debug -dmapi -doc -examples -ldb -quota (-selinux) -smbsharemodes -swat -syslog" ABI_X86="64 -32 -x32"
```

Any idea on what is causing the issue?

Thanks in advance.

----------

## marco.difresco

Ok, I solved the problem, but in a strange way: I simply had to recompile it with a mere "emerge --ask net-fs/samba". I have no idea why.  :Shocked: 

Maybe it was due to some library conflict not caught by "emerge @preserved-rebuild", but it is a wild guess.

----------

