upgradeprovision: guess_names: 'realm =' was not specified in supplied /etc/samba/smb.conf. Please remove the smb.conf file and let provision generate it

Bug #832465 reported by Jack Weidner
650
This bug affects 91 people
Affects Status Importance Assigned to Milestone
samba4 (Ubuntu)
Fix Released
High
Jelmer Vernooij

Bug Description

Happened on boot

ProblemType: Package
DistroRelease: Ubuntu 11.10
Package: samba4 4.0.0~alpha17~git20110807.dfsg1-1ubuntu1
ProcVersionSignature: Ubuntu 3.0.0-9.14-generic 3.0.3
Uname: Linux 3.0.0-9-generic i686
Architecture: i386
Date: Tue Aug 23 21:27:14 2011
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Alpha i386 (20110803.1)
SourcePackage: samba4
Title: package samba4 4.0.0~alpha17~git20110807.dfsg1-1ubuntu1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: Upgraded to oneiric on 2011-08-24 (0 days ago)

Revision history for this message
Jack Weidner (jj-weidner) wrote :
tags: removed: need-duplicate-check
Changed in samba4 (Ubuntu):
status: New → Confirmed
Revision history for this message
Jean-Rene Bastien (jrbastien) wrote :

This is probably related since Samba install did not finished normally, I can't install SMBFS either. I get the same error. This is probably also the cause of my permanent drive no longer getting mounted. In /etc/fstab:

//192.168.1.103/share /home/jrbastien/NAS cifs noserverino,guest,uid=1000,iocharset=utf8,codepage=cp850,unicode 0 0

jrbastien@JR-Vostro-1500:~$ sudo mount -a
[sudo] password for jrbastien:
mount: wrong fs type, bad option, bad superblock on //192.168.1.103/share,
       missing codepage or helper program, or other error
       (for several filesystems (e.g. nfs, cifs) you might
       need a /sbin/mount.<type> helper program)
       In some cases useful info is found in syslog - try
       dmesg | tail or so

Does anyone know a workaround?

Revision history for this message
urusha (urusha) wrote :

A dirty workaround is to find "Package: samba4" in /var/lib/dpkg/status
and change next line to "Status: install ok installed"

Revision history for this message
Jean-Rene Bastien (jrbastien) wrote :

Curiously, I removed all Samba4 installed components and now everything is fine. Not sure why both Samba 2.35 and 4 were installed by default in 11.10.

Revision history for this message
Marcel Mitsuto Fucatu Sugano (mitsuto) wrote :

I think it's because of evolution-exchange MAPI bindings, but I could be completely wrong! :P

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

evolution-exchange is completely unrelated, so I think you mean evolution-mapi.

That doesn't in any way depend on the samba4 binary package though, it only uses some of the Samba 4 client libraries.

papukaija (papukaija)
summary: - package samba4 4.0.0~alpha17~git20110807.dfsg1-1ubuntu1 failed to
- install/upgrade: subprocess installed post-installation script returned
- error exit status 1
+ [master] package samba4 4.0.0~alpha17~git20110807.dfsg1-1ubuntu1 failed
+ to install/upgrade: subprocess installed post-installation script
+ returned error exit status 1
summary: - [master] package samba4 4.0.0~alpha17~git20110807.dfsg1-1ubuntu1 failed
- to install/upgrade: subprocess installed post-installation script
- returned error exit status 1
+ package samba4 4.0.0~alpha17~git20110807.dfsg1-1ubuntu1 failed to
+ install/upgrade: subprocess installed post-installation script returned
+ error exit status 1
Revision history for this message
Roger Hunwicks (roger-tonic-solutions) wrote :

If you do :
apt-cache show samba4-common-bin

You get:
Package: samba4-common-bin
Priority: optional
Section: universe/net
Installed-Size: 80
Maintainer: Ubuntu Developers <email address hidden>
Original-Maintainer: Samba Debian Maintainers <email address hidden>
Architecture: i386
Source: samba4
Version: 4.0.0~alpha17~git20110807.dfsg1-1ubuntu1
Replaces: samba4-common (<< 2:3.4.0~pre2-1)
Depends: python-samba (= 4.0.0~alpha17~git20110807.dfsg1-1ubuntu1), samba-common (>= 2:3.4.0~pre2-1), python
Conflicts: samba (<< 2:3.3.0~rc2-5), samba-common (<< 2:3.3.0~rc2-5)

I.e. samba4-common-bin depends on a recent version of samba-common, which is why both samba and samba4 components get installed.

Revision history for this message
Roger Hunwicks (roger-tonic-solutions) wrote :

One problem seems to be the samba4 postinst script is getting some values (realm, domain, netbios name, server role) from samba-common, and samba-common doesnt seem to use the values in smb.conf, particularly for domain.

My workaround is to
sudo apt-get install samba4-common-bin

then create replace the smb.conf file with a samba4 one, e.g. generated from a working samba4 installation, such as:
# Global parameters
[global]
 server role = domain controller
 workgroup = EXAMPLE
 realm = example.com
 netbios name = SERVER

[netlogon]
 path = /var/lib/samba/sysvol/example.com/scripts
 read only = No

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

