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)
link|improve this question

10% accept rate
feedback

4 Answers

up vote 1 down vote accepted

The error is occuring while starting nmbd. Samba is installed, but for some reason can't start. You can run nmdb 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.

link|improve this answer
I started smbd with that debugging output and found that the config file wasn't getting placed in the /etc/samba directory. Copying the /share/samba/smb.conf appears to have fixed the problem. – Jared Sep 13 '09 at 15:56
feedback

well... looking at samba / nmbd logs. they can be helpful [ /var/log/samba/ ]

is it possible that samba was installed earlier on this system.. and messed up configuration files ware left?

link|improve this answer
There was a former install, it somehow messed up the install process so a default config file wasn't being placed in /etc/samba/smb.conf Moving the sample one from /usr/share/samba/smb.conf to /etc/samba/smb.conf allowed it to start. – Jared Sep 13 '09 at 15:58
feedback

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

link|improve this answer
feedback

This worked for me

apt-get purge samba-common
apt-get install samba
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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