Linux – Error while installing Samba on Debian

debianlinuxsamba

When doing apt-get install samba smbfs I get the following error. How do I go about troubleshooting and fixing this?

Errors were encountered while processing:
 samba
E: Sub-process /usr/bin/dpkg returned an error code (1)
The entire output from apt-get is pasted below.
The following NEW packages will be installed
  samba smbfs
0 upgraded, 2 newly installed, 0 to remove and 34 not upgraded.
Need to get 1350kB/5645kB of archives.
After this operation, 16.1MB of additional disk space will be used.
Get: 1 http://ftp.uk.debian.org lenny/main smbfs 2:3.2.5-4lenny6 [1350kB]
Fetched 1350kB in 2s (479kB/s)
Preconfiguring packages ...
Selecting previously deselected package samba.
(Reading database ... 108352 files and directories currently installed.)
Unpacking samba (from .../samba_2%3a3.2.5-4lenny6_i386.deb) ...
Selecting previously deselected package smbfs.
Unpacking smbfs (from .../smbfs_2%3a3.2.5-4lenny6_i386.deb) ...
Processing triggers for man-db ...
Setting up samba (2:3.2.5-4lenny6) ...
Generating /etc/default/samba...
Starting Samba daemons: nmbd failed!
invoke-rc.d: initscript samba, action "start" failed.
dpkg: error processing samba (--configure):
 subprocess post-installation script returned error exit status 1
Setting up smbfs (2:3.2.5-4lenny6) ...
Errors were encountered while processing:
 samba
E: Sub-process /usr/bin/dpkg returned an error code (1)

Best Answer

The error is occuring while starting nmbd. Samba is installed, but for some reason can't start. You can run nmbd manually, as root, with the command:

/usr/sbin/nmbd -S -d 1

which will produce debugging output on the screen. That will help understand why it's failing; if it doesn't help you post the output here.

Related Topic