Error while installing Samba on Debian

6,334

Solution 1

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.

Solution 2

This worked for me

apt-get purge samba-common
apt-get install samba

Solution 3

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?

Share:
6,334

Related videos on Youtube

Jared
Author by

Jared

Updated on September 17, 2022

Comments

  • Jared
    Jared over 1 year

    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)
    
  • Jared
    Jared over 14 years
    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
    Jared over 14 years
    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.