package samba4 4.0.3+dfsg1-0.1ubuntu1 throws exception when encountering invalid config option

Bug #1202918 reported by Clay Neitz
48
This bug affects 9 people
Affects Status Importance Assigned to Milestone
samba
New
Undecided
Unassigned
samba4 (Ubuntu)
Triaged
High
Unassigned

Bug Description

I had samba installed on my system before

My computer had been off for a couple days then I started it and could not access files over the network.

Tried to run samba locally and it said not installed, please install.

Switched to root access and appeared to be installing but gave an error code (1)

Setting up samba4 (4.0.3+dfsg1-0.1ubuntu1) ...
Unknown enumerated value 'share' for 'security'
ERROR(runtime): uncaught exception - Unable to load default file
  File "/usr/lib/python2.7/dist-packages/samba/netcmd/__init__.py", line 175, in _run
    return self.run(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/samba/netcmd/domain.py", line 258, in run
    lp = sambaopts.get_loadparm()
  File "/usr/lib/python2.7/dist-packages/samba/getopt.py", line 92, in get_loadparm
    self._lp.load_default()
dpkg: error processing samba4 (--configure):
 subprocess installed post-installation script returned error exit status 255

The option "security = share" isn't supported anymore. The package should tell the user as much instead of throwing an unhelpful exception.

ProblemType: Package
DistroRelease: Ubuntu 13.10
Package: samba4 4.0.3+dfsg1-0.1ubuntu1
ProcVersionSignature: Ubuntu 3.10.0-2.11-generic 3.10.0
Uname: Linux 3.10.0-2-generic x86_64
ApportVersion: 2.10.2-0ubuntu4
Architecture: amd64
Date: Thu Jul 18 21:24:22 2013
DuplicateSignature: package:samba4:4.0.3+dfsg1-0.1ubuntu1:subprocess installed post-installation script returned error exit status 255
ErrorMessage: subprocess installed post-installation script returned error exit status 255
InstallationDate: Installed on 2013-07-09 (9 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Alpha amd64 (20130704)
MarkForUpload: True
SourcePackage: samba4
Title: package samba4 4.0.3+dfsg1-0.1ubuntu1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 255
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Clay Neitz (coolclay-n) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Andreas Moog (ampelbein) wrote :

Thanks for the report. The cause of the issue is that you have a invalid /etc/samba/smb.conf file, the option "security = share" is deprecated. The bug, however, is that, instead of telling you that, samba4 decides to just throw up and confront you with an exception. The package maintainers will have to deal with that part.

To get your samba installation repaired, I suggest setting "security = user", then running "testparm /etc/samba/smb.conf" and look for other reports of invalid/deprecated options. After you finished that, run "sudo apt-get -f install". That should clear your issue.

Changed in samba4 (Ubuntu):
importance: Undecided → High
summary: - package samba4 4.0.3+dfsg1-0.1ubuntu1 failed to install/upgrade:
- subprocess installed post-installation script returned error exit status
- 255
+ package samba4 4.0.3+dfsg1-0.1ubuntu1 throws exception when encountering
+ invalid config option
description: updated
Changed in samba4 (Ubuntu):
status: New → Triaged
Revision history for this message
Anton Piatek (anton-piatek) wrote :

I thnik I hit this issue trying to upgrade from 13.04 to 13.10 and it completely killed the upgrade. I simply purged the samba4 package and reinstalled, but a non-technical user would be completely stumped and worried about the upgrade killing their box.

Revision history for this message
AdlerHorst (adlerhorst) wrote :

absolutely Fresh installed Ubuntu.

Did as Andreas Moog said:
> testparm /etc/samba/smb.conf

Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Unknown parameter encountered: "server role"
Ignoring unknown parameter "server role"
Unknown parameter encountered: "server services"
Ignoring unknown parameter "server services"
Unknown parameter encountered: "dcerpc endpoint servers"
Ignoring unknown parameter "dcerpc endpoint servers"
Processing section "[printers]"
Processing section "[print$]"
Processing section "[sysvol]"
Processing section "[netlogon]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
 realm = LOCALDOMAIN
 server string = %h server (Samba, Ubuntu)
 map to guest = Bad User
 obey pam restrictions = Yes
 pam password change = Yes
 passwd program = /usr/bin/passwd %u
 passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
 unix password sync = Yes
 syslog = 0
 log file = /var/log/samba/log.%m
 max log size = 1000
 dns proxy = No
 usershare allow guests = Yes
 panic action = /usr/share/samba/panic-action %d
 idmap config * : backend = tdb

[printers]
 comment = All Printers
 path = /var/spool/samba
 create mask = 0700
 printable = Yes
 print ok = Yes
 browseable = No

[print$]
 comment = Printer Drivers
 path = /var/lib/samba/printers

[sysvol]
 path = /var/lib/samba/sysvol
 read only = No

[netlogon]
 path = /var/lib/samba/sysvol/localdomain/scripts
 read only = No

Revision history for this message
AdlerHorst (adlerhorst) wrote :

sudo apt-get install -f

...
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
2 nicht vollständig installiert oder entfernt.
Nach dieser Operation werden 0 B Plattenplatz zusätzlich benutzt.
samba4 (4.0.3+dfsg1-0.1ubuntu1) wird eingerichtet ...
ERROR(ldb): uncaught exception - operations error at ../source4/dsdb/samdb/ldb_modules/rootdse.c:501
  File "/usr/lib/python2.7/dist-packages/samba/netcmd/__init__.py", line 175, in _run
    return self.run(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/samba/netcmd/dbcheck.py", line 108, in run
    fix=fix, yes=yes, quiet=quiet, in_transaction=started_transaction)
  File "/usr/lib/python2.7/dist-packages/samba/dbchecker.py", line 62, in __init__
    self.ntds_dsa = samdb.get_dsServiceName()
  File "/usr/lib/python2.7/dist-packages/samba/samdb.py", line 856, in get_dsServiceName
    res = self.search(base="", scope=ldb.SCOPE_BASE, attrs=["dsServiceName"])
dpkg: Fehler beim Bearbeiten von samba4 (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 255 zurück
phpldapadmin (1.2.2-5ubuntu1) wird eingerichtet ...
ln: Die symbolische Verknüpfung »/etc/apache2/conf.d/phpldapadmin“ konnte nicht angelegt werden: Datei oder Verzeichnis nicht gefunden
dpkg: Fehler beim Bearbeiten von phpldapadmin (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück
Fehler traten auf beim Bearbeiten von:
 samba4
 phpldapadmin

Revision history for this message
Gallomimia (gallomimia) wrote :
Download full text (27.3 KiB)

As you can see, I have quite a lot of puke for output. My system:
amd cpu/chipset/gpu
Ubuntu 13.10, upgraded from fresh install of 13.04. In use for several months
Kernel 3.12 from http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.12-saucy/
This is my first install of anything related to samba. I attempted a stand-alone install.
You can see that upon seeing a list of suggested packages I cancelled install and attempted to include those. Some don't even exist! I consider that to be more puke. (Terminal output from copy/paste was cut off as well!) I tried again with the offending packages omitted from the install list.

After the error occurred, I tried apt-get update, and upgrade. Then apt-get install -f (Also it's 4am, dpkg -i was NOT want I wanted.)
No Joy.
And without further ado, terminal puke:
==================================================================================
gallomimia@draco-lambda:~$ sudo apt-get install samba4
[sudo] password for gallomimia:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-3.11.0-13 linux-headers-3.11.0-13-generic
  linux-image-3.11.0-13-generic linux-image-extra-3.11.0-13-generic
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  attr bind9 bind9utils ldb-tools libdcerpc-server0 libdcerpc0 libgensec0
  libhdb9-heimdal libkdc2-heimdal libldb1 libndr-standard0 libndr0
  libregistry0 libsamba-credentials0 libsamba-hostconfig0 libsamba-policy0
  libsamba-util0 libsamdb0 libsmbclient-raw0 python-dnspython python-ldb
  python-samba python-talloc python-tdb samba-dsdb-modules samba4-common-bin
  tdb-tools
Suggested packages:
  bind9-doc phpldapadmin samba-gtk swat2 ntp
The following NEW packages will be installed:
  attr bind9 bind9utils ldb-tools libdcerpc-server0 libdcerpc0 libgensec0
  libhdb9-heimdal libkdc2-heimdal libldb1 libndr-standard0 libndr0
  libregistry0 libsamba-credentials0 libsamba-hostconfig0 libsamba-policy0
  libsamba-util0 libsamdb0 libsmbclient-raw0 python-dnspython python-ldb
  python-samba python-talloc python-tdb samba-dsdb-modules samba4
  samba4-common-bin tdb-tools
0 upgraded, 28 newly installed, 0 to remove and 0 not upgraded.
Need to get 10.1 MB of archives.
After this operation, 40.7 MB of additional disk space will be used.
Do you want to continue [Y/n]? ^Cgallomimia@draco-lambda:~$ sudo apt-get installmba-gtk swat2 ntp phpldapadmin sa
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package samba-gtk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package swat2 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'samba-gtk' has no installation candidate
E: Package 'swat2' has no installation candidate
gallomimia@draco-lambda:~$ sudo apt-get update
Ign http://mirror.cpsc.ucalgary.ca saucy InRelease
Hit http://mirror.cpsc....

Revision history for this message
Gallomimia (gallomimia) wrote :
Download full text (5.7 KiB)

This can't be right. Please move this comment to a different thread, but I think it is greatly related. After the fiasco above, I decided to try installing the package samba (no4). Have a look at the packages it wants to remove for me. mplayer? I use that one! software-center? That one seems important. vlc-plugin-pulse. GET THE HELL OUT! system-config-printer-common. Not that I have a printer, but, don't touch that! kubuntu-debug-installer??? I don't know how that one ever got installed on my system, alond with kde-runtime, but it wasn't installed with the above proceduure, and shouldn't be touched now. This is more of a bug in apt-get but it seems to me these packages are causing it.

gallomimia@draco-lambda:~$ sudo apt-get install samba
Reading package lists... Done
Building dependency tree
Reading state information... Done
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 resolve the situation:

The following packages have unmet dependencies:
 samba : Depends: samba-common (= 2:3.6.18-1ubuntu3) but 2:3.6.18-1ubuntu3.1 is to be installed
         Depends: libwbclient0 (= 2:3.6.18-1ubuntu3) but 2:3.6.18-1ubuntu3.1 is to be installed
E: Unable to correct problems, you have held broken packages.
gallomimia@draco-lambda:~$ sudo apt-get remove samba-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-3.11.0-13 linux-headers-3.11.0-13-generic linux-image-3.11.0-13-generic
  linux-image-extra-3.11.0-13-generic
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  libdcerpc-server0 libdcerpc0 libgensec0 libnss-winbind libpam-winbind libregistry0 libsamba-policy0
  libsmbclient-raw0 nautilus-share python-samba samba-common samba-common-bin samba-dsdb-modules
  samba4-common-bin smbclient winbind
0 upgraded, 0 newly installed, 16 to remove and 0 not upgraded.
After this operation, 94.5 MB disk space will be freed.
Do you want to continue [Y/n]? n
Abort.
gallomimia@draco-lambda:~$ man apt-get
gallomimia@draco-lambda:~$ sudo apt-get remove samba-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-3.11.0-13 linux-headers-3.11.0-13-generic linux-image-3.11.0-13-generic
  linux-image-extra-3.11.0-13-generic
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  libdcerpc-server0 libdcerpc0 libgensec0 libnss-winbind libpam-winbind libregistry0 libsamba-policy0
  libsmbclient-raw0 nautilus-share python-samba samba-common samba-common-bin samba-dsdb-modules
  samba4-common-bin smbclient winbind
0 upgraded, 0 newly installed, 16 to remove and 0 not upgraded.
After this operation, 94.5 MB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 479750 files and directories c...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.