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/*
Best Answer
Either you somehow still have a running
nmbd
, or a stray pidfile, in which case kill thenmbd
process, remove the pidfile, and rundpkg --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
orlibtalloc2
orlibc6
or the kernel or the hardware). Does runningnmbd -i
also produce a stack trace? Did you upgrade one of the dependencies lately? Did you run a memory test lately?