Samba doesn't start and cannot be re-installed

Questions about applications and software
Forum rules
Before you post please read how to get help

LMDE 2 support ends on 1-1-2019
Post Reply
webtarget
Level 3
Level 3
Posts: 165
Joined: Sat Mar 24, 2012 10:20 am

Samba doesn't start and cannot be re-installed

Post by webtarget » Fri Jul 08, 2016 9:48 am

When I try to start samba, (sudo service samba start), I get this message:
[FAIL] Starting NetBIOS name server: nmbd failed!
When I try to re-install samba via Synaptic, I get this message:
E: Internal Error, No file name for samba:amd64
samba nmbd log:
[2016/07/08 09:41:10, 0] ../source3/nmbd/nmbd.c:912(main)
error opening config file '/etc/samba/smb.conf'
But, the file exists (smb.conf). I have no problem reading it. Does it mean there is an error in the file with the parameters or a some typo in there or for some reason the file cannot be accessed?


Any help on how to get samba working again would be appreciated.

Thanks.

User avatar
Flemur
Level 16
Level 16
Posts: 6287
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Samba doesn't start and cannot be re-installed

Post by Flemur » Fri Jul 08, 2016 11:00 am

E: Internal Error, No file name for samba:amd64
For that error, try this:

Code: Select all

sudo dpkg --configure -a
Then try

Code: Select all

dpkg-reconfigure samba
or reinstall it.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less

webtarget
Level 3
Level 3
Posts: 165
Joined: Sat Mar 24, 2012 10:20 am

Re: Samba doesn't start and cannot be re-installed [solved]

Post by webtarget » Sat Jul 09, 2016 10:03 am

Code: Select all

sudo dpkg --configure -a
Result:
Setting up samba (2:4.2.10+dfsg-0+deb8u3) ...
[FAIL] Starting SMB/CIFS daemon: smbd failed!
invoke-rc.d: initscript smbd, action "start" failed.
dpkg: error processing package samba (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
samba

Code: Select all

sudo dpkg-reconfigure samba
Result:
/usr/sbin/dpkg-reconfigure: samba is broken or not fully installed
So then I purged it:

Code: Select all

sudo apt-get purge samba
Result:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libclamav6 libqtkeychain0
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
gadmin-samba* mint-meta-debian-mate* samba*
0 upgraded, 0 newly installed, 3 to remove and 10 not upgraded.
1 not fully installed or removed.
After this operation, 12.0 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 221626 files and directories currently installed.)
Removing mint-meta-debian-mate (2015.06.29) ...
Removing gadmin-samba (0.2.9-3) ...
Purging configuration files for gadmin-samba (0.2.9-3) ...
dpkg: warning: while removing gadmin-samba, directory '/etc/gadmin-samba' not empty so not removed
Removing samba (2:4.2.10+dfsg-0+deb8u3) ...
[ ok ] Stopping Samba AD DC daemon: samba.
[ ok ] Stopping NetBIOS name server: nmbd.
[ ok ] Stopping SMB/CIFS daemon: smbd.
Purging configuration files for samba (2:4.2.10+dfsg-0+deb8u3) ...
Processing triggers for desktop-file-utils (0.22-1) ...
Processing triggers for mime-support (3.58) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for menu (2.1.47) ...
Processing triggers for libc-bin (2.19-18+deb8u4) ...
Then I re-installed and still got an error:

Code: Select all

sudo apt-get install samba
Result:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libclamav6 libqtkeychain0
Use 'apt-get autoremove' to remove them.
Suggested packages:
bind9 bind9utils ctdb ldb-tools ntp smbldap-tools winbind
Recommended packages:
attr samba-vfs-modules
The following NEW packages will be installed:
samba
0 upgraded, 1 newly installed, 0 to remove and 10 not upgraded.
Need to get 0 B/1,024 kB of archives.
After this operation, 11.5 MB of additional disk space will be used.
Selecting previously unselected package samba.
(Reading database ... 221420 files and directories currently installed.)
Preparing to unpack .../samba_2%3a4.2.10+dfsg-0+deb8u3_amd64.deb ...
Unpacking samba (2:4.2.10+dfsg-0+deb8u3) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up samba (2:4.2.10+dfsg-0+deb8u3) ...
[FAIL] Starting SMB/CIFS daemon: smbd failed!
invoke-rc.d: initscript smbd, action "start" failed.
dpkg: error processing package samba (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
samba
E: Sub-process /usr/bin/dpkg returned an error code (1)
Then I searched around regarding the "invoke-rc.d: initscript smbd, action "start" failed." and found something on serverfault. I followed the last post which was:

Code: Select all

apt-get remove --purge samba samba-common
apt-get install samba
Result for apt-get install samba:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
samba-common samba-common-bin
Suggested packages:
bind9 bind9utils ctdb ldb-tools ntp smbldap-tools winbind heimdal-clients
Recommended packages:
attr samba-vfs-modules
The following NEW packages will be installed:
samba samba-common samba-common-bin
0 upgraded, 3 newly installed, 0 to remove and 10 not upgraded.
Need to get 0 B/1,877 kB of archives.
After this operation, 13.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
Selecting previously unselected package samba-common.
(Reading database ... 221289 files and directories currently installed.)
Preparing to unpack .../samba-common_2%3a4.2.10+dfsg-0+deb8u3_all.deb ...
Unpacking samba-common (2:4.2.10+dfsg-0+deb8u3) ...
Selecting previously unselected package samba-common-bin.
Preparing to unpack .../samba-common-bin_2%3a4.2.10+dfsg-0+deb8u3_amd64.deb ...
Unpacking samba-common-bin (2:4.2.10+dfsg-0+deb8u3) ...
Selecting previously unselected package samba.
Preparing to unpack .../samba_2%3a4.2.10+dfsg-0+deb8u3_amd64.deb ...
Unpacking samba (2:4.2.10+dfsg-0+deb8u3) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up samba-common (2:4.2.10+dfsg-0+deb8u3) ...

Creating config file /etc/samba/smb.conf with new version
Setting up samba-common-bin (2:4.2.10+dfsg-0+deb8u3) ...
Setting up samba (2:4.2.10+dfsg-0+deb8u3) ...
[ ok ] Starting SMB/CIFS daemon: smbd.
[ ok ] Starting NetBIOS name server: nmbd.
Processing triggers for libc-bin (2.19-18+deb8u4) ...
So that seemed to have fixed my issues. Thanks Flemur for your reply.

I checked if it's working by submitting:

Code: Select all

sudo service samba restart
And the result was:
[ ok ] Stopping NetBIOS name server: nmbd.
[ ok ] Starting NetBIOS name server: nmbd.
[ ok ] Stopping SMB/CIFS daemon: smbd.
[ ok ] Starting SMB/CIFS daemon: smbd.
[ ok ] Stopping Samba AD DC daemon: samba.

Post Reply

Return to “Software & Applications”