Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm attempting to solve this problem...

... by reinstalling Samba, but I'm getting the following error:

# apt-get install samba
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libdns45 libisccc40 liblwres40 libbind9-40 libisccfg40 libisc45
Use 'apt-get autoremove' to remove them.
Suggested packages:
  openbsd-inetd inet-superserver smbldap-tools ldb-tools
The following NEW packages will be installed
  samba
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/4780kB of archives.
After this operation, 12.7MB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously deselected package samba.
(Reading database ... 56732 files and directories currently installed.)
Unpacking samba (from .../samba_2%3a3.2.5-4lenny13_amd64.deb) ...
Processing triggers for man-db ...
Setting up samba (2:3.2.5-4lenny13) ...
Generating /etc/default/samba...
Starting Samba daemons: nmbd failed!
invoke-rc.d: initscript samba, action "start" failed.
dpkg: error processing 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)

Previously I had run these commands:

apt-get remove --purge samba
rm -fr /etc/samba/
rm -fr /var/log/samba/*
share|improve this question
add comment

3 Answers

  • Either you somehow still have a running nmbd, or a stray pidfile, in which case kill the nmbd process, remove the pidfile, and run dpkg --configure nmbd;

  • or you're seeing the same error as before the reinstall, which was due not to samba itself but a dependency (such as libwbclient0 or libtalloc2 or libc6 or the kernel or the hardware). Does running nmbd -i also produce a stack trace? Did you upgrade one of the dependencies lately? Did you run a memory test lately?

share|improve this answer
add comment

Hmm, well these commands seemed to get the install working (but didn't fix my original issue):

apt-get remove --purge samba samba-common
apt-get install samba
share|improve this answer
add comment

I got the same problem the last minutes - and found my own problem. Thus, I'd like to present "my" solution: From my old installation there has been the /etc/init.d/samba which got not removed by apt-get remove --purge. Deleting it and reinstalling samba worked fine.

Greets

Basti

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.