Then run
sudo /var/lib/dpkg/info/samba-common.config

If you don't do the step above, then when samba4 installs, the postinst script attempts to provision the server, but debconf returns the domain as WORKGROUP instead of EXAMPLE and the provision fails - I don't know if this means the bug is in samba-common rather than samba4?

Then run
sudo apt-get install samba4
and it should all work correctly

Jelmer Vernooij (jelmer)
summary: - package samba4 4.0.0~alpha17~git20110807.dfsg1-1ubuntu1 failed to
- install/upgrade: subprocess installed post-installation script returned
- error exit status 1
+ upgradeprovision: guess_names: 'realm =' was not specified in supplied
+ /etc/samba/smb.conf. Please remove the smb.conf file and let provision
+ generate it
Changed in samba4 (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → High
Revision history for this message
Pavlo Verba (pavlo.s.verba) wrote :

I have encountered this issue, but removing the /etc/samba/smb.conf does not seem to help — if I run 'sudo apt-get install samba4-common-bin' after removing it, I still get the following issue. http://paste.ubuntu.com/776943/

How can this issue be relieved? I think this is important, since unless it is done, I can neither upgrade my system, nor install new packages.

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 832465] Re: upgradeprovision: guess_names: 'realm =' was not specified in supplied /etc/samba/smb.conf. Please remove the smb.conf file and let provision generate it

Hi Paul,

Am 21/12/11 01:06, schrieb Paul Somebody:
> I have encountered this issue, but removing the /etc/samba/smb.conf does
> not seem to help — if I run 'sudo apt-get install samba4-common-bin'
> after removing it, I still get the following issue.
> http://paste.ubuntu.com/776943/
>
> How can this issue be relieved? I think this is important, since unless
> it is done, I can neither upgrade my system, nor install new packages.
Until we fix this bug, you should be able to uninstall samba4 by running
"apt-get purge samba4".

Cheers,

Jelmer

Revision history for this message
Pavlo Verba (pavlo.s.verba) wrote :

Greetings, Jelmer.

I am not sure I understand your point in the last comment.

Revision history for this message
UndiFineD (k.dejong) wrote :

I have a fix:
adjust to your naming requirements, after this install of samba4 went fine

by default /etc/hosts
127.0.0.1 localhost
127.0.1.1 svrwebdev

by default /etc/hostname
svrwebdev

replace with:
$ sudo nano /etc/hosts
127.0.0.1 localhost.localdomain localhost
127.0.1.1 svrwebdev.letsxchange.nl svrwebdev

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

$ sudo nano /etc/hostname
svrwebdev.letsxchange.nl

$ sudo /etc/init.d/networking restart

$ sudo apt-get install samba4

Revision history for this message
Landy (landy-zhu) wrote :

Thanks UndiFineD. Your workaround fixed my issue! :D

Revision history for this message
Clinton Bridge (cgbridge1) wrote :

Hi there,
thanks for the link.
I read throu and followed the instructions from Roger Hunwicks (roger-tonic-solutions) #8
and also UndiFineD (k.dejong) #12,
then i got an error saying the server role didn't match in the smb.conf file, so i took a look and it was set to standalone, so to me it looked right.
I then restored my old smb.conf file and got my original error, realm = not specified, i tried adding realm = ACER-UBUNTU (name of my computer) as i have no idea what it should equal,
I then tried to install something and now the error i get is

ProvisioningError: guess_names: 'server role=standalone' in domain controller must match chosen server role '/etc/samba/smb.conf'! Please remove the smb.conf file and let provision generate it

I had a look in my smb.conf file there is no 'server role' entry?

where to from here?
cheers

Revision history for this message
Clinton Bridge (cgbridge1) wrote :

sorry guys i was meant to comment on my question page, i apologize

