Asmox
Posts: 8
Joined: Thu Sep 22, 2016 8:10 am

[SOLVED] Cannot start Samba after update

Sun Sep 25, 2016 2:56 pm

Hello!

I have a problem with Samba. Since update it doesn't start and I don't know why. I tried reinstalling it and every time it goes the same. Let's start with this message:

Code: Select all

$ systemctl status smbd.service
● smbd.service - LSB: start Samba SMB/CIFS daemon (smbd)
   Loaded: loaded (/etc/init.d/smbd)
   Active: failed (Result: exit-code) since Sun 2016-09-25 14:30:31 UTC; 8s ago
  Process: 16171 ExecStart=/etc/init.d/smbd start (code=exited, status=1/FAILURE)
My journalctl says:

Code: Select all

$ sudo journalctl -xn
-- Logs begin at Sat 2016-09-24 07:17:01 UTC, end at Sun 2016-09-25 14:34:21 UTC. --
Sep 25 14:30:31 raspberrypi smbd[16171]: failed!
Sep 25 14:30:31 raspberrypi systemd[1]: smbd.service: control process exited, code=exited status=1
Sep 25 14:30:31 raspberrypi systemd[1]: Failed to start LSB: start Samba SMB/CIFS daemon (smbd).
-- Subject: Unit smbd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit smbd.service has failed.
-- 
-- The result is failed.
Sep 25 14:30:31 raspberrypi systemd[1]: Unit smbd.service entered failed state.
Sep 25 14:30:31 raspberrypi sudo[16144]: pam_unix(sudo:session): session closed for user root
Sep 25 14:33:12 raspberrypi sudo[16245]: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/journalctl -xn
Sep 25 14:33:12 raspberrypi sudo[16245]: pam_unix(sudo:session): session opened for user root by (uid=0)
Sep 25 14:34:09 raspberrypi sudo[16245]: pam_unix(sudo:session): session closed for user root
Sep 25 14:34:21 raspberrypi sudo[16266]: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/journalctl -xn
Sep 25 14:34:21 raspberrypi sudo[16266]: pam_unix(sudo:session): session opened for user root by (uid=0)
Okay, I looked in the Internet for solutions. I found somewhere that I should:
  • remove all the comments (which starts with # or ;)
  • remove entry "security = share"
I tried both, and also to reinstall Samba. The problem is, there are several more errors when I try to fix it.

1. Trying sudo apt-get purge samba doesn't erase my configuration
I don't understand it. After uninstall I still see all my configuration in /etc/samba

2. I get "Error: Timeout was reached" at every action in apt-get
Updating

Code: Select all

$ sudo apt-get update
Hit http://mirrordirector.raspbian.org jessie InRelease
Hit http://archive.raspberrypi.org jessie InRelease       
Hit http://mirrordirector.raspbian.org jessie/main armhf Packages
Hit http://archive.raspberrypi.org jessie/main armhf Packages
Hit http://mirrordirector.raspbian.org jessie/contrib armhf Packages
Hit http://archive.raspberrypi.org jessie/ui armhf Packages
Hit http://mirrordirector.raspbian.org jessie/non-free armhf Packages
Hit http://mirrordirector.raspbian.org jessie/rpi armhf Packages
Ign http://archive.raspberrypi.org jessie/main Translation-en_GB  
Ign http://archive.raspberrypi.org jessie/main Translation-en     
Ign http://archive.raspberrypi.org jessie/ui Translation-en_GB    
Ign http://archive.raspberrypi.org jessie/ui Translation-en       
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en
Ign http://mirrordirector.raspbian.org jessie/main Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en
Error: Timeout was reached
Reading package lists... Done
Deleting samba

Code: Select all

sudo apt-get remove --purge samba
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  attr libaio1 libasn1-8-heimdal libhcrypto4-heimdal libhdb9-heimdal libheimbase1-heimdal libhx509-5-heimdal libkrb5-26-heimdal libroken18-heimdal libwind0-heimdal
  python-dnspython samba-dsdb-modules samba-vfs-modules tdb-tools
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  samba*
0 upgraded, 0 newly installed, 1 to remove and 10 not upgraded.
1 not fully installed or removed.
After this operation, 11.2 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 126706 files and directories currently installed.)
Removing samba (2:4.2.10+dfsg-0+deb8u3) ...
Purging configuration files for samba (2:4.2.10+dfsg-0+deb8u3) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for libc-bin (2.19-18+deb8u6) ...
Error: Timeout was reached
3. Problems with dependencies
I try solution from AskUbuntu: Samba does not launch after upgrading to 16.04, but I have problems with broken packages:

Code: Select all

$ sudo apt-get install libnss-winbind* libpam-winbind* samba* winbind*
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libnss-winbind' for regex 'libnss-winbind*'
Note, selecting 'libpam-winbind' for regex 'libpam-winbind*'
Note, selecting 'gadmin-samba' for regex 'samba*'
Note, selecting 'libsamba-policy0' for regex 'samba*'
Note, selecting 'fusiondirectory-plugin-samba' for regex 'samba*'
Note, selecting 'libsamba-util0' for regex 'samba*'
Note, selecting 'samba4-clients' for regex 'samba*'
Note, selecting 'samba-ad-dc' for regex 'samba*'
Note, selecting 'samba-tools' for regex 'samba*'
Note, selecting 'vlc-plugin-samba' for regex 'samba*'
Note, selecting 'libsamba-hostconfig0' for regex 'samba*'
Note, selecting 'samba4' for regex 'samba*'
Note, selecting 'gosa-plugin-samba' for regex 'samba*'
Note, selecting 'samba' for regex 'samba*'
Note, selecting 'samba-common-bin' for regex 'samba*'
Note, selecting 'libsamba-hostconfig-dev' for regex 'samba*'
Note, selecting 'libsamba-util-dev' for regex 'samba*'
Note, selecting 'libsamba-credentials-dev' for regex 'samba*'
Note, selecting 'libsamba-policy-dev' for regex 'samba*'
Note, selecting 'samba-dbg' for regex 'samba*'
Note, selecting 'samba-common' for regex 'samba*'
Note, selecting 'samba4-dev' for regex 'samba*'
Note, selecting 'python-samba' for regex 'samba*'
Note, selecting 'samba4-common-bin' for regex 'samba*'
Note, selecting 'dpsyco-samba' for regex 'samba*'
Note, selecting 'libsamba-credentials0' for regex 'samba*'
Note, selecting 'samba-dev' for regex 'samba*'
Note, selecting 'samba-vfs-modules' for regex 'samba*'
Note, selecting 'samba4-common' for regex 'samba*'
Note, selecting 'samba-dsdb-modules' for regex 'samba*'
Note, selecting 'gadmin-samba-dbg' for regex 'samba*'
Note, selecting 'samba-doc' for regex 'samba*'
Note, selecting 'samba-testsuite' for regex 'samba*'
Note, selecting 'samba4-testsuite' for regex 'samba*'
Note, selecting 'samba-libs' for regex 'samba*'
Note, selecting 'fusiondirectory-plugin-samba-schema' for regex 'samba*'
Note, selecting 'samba-client' for regex 'samba*'
Note, selecting 'python2.7-samba' for regex 'samba*'
Note, selecting 'python-samba' instead of 'python2.7-samba'
Note, selecting 'smbclient' instead of 'samba-client'
Note, selecting 'libnss-winbind' for regex 'winbind*'
Note, selecting 'winbind' for regex 'winbind*'
Note, selecting 'libapache2-mod-auth-ntlm-winbind' for regex 'winbind*'
Note, selecting 'libpam-winbind' for regex 'winbind*'
Note, selecting 'winbind4' for regex 'winbind*'
Note, selecting 'winbindd' for regex 'winbind*'
python-samba is already the newest version.
python-samba set to manually installed.
samba-common is already the newest version.
samba-common set to manually installed.
samba-common-bin is already the newest version.
samba-dsdb-modules is already the newest version.
samba-dsdb-modules set to manually installed.
samba-libs is already the newest version.
samba-libs set to manually installed.
samba-vfs-modules is already the newest version.
samba-vfs-modules set to manually installed.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 fusiondirectory-plugin-samba : Conflicts: gosa-plugin-samba but 2.7.4+reloaded2-1+deb8u2 is to be installed
 gosa-plugin-samba : Depends: gosa (= 2.7.4+reloaded2-1+deb8u2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
But I didn't change the repositories, though. I also tried using the same command with aptitude, but it seems as it doesn't recognize asterisks.

Generally speaking, I don't know where is the problem. Samba? Repositiories? My Internet connection?
So I kindly ask you for help.
Last edited by Asmox on Tue Sep 27, 2016 10:55 pm, edited 1 time in total.

User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Cannot start Samba after update

Sun Sep 25, 2016 2:59 pm

What's in your logs in /var/log/samba?
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Asmox
Posts: 8
Joined: Thu Sep 22, 2016 8:10 am

Re: Cannot start Samba after update

Sun Sep 25, 2016 4:50 pm

Thank you for fast reply!

That's my log files:
/var/log/samba/log.smbd

Code: Select all

[2016/09/19 06:25:07.388831,  0] ../lib/param/loadparm.c:743(lpcfg_map_parameter)
  Unknown parameter encountered: "display charset"
[2016/09/19 06:25:07.389220,  0] ../lib/param/loadparm.c:1626(lpcfg_do_global_parameter)
  Ignoring unknown parameter "display charset"
/var/log/samba/log.nmbd

Code: Select all

{...}
[2016/09/21 19:53:34.028633,  0] ../source3/nmbd/nmbd_browsesync.c:354(find_domain_master_name_query_fail)
  find_domain_master_name_query_fail:
  Unable to find the Domain Master Browser name DOM<1b> for the workgroup DOM.
  Unable to sync browse lists in this workgroup.
[2016/09/21 20:08:35.037428,  0] ../source3/nmbd/nmbd_browsesync.c:354(find_domain_master_name_query_fail)
  find_domain_master_name_query_fail:
  Unable to find the Domain Master Browser name DOM<1b> for the workgroup DOM.
  Unable to sync browse lists in this workgroup.
[2016/09/21 20:23:34.051878,  0] ../source3/nmbd/nmbd_browsesync.c:354(find_domain_master_name_query_fail)
  find_domain_master_name_query_fail:
  Unable to find the Domain Master Browser name DOM<1b> for the workgroup DOM.
  Unable to sync browse lists in this workgroup.
[2016/09/21 20:38:34.066167,  0] ../source3/nmbd/nmbd_browsesync.c:354(find_domain_master_name_query_fail)
  find_domain_master_name_query_fail:
  Unable to find the Domain Master Browser name DOM<1b> for the workgroup DOM.
  Unable to sync browse lists in this workgroup.
I forgot to post my samba config too:
/etc/samba/smb.conf

Code: Select all

[global]

   workgroup = DOM
   wins support = yes
   dns proxy = no

display charset = ISO08859-2
unix charset = ISO-8859-2
dos charset = 852

   log file = /var/log/samba/log.%m
   max log size = 1000

   syslog = 0

   panic action = /usr/share/samba/panic-action %d

   server role = standalone server

   passdb backend = tdbsam

   obey pam restrictions = yes

   unix password sync = yes

   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

   pam password change = yes

   map to guest = bad user

   security = user

   usershare allow guests = yes

[homes]
   comment = Home Directories
   browseable = no
   read only = yes
   create mask = 0700
   directory mask = 0700

   valid users = %S

[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = no
   read only = yes
   create mask = 0700

[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no

[Grubas]
comment = Magazyn grubas
path = /mnt/grubas
read only = no
browsable = yes
create mask = 0777
directory mask = 0777

[hp1018]
default devmode = yes
path = /var/spool/samba
browseable = yes
printable = yes
printer name = hp1018

User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Cannot start Samba after update

Sun Sep 25, 2016 10:47 pm

You appear to have a syntax error / invalid parm "display charset" in your config file.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Asmox
Posts: 8
Joined: Thu Sep 22, 2016 8:10 am

Re: Cannot start Samba after update

Mon Sep 26, 2016 11:27 am

I changed my config file, I mean I deleted lines about charset, but nothing changed.
/etc/samba/smb.conf

Code: Select all

[global]

   workgroup = DOM
   wins support = yes
   dns proxy = no

   log file = /var/log/samba/log.%m
   max log size = 1000

   syslog = 0

   panic action = /usr/share/samba/panic-action %d

   server role = standalone server

   passdb backend = tdbsam

   obey pam restrictions = yes

   unix password sync = yes

   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

   pam password change = yes

   map to guest = bad user

   security = user

   usershare allow guests = yes

[homes]
   comment = Home Directories
   browseable = no
   read only = yes
   create mask = 0700
   directory mask = 0700

   valid users = %S

[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = no
   read only = yes
   create mask = 0700

[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no

[Grubas]
comment = Magazyn grubas
path = /mnt/grubas
read only = no
browsable = yes
create mask = 0777
directory mask = 0777

[hp1018]
default devmode = yes
path = /var/spool/samba
browseable = yes
printable = yes
printer name = hp1018
use client driver = yes
/var/log/samba/log.smbd didn't change at all. The same with /var/log/samba/log.nmbd.

Asmox
Posts: 8
Joined: Thu Sep 22, 2016 8:10 am

Re: Cannot start Samba after update

Tue Sep 27, 2016 10:55 pm

Okay I've found the solution. The key was the fact that I still had my configuration kept in /etc/samba, even though I deleted it with

Code: Select all

$ sudo apt-get remove --purge samba
I did the instruction at http://askubuntu.com/questions/820108/c ... -etc-samba:

Code: Select all

$ sudo apt-get remove --purge samba samba-*
$ sudo apt-get autoremove
And then I installed samba again. Now I rewrote my configuration and everything is ok.

The topic is to be closed.

Return to “Troubleshooting”