smbd not starting in ubuntu
Smbd service is not starting in samba. Tried reinstalling samba package which did not help. Dmesg logs these messages and exit 127 is an anonymous error which is of not much in troubleshooting issue.
[100422.925336] init: smbd main process (2352) terminated with status 127
[100422.925356] init: smbd main process ended, respawning
[100422.942974] init: smbd main process (2356) terminated with status 127
[100422.942994] init: smbd main process ended, respawning
[100422.960687] init: smbd main process (2360) terminated with status 127
[100422.960708] init: smbd main process ended, respawning
[100422.979847] init: smbd main process (2364) terminated with status 127
[100422.979868] init: smbd main process ended, respawning
[100422.999061] init: smbd main process (2368) terminated with status 127
[100422.999082] init: smbd respawning too fast, stopped
$service samba status
* nmbd is running
* smbd is not running
]$service smbd start
smbd start/pre-start, process 3845
$dmesg | tail
[100549.441032] init: smbd main process ended, respawning
[100549.452919] init: smbd main process (3871) terminated with status 127
[100549.452929] init: smbd main process ended, respawning
testparm result looks fine.
===============
$testparm
Load smb config files from /etc/samba/smb.conf
WARNING: The "syslog" option is deprecated
Processing section "[PraveenDiwakar]"
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
WARNING: You have some share names that are longer than 12 characters.
These may not be accessible to some older clients.
(Eg. Windows9x, WindowsMe, and smbclient prior to Samba 3.0.)
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
# Global parameters
[global]
server string = %h server (Samba, Ubuntu)
interfaces = 10.102.1.98/24 eth0
server role = standalone server
map to guest = Bad User
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\
unix password sync = Yes
syslog = 0
log file = /var/log/
max log size = 1000
dns proxy = No
usershare allow guests = Yes
panic action = /usr/share/
idmap config * : backend = tdb
[PraveenDiwakar]
path = /export/
valid users = praveendi
read only = No
guest ok = Yes
[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
printable = Yes
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/
============
Please suggest a solution to this issue.
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Ubuntu samba Edit question
- Assignee:
- No assignee Edit question
- Last query:
- 2016-04-28
- Last reply:
- 2016-05-14
What is the output of:
lsb_release -a; uname -a; apt-cache policy samba
Thanks
| vamsikrishna (vamsi-kopalle) said : | #2 |
Output is pasted below for your reference andrew :
$lsb_release -a; uname -a; apt-cache policy samba
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty
Linux obelix 3.13.0-85-generic #129-Ubuntu SMP Thu Mar 17 20:50:15 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
samba:
Installed: (none)
Candidate: 2:4.3.8+
Version table:
2:
500 http://
500 http://
2:
500 http://
Thanks
| Manfred Hampl (m-hampl) said : | #3 |
1. Error 127 usually indicates some kind of "command not found" problem.
2. You seem to be running some kind of foreign samba version, and not the Ubuntu-provided one. If that is the case, then we maybe cannot help.
What is the output of
cat /etc/init.d/smbd
cat /etc/init.d/samba
| vamsikrishna (vamsi-kopalle) said : | #4 |
I have installed samba through apt-get install samba. I did not use any source installation to do it.
root@localhost:
#!/bin/sh
### BEGIN INIT INFO
# Provides: samba
# Required-Start:
# Required-Stop:
# Default-Start:
# Default-Stop:
# Short-Description: ensure Samba daemons are started (nmbd and smbd)
### END INIT INFO
set -e
# start nmbd, smbd and samba-ad-dc unconditionally
# the init scripts themselves check if they are needed or not
case $1 in
start)
;;
stop)
;;
reload)
;;
;;
status)
if [ "$SERVER_ROLE" != "active directory domain controller" ]; then
fi
;;
*)
;;
esac
root@localhost:
root@localhost:
#!/bin/sh
### BEGIN INIT INFO
# Provides: smbd
# Required-Start: $network $local_fs $remote_fs
# Required-Stop: $network $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Should-Start: slapd cups
# Should-Stop: slapd cups
# Short-Description: start Samba SMB/CIFS daemon (smbd)
### END INIT INFO
PIDDIR=
SMBDPID=
# clear conflicting settings from the environment
unset TMPDIR
# See if the daemons are there
test -x /usr/sbin/smbd || exit 0
. /lib/lsb/
case $1 in
start)
if init_is_upstart; then
fi
if [ "$SERVER_ROLE" = "active directory domain controller" ]; then
fi
# Make sure we have our PIDDIR, even if it's on a tmpfs
if ! start-stop-daemon --start --quiet --oknodo --exec /usr/sbin/smbd -- -D; then
fi
;;
stop)
if init_is_upstart; then
fi
# Wait a little and remove stale PID file
if [ -f $SMBDPID ] && ! ps h `cat $SMBDPID` > /dev/null
fi
;;
reload)
;;
if init_is_upstart; then
fi
$0 stop
$0 start
;;
status)
;;
*)
;;
esac
exit 0
| Manfred Hampl (m-hampl) said : | #5 |
The system output
samba:
Installed: (none)
Candidate: 2:4.3.8+
contradicts what you are saying. The package management tells that the Ubuntu samba package (which would be installed with "apt-get install samba") is not present on your system.
What is the output of
sudo sh -x /etc/init.d/smbd start
| vamsikrishna (vamsi-kopalle) said : | #6 |
We have also tried source installation since the system installed software was throwing error. The current version is installed from apt-get :
[root@obelix ~]$apt-cache policy samba
samba:
Installed: 2:4.3.8+
Candidate: 2:4.3.8+
Version table:
*** 2:4.3.8+
500 http://
500 http://
100 /var/lib/
2:
500 http://
[root@obelix ~]$
[root@obelix ~]$sudo sh -x /etc/init.d/smbd startsudo sh -x /etc/init.d/smbd startsudo sh -x /etc/init.d/smbd start^C
[root@obelix ~]$sudo sh -x /etc/init.d/smbd start
+ PIDDIR=
+ SMBDPID=
+ unset TMPDIR
+ test -x /usr/sbin/smbd
+ . /lib/lsb/
+ run-parts --lsbsysinit --list /lib/lsb/
+ [ -r /lib/lsb/
+ . /lib/lsb/
+ [ -r /lib/lsb/
+ . /lib/lsb/
+ LOG_DAEMON_MSG=
+ FANCYTTY=
+ [ -e /etc/lsb-
+ true
+ init_is_upstart
+ [ -x /sbin/initctl ]
+ /sbin/initctl version
+ /bin/grep -q upstart
+ return 0
+ exit 1
[root@obelix ~]$service samba start
[root@obelix ~]$service samba status
* nmbd is running
* smbd is not running
| vamsikrishna (vamsi-kopalle) said : | #7 |
I have noticed this error :
[root@obelix ~]$
[root@obelix ~]$/usr/sbin/smbd -D
/usr/sbin/smbd: error while loading shared libraries: liblibcli_
It appears that there is an issue with shared library. Can you suggest on how to solve it.
What is the output of:
sudo updatedb; locate liblibcli
Thanks
| Manfred Hampl (m-hampl) said : | #9 |
liblibcli-
What is the output of
dpkg -l | grep samba
| vamsikrishna (vamsi-kopalle) said : | #10 |
[root@obelix ~]$dpkg -l | grep samba
ii gosa-plugin-samba 2.7.4+reloaded1-1 all samba3 plugin for GOsa²
ii libcrypt-
ii python-samba 2:4.3.8+
ii samba 2:4.3.8+
ii samba-common 2:4.3.8+
ii samba-common-bin 2:4.3.8+
ii samba-dbg 2:4.3.8+
ii samba-dev 2:4.3.8+
ii samba-doc 2:4.3.8+
ii samba-dsdb-modules 2:4.3.8+
ii samba-libs:amd64 2:4.3.8+
ii samba-testsuite 2:4.3.8+
ii samba-vfs-modules 2:4.3.8+
pc zentyal-samba 2.3.12+
And the output of my command please....
| vamsikrishna (vamsi-kopalle) said : | #12 |
[root@obelix ~]$lsb_release -a; uname -a; apt-cache policy samba
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty
Linux obelix 3.13.0-85-generic #129-Ubuntu SMP Thu Mar 17 20:50:15 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
samba:
Installed: 2:4.3.8+
Candidate: 2:4.3.8+
Version table:
*** 2:4.3.8+
500 http://
500 http://
100 /var/lib/
2:
500 http://
You have new mail in /var/mail/root
| Manfred Hampl (m-hampl) said : | #13 |
The output requested by actionparsnip was for the commands
sudo updatedb; locate liblibcli
sudo apt-get install samba-libs
Is it then OK?
| vamsikrishna (vamsi-kopalle) said : | #15 |
[root@obelix ~]$sudo updatedb; locate liblibcli
/lib/liblibcli-
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/local/
/usr/local/
/usr/local/
/usr/local/
$ apt-get install samba-libs
Reading package lists... Done
Building dependency tree
Reading state information... Done
samba-libs is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
| vamsikrishna (vamsi-kopalle) said : | #16 |
]$ldconfig -v | grep netlog
/sbin/ldconfig.
/sbin/ldconfig.
/sbin/ldconfig.
I have noticed some errors while running ldconfig with respect paths of libraries.
$echo $LD_LIBRARY_PATH
library path is blank. Please suggest a solution on how to resolve this issue.
| vamsikrishna (vamsi-kopalle) said : | #17 |
please update update on this thread.
| Manfred Hampl (m-hampl) said : | #18 |
Did you try reinstalling samba-libs?
What is the output of
sudo apt-get install --reinstall samba-libs
| vamsikrishna (vamsi-kopalle) said : | #19 |
[root@obelix ~]$apt-get install --reinstall samba-libs
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 1 not upgraded.
Need to get 0 B/5,144 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 123614 files and directories currently installed.)
Preparing to unpack .../samba-
Unpacking samba-libs:amd64 (2:4.3.
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up samba-libs:amd64 (2:4.3.
Processing triggers for libc-bin (2.19-0ubuntu6.7) ...
[root@obelix ~]$
[root@obelix ~]$
[root@obelix ~]$/usr/sbin/smbd -D /usr/sbin/smbd: error while loading shared libraries: liblibcli_
[root@obelix ~]$service smbd restart
stop: Unknown instance:
smbd start/running, process 5416
[root@obelix ~]$dmesg | tail
[335643.339836] init: smbd main process (5483) terminated with status 127
[335643.339847] init: smbd main process ended, respawning
[335643.354944] init: smbd main process (5492) terminated with status 127
[335643.354966] init: smbd main process ended, respawning
[335643.370714] init: smbd main process (5504) terminated with status 127
[335643.370735] init: smbd main process ended, respawning
[335643.388142] init: smbd main process (5514) terminated with status 127
[335643.388163] init: smbd main process ended, respawning
[335643.404510] init: smbd main process (5525) terminated with status 127
[335643.404530] init: smbd respawning too fast, stopped
==============
I have done reinstallation it did not work as expected. Please suggest what could have caused such issue.
| Manfred Hampl (m-hampl) said : | #20 |
You wrote
"I have noticed some errors while running ldconfig with respect paths of libraries."
Please provide details, especially the full error message, if possible.
And provide the output of
ldd /usr/sbin/smbd
grep samba /etc/ld.so.conf.d/*
| vamsikrishna (vamsi-kopalle) said : | #21 |
[root@obelix ~]$ldd /usr/sbin/smbd
/usr/sbin/smbd: /usr/lib/
/usr/sbin/smbd: /usr/lib/
/usr/sbin/smbd: /usr/lib/
/usr/sbin/smbd: /usr/lib/
/usr/sbin/smbd: /usr/lib/
/usr/sbin/smbd: /usr/lib/
/usr/sbin/smbd: /usr/lib/
/usr/sbin/smbd: /usr/lib/
/usr/sbin/smbd: /usr/lib/
/usr/sbin/smbd: /usr/lib/
/usr/sbin/smbd: /usr/lib/
/usr/sbin/smbd: /usr/lib/
libc.so.6 => /lib/x86_
libbsd.so.0 => /lib/x86_
librt.so.1 => /lib/x86_
libndr.so.0 => /usr/lib/
libads.so.0 => /usr/lib/
libgse.so.0 => /usr/lib/
libtdb.so.1 => /usr/lib/
libacl.so.1 => /lib/x86_
libnsl.so.1 => /lib/x86_
libz.so.1 => /lib/x86_
libldb.so.1 => /usr/lib/
libpam.so.0 => /lib/x86_
libcap.so.2 => /lib/x86_
libpdb.so.0 => not found
libdl.so.2 => /lib/x86_
libm.so.6 => /lib/x86_
libffi.so.6 => /usr/lib/
You have new mail in /var/mail/root
[root@obelix ~]$grep samba /etc/ld.so.conf.d/*
[root@obelix ~]$
| Manfred Hampl (m-hampl) said : | #22 |
I think I see the root cause:
Apparently you have installed different and conflicting versions of samba from different sources.
The Ubuntu packages do not install anything in /usr/local/lib, but you have some samba files there.
You have
libnetapi.so.0 => /usr/local/
but I assume it should be
=> /usr/lib/
What is the output of the commands
sudo updatedb
locate libnetapi
ls -l /usr/local/lib/
Have you installed some samba version from a foreign source (probably version 4.1.6)?
I suggest that you deinstall all samba versions (especially those from non-Ubuntu sources), and reinstall the original Ubuntu-provided packages.
| Launchpad Janitor (janitor) said : | #23 |
This question was expired because it remained in the 'Needs information' state without activity for the last 15 days.
| rick (rick-ruttentuttels) said : | #24 |
Hi,
I saw your problems with SAMBA on the internet. Did you manage to solve it?
I had the same issue and today I was able to start SAMBA again.
Let me know if you still need support,
Rick.