Jelmer Vernooij (jelmer)
Changed in samba4 (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Jelmer Vernooij (jelmer)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package samba4 - 4.0.0~alpha18.dfsg1-4ubuntu2

---------------
samba4 (4.0.0~alpha18.dfsg1-4ubuntu2) precise; urgency=low

  * Correctly import server role and realm from existing smb.conf file.
    LP: #936891, LP: #832465
  * Force correct realm during upgradeprovision. LP: #728864
 -- Jelmer Vernooij <email address hidden> Fri, 13 Apr 2012 20:36:12 +0200

Changed in samba4 (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Harry Clarke (harry-clarke) wrote :

This bug was fixed in the package samba4 - 4.0.0~alpha18.dfsg1-4ubuntu2

---------------
samba4 (4.0.0~alpha18.dfsg1-4ubuntu2) precise; urgency=low

  * Correctly import server role and realm from existing smb.conf file.
    LP: #936891, LP: #832465
  * Force correct realm during upgradeprovision. LP: #728864
 -- Jelmer Vernooij <email address hidden> Fri, 13 Apr 2012 20:36:12 +0200

OK so you say bug was fixed but I am still in the same position where Samba4 will not install. Since upgrading to 11.10 I have lost all previous Evolution data and can no longer access my Windows network machines. What is happening?

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

> OK so you say bug was fixed but I am still in the same position where Samba4 will not install. Since upgrading to 11.10 I have lost all previous Evolution data and can no longer access my Windows network machines. What is happening?

This bug has been fixed in precise (12.04), not in 11.10.

Note that this bug occurs in the server side of Samba 4, which is experimental. How is this related to evolution?

Revision history for this message
Steven Pemberton (steven-pemberton) wrote :

I just got this bug today with 12.04, 4.0.0~alpha18.dfsg1-4ubuntu2

See https://bugs.launchpad.net/ubuntu/+source/samba4/+bug/1002193

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

> I just got this bug today with 12.04, 4.0.0~alpha18.dfsg1-4ubuntu2
This bug is not fixed in 12.04 but in a later package, which is currently only in quantal (which will be 12.10). Hopefully we can also backport the fix to 12.04.

Revision history for this message
hemna (dickfardos) wrote :

I can't even remove samba4 because when I run apt-get remove samba
the scripts try to INSTALL and configure it before it removes it. And of course the install/configure fails, therefore remove fails. :(

root@hemna:~:# apt-get remove samba
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package samba is not installed, so not removed
The following package was automatically installed and is no longer required:
  libsvga1
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up samba4 (4.0.0~alpha18.dfsg1-4ubuntu2) ...
ERROR: Invalid smb.conf
ERROR: Invalid smb.conf
Administrator password will be set randomly!
Looking up IPv4 addresses
Looking up IPv6 addresses
No IPv6 address will be assigned
Setting up secrets.ldb
Setting up the registry
Setting up the privileges database
Setting up idmap db
Setting up SAM db
Setting up sam.ldb partitions and settings
Setting up sam.ldb rootDSE
Pre-loading the Samba 4 and AD schema
Adding DomainDN: DC=ass
Adding configuration container
Setting up sam.ldb schema
Setting up sam.ldb configuration data
Setting up display specifiers
Adding users container
Modifying users container
Adding computers container
Modifying computers container
Setting up sam.ldb data
Setting up well known security principals
Setting up sam.ldb users and groups
Setting up self join
Traceback (most recent call last):
  File "/usr/share/samba/setup/provision", line 262, in <module>
    useeadb=eadb, next_rid=opts.next_rid, lp=lp)
  File "/usr/lib/python2.7/dist-packages/samba/provision/__init__.py", line 1761, in provision
    am_rodc=am_rodc, lp=lp)
  File "/usr/lib/python2.7/dist-packages/samba/provision/__init__.py", line 1461, in provision_fill
    domainsid, names.dnsdomain, names.domaindn, lp)
  File "/usr/lib/python2.7/dist-packages/samba/provision/__init__.py", line 1385, in setsysvolacl
    os.chown(os.path.join(root, name), -1, gid)
OSError: [Errno 2] No such file or directory: '/tmp/.org.chromium.Chromium.51w0Gh/SingletonCookie'
dpkg: error processing samba4 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 samba4
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Am 22/05/12 20:02, schrieb hemna:
> I can't even remove samba4 because when I run apt-get remove samba
> the scripts try to INSTALL and configure it before it removes it. And of course the install/configure fails, therefore remove fails. :(
>
This is the samba4 package. You would have to run "apt-get remove
samba4", not "apt-get remove samba".

Cheers,

Jelmer

Revision history for this message
Abhijeet Anand (dark.dimension) wrote :

G'day Jelmer,

I have followed all the advices given here, except for #12, however, I am having the same problem as everyone else here had.

First, I was getting the following error:
/var/lib/dpkg/info/samba4.postinst: 14: /var/lib/dpkg/info/samba4.postinst: /usr/share/samba/setoption.pl: Permission denied
So I made it an executable. Interestingly enough it does not have execute bit set by default. Nevertheless, the actual problem persists.

Secondly, I started the error as mentioned in this thread many a times and for which you suggested a solution.
ProvisioningError: guess_names: 'realm =' was not specified in supplied /etc/samba/smb.conf. Please remove the smb.conf file and let provision generate it

Well, removing smb.conf didn't really help, as it gave birth to yet another error. This is more of a vicious circle.
ERROR: Invalid smb.conf
unable to open smb.conf at /usr/share/samba/setoption.pl line 22.

Line 22 is basically trying to open /etc/samba/smb.conf
If the file is present, then Provisioning fails, if it is not, then setoption.pl fails.

A little info on my system:
Ubuntu 12.04
Samba version to be installed: 4.0.0~alpha18.dfsg1-4ubuntu2

I will give #12 a try and see if that helps, however, IMHO I would rather prefer a solution than a workaround :-)

Thanks and Regards,
Abhi

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Hi Abhi,

You're hitting a different bug, not this one. I suspect it would be the same bug as bug 1003496, which is caused by a lack of domain name in the FQDN. 1003496 is fixed in quantal.

Revision history for this message
Abhijeet Anand (dark.dimension) wrote :

G'day Jelmer,

Thanks mate, that helped resolve this issue, however, now I am hitting a new bug #990945
I have put my comments there.

Cheers,
Abhi

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

Other bug subscribers

Remote bug watches

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