samba wont work

Asked by frozenflames

I installed samba from synaptic package manager and issue smb.conf is empty file and aslo
when i do
$ cd /etc/samba
bash: cd: /etc/samba: No such file or directory

so i reinstalled from synaptic package manager but the same issue smb.conf is empty file and aslo after reinstallation

$ cd /etc/samba
bash: cd: /etc/samba: No such file or directory

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu samba Edit question
Assignee:
No assignee Edit question
Solved by:
marcobra (Marco Braida)
Solved:
Last query:
Last reply:
Revision history for this message
Best marcobra (Marco Braida) (marcobra) said :
#1

Please reinstall it, from terminal:

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get --reinstall --purge install samba

Then retry

Revision history for this message
frozenflames (oracleandoracle) said :
#2

sudo apt-get dist-upgrade
after that few errors but didnt upgrade or reinstall???
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
7 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up samba-common (2:3.4.7~dfsg-1ubuntu3) ...
Not replacing deleted config file /etc/samba/smb.conf
Install/upgrade will fail. To recover, please try:
  sudo cp /usr/share/samba/smb.conf /etc/samba/smb.conf
  sudo dpkg --configure -a
dpkg: error processing samba-common (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of samba-common-bin:
 samba-common-bin depends on samba-common (>= 2:3.4.0~pre1-2); however:
  Package samba-common is not configured yet.
dpkg: error processing samba-common-bin (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nautilus-share:
 nautilus-share depends on samba-common (>= 3.0.27a); however:
  Package samba-common is not configured yet.
 nautilus-share depends on samba-common-bin | samba-common (<< 2:3.4.0~pre2-1~0); however:
  Package samba-common-bin is not configured yet.
  Version of samba-common on system is 2:3.4.7~dfsg-1ubuntu3.
dpkg: error processing nautilus-share (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of samba:
 samba depends on samba-common (= 2:3.4.7~dfsg-1ubuntu3); howNo apport report written because the error message indicates its a followup error from a previous failure.
       No apport report written because the error message indicates its a followup error from a previous failure.
                                 No apport report written because MaxReports is reached already
               No apport report written because MaxReports is reached already
                                                                             No apport report written because MaxReports is reached already
                                                           No apport report written because MaxReports is reached already
                                         ever:
  Package samba-common is not configured yet.
dpkg: error processing samba (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of smbfs:
 smbfs depends on samba-common (= 2:3.4.7~dfsg-1ubuntu3); however:
  Package samba-common is not configured yet.
dpkg: error processing smbfs (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of system-config-samba:
 system-config-samba depends on samba; however:
  Package samba is not configured yet.
dpkg: error processing system-config-samba (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of winbind:
 winbind depends on samba-common (= 2:3.4.7~dfsg-1ubuntu3); however:
  Package samba-common is not configured yet.
dpkg: error processing winbind (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 samba-common
 samba-common-bin
 nautilus-share
 samba
 smbfs
 system-config-samba
 winbind
E: Sub-process /usr/bin/dpkg returned an error code (1)
msi@msi-desktop:~$ sudo apt-get --reinstall --purge install samba
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
7 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up samba-common (2:3.4.7~dfsg-1ubuntu3) ...
Not replacing deleted config file /etc/samba/smb.conf
Install/upgrade will fail. To recover, please try:
  sudo cp /usr/share/samba/smb.conf /etc/samba/smb.conf
  sudo dpkg --configure -a
dpkg: error processing samba-common (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of samba-common-bin:
 samba-common-bin depends on samba-common (>= 2:3.4.0~pre1-2); however:
  Package samba-common is not configured yet.
dpkg: error processing samba-common-bin (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nautilus-share:
 nautilus-share depends on samba-common (>= 3.0.27a); however:
  Package samba-common is not configured yet.
 nautilus-share depends on samba-common-bin | samba-common (<< 2:3.4.0~pre2-1~0); however:
  Package samba-common-bin is not configured yet.
  Version of samba-common on system is 2:3.4.7~dfsg-1ubuntu3.
dpkg: error processing nautilus-share (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of samba:
 samba depends on samba-common (= 2:3.4.7~dfsg-1ubuntu3); howNo apport report written because the error message indicates its a followup error from a previous failure.
       No apport report written because the error message indicates its a followup error from a previous failure.
                                 No apport report written because MaxReports is reached already
               No apport report written because MaxReports is reached already
                                                                             No apport report written because MaxReports is reached already
                                                           No apport report written because MaxReports is reached already
                                         ever:
  Package samba-common is not configured yet.
dpkg: error processing samba (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of smbfs:
 smbfs depends on samba-common (= 2:3.4.7~dfsg-1ubuntu3); however:
  Package samba-common is not configured yet.
dpkg: error processing smbfs (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of system-config-samba:
 system-config-samba depends on samba; however:
  Package samba is not configured yet.
dpkg: error processing system-config-samba (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of winbind:
 winbind depends on samba-common (= 2:3.4.7~dfsg-1ubuntu3); however:
  Package samba-common is not configured yet.
dpkg: error processing winbind (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 samba-common
 samba-common-bin
 nautilus-share
 samba
 smbfs
 system-config-samba
 winbind
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
frozenflames (oracleandoracle) said :
#3

Thanks marcobra (Marco Braida), that solved my question.

Revision history for this message
Jon (jcv) said :
#4

I had this issue and got it working with the help of this link.
https://lists.ubuntu.com/archives/ubuntu-server-bugs/2008-July/004520.html

in my case I renamed the original smb.conf prior to re-installing. it seems that it needs the smb.conf file for the purge/reinstall to work.
so in the above link I just followed the first step and then ran with marcobra's steps from above.

sudo touch /etc/samba/smb.conf

then sudo apt-get --reinstall --purge install samba

it has reinstalling cleanly anyway...