Bug 8633 - Samba4 Installation and configuration Error on Ubuntu 11.10
Samba4 Installation and configuration Error on Ubuntu 11.10
Status: RESOLVED INVALID
Product: Samba 4.0
Classification: Unclassified
Component: Other
unspecified
x86 Other
: P5 critical
: ---
Assigned To: Andrew Bartlett
samba4-qa@samba.org
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-28 12:41 UTC by Ajith
Modified: 2011-12-20 19:08 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ajith 2011-11-28 12:41:35 UTC
Hi,

I am not able to install the following error while installing samba using apt-get


root@ajit-Extensa-4630Z:~# apt-get install samba4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  bind9 phpldapadmin samba-gtk swat2
Recommended packages:
  samba4-dsdb-modules
The following packages will be REMOVED:
  samba-tools
The following NEW packages will be installed:
  samba4
0 upgraded, 1 newly installed, 1 to remove and 103 not upgraded.
Need to get 1,609 kB of archives.
After this operation, 20.8 MB disk space will be freed.
Do you want to continue [Y/n]? y
Get:1 http://in.archive.ubuntu.com/ubuntu/ oneiric/universe samba4 i386 4.0.0~alpha17~git20110807.dfsg1-1ubuntu1 [1,609 kB]
Fetched 1,609 kB in 22s (71.5 kB/s)                                            
Preconfiguring packages ...
(Reading database ... 162482 files and directories currently installed.)
Removing samba-tools ...
Selecting previously deselected package samba4.
(Reading database ... 162468 files and directories currently installed.)
Unpacking samba4 (from .../samba4_4.0.0~alpha17~git20110807.dfsg1-1ubuntu1_i386.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up samba4 (4.0.0~alpha17~git20110807.dfsg1-1ubuntu1) ...
Administrator password will be set randomly!
Unknown parameter encountered: "max log size"
Ignoring unknown parameter "max log size"
Unknown parameter encountered: "syslog"
Ignoring unknown parameter "syslog"
Unknown parameter encountered: "unix password sync"
Ignoring unknown parameter "unix password sync"
Unknown parameter encountered: "passwd program"
Ignoring unknown parameter "passwd program"
Unknown parameter encountered: "pam password change"
Ignoring unknown parameter "pam password change"
Unknown parameter encountered: "map to guest"
Ignoring unknown parameter "map to guest"
Unknown parameter encountered: "usershare allow guests"
Ignoring unknown parameter "usershare allow guests"
Unknown parameter encountered: "username map"
Ignoring unknown parameter "username map"
Unknown parameter encountered: "max log size"
Ignoring unknown parameter "max log size"
Unknown parameter encountered: "syslog"
Ignoring unknown parameter "syslog"
Unknown parameter encountered: "unix password sync"
Ignoring unknown parameter "unix password sync"
Unknown parameter encountered: "passwd program"
Ignoring unknown parameter "passwd program"
Unknown parameter encountered: "pam password change"
Ignoring unknown parameter "pam password change"
Unknown parameter encountered: "map to guest"
Ignoring unknown parameter "map to guest"
Unknown parameter encountered: "usershare allow guests"
Ignoring unknown parameter "usershare allow guests"
Unknown parameter encountered: "username map"
Ignoring unknown parameter "username map"
Traceback (most recent call last):
  File "/usr/share/samba/setup/provision", line 256, in <module>
    useeadb=eadb, next_rid=opts.next_rid, lp=lp)
  File "/usr/lib/pymodules/python2.7/samba/provision/__init__.py", line 1602, in provision
    sitename=sitename)
  File "/usr/lib/pymodules/python2.7/samba/provision/__init__.py", line 584, in guess_names
    raise InvalidNetbiosName(netbiosname)
samba.provision.InvalidNetbiosName: The name ''AJIT-EXTENSA-4630Z'' is not a valid NetBIOS name
dpkg: error processing samba4 (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 samba4
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@ajit-Extensa-4630Z:~# 





NOTE : when i install samba-tools, it tends to remove samba and vice -versa (done through the apt-get)


Please contact me, if you require any further information.
MORE: Not able to install samba in CentOS 6.0 using yum.

Please ignore if the buy is well known before.

Thanks
Ajith.
Comment 1 Matthias Dieter Wallnöfer 2011-11-28 15:49:03 UTC
The problem seems to be related to your hostname. I'm reassigning this to Jelmer which is responsible for Ubuntu/Debian packaging. He maybe has an idea how to best circumvent this issue in future.
Comment 2 Jelmer Vernooij 2011-11-28 15:55:11 UTC
This is because of the netbios-name guessing in the standard provision script, there's nothing Ubuntu specific about it.
Comment 3 Ajith 2011-11-28 18:05:36 UTC
Hi 
Yup,  it should work, no matter what the host-name is?

Aj
Comment 4 Ajith 2011-11-28 18:31:09 UTC
Hi 
Yup,  it should work, no matter what the host-name is?

Aj
Comment 5 Matthias Dieter Wallnöfer 2011-11-30 08:54:29 UTC
I think I have figured out your issue: most probably you have an existing "smb.conf" under "/etc/samba". Unfortunately this may lead to compatibility issues.

Hence I would:
- rename the "smb.conf" file under "/etc/samba" to "smb.conf.bak"
- install the "samba4" package

Now it depends on what you plan to do:
- new installation:
  - copy the useful instructions from the old "smb.conf.bak" to the new "smb.conf" generated by s4
- upgrade from s3:
  - rename the old "smb.conf.bak" back to "smb.conf"
  - as far as I can see you have a malformed "netbios name" parameter in the "smb.conf": hence I would shorten it to be at max. 16 characters long
  - invoke the "samba-tool domain samba3upgrade" command (instructions and problem resolutions are found in our samba-technical mailing list archives)
Comment 6 Ajith 2011-11-30 14:39:56 UTC
Hi Matt,

I have shredded out all the previous configuration of Samba ( in fact it was the last samba4 installation!), and tried installing it fresh.But i hit the following error.


Setting up samba-dsdb-modules (4.0.0~alpha17~git20110807.dfsg1-1ubuntu1) ...
Setting up samba4-common-bin (4.0.0~alpha17~git20110807.dfsg1-1ubuntu1) ...
Setting up samba4 (4.0.0~alpha17~git20110807.dfsg1-1ubuntu1) ...
Administrator password will be set randomly!
ProvisioningError: guess_names: 'realm =' was not specified in supplied /etc/samba/smb.conf.  Please remove the smb.conf file and let provision generate it
dpkg: error processing samba4 (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Processing triggers for python-support ...
Errors were encountered while processing:
 samba4
E: Sub-process /usr/bin/dpkg returned an error code (1)



I thought i found out the source and opened the /etc/samba/smb.conf and saw that the NetBIOS name was truncated to 15 characters. Actually my hostname is 18 Character long string.I edited the conf file to put the exact NetBIOS name and tried configuarig it again and hit the following error message....

Administrator password will be set randomly!
Traceback (most recent call last):
  File "/usr/share/samba/setup/provision", line 256, in <module>
    useeadb=eadb, next_rid=opts.next_rid, lp=lp)
  File "/usr/lib/pymodules/python2.7/samba/provision/__init__.py", line 1602, in provision
    sitename=sitename)
  File "/usr/lib/pymodules/python2.7/samba/provision/__init__.py", line 584, in guess_names
    raise InvalidNetbiosName(netbiosname)
samba.provision.InvalidNetbiosName: The name ''AJIT-EXTENSA-4630Z'' is not a valid NetBIOS name
dpkg: error processing samba4 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 samba4

So, we are clearly seeing the source of the error here. Is this NetBIOS name a know limitations published in the SAMBA Knowledge Base. I understand that its clearly a limitation with NetBIOS name standards.


Thanks
Ajith

NOTE : This is not for any production systems, but to help out a friend. If you think, i can contribute by testing any specific modules, let me know, am happy to extend my help.

Thanks
Ajith
Comment 7 Matthias Dieter Wallnöfer 2011-11-30 17:08:52 UTC
Ah, would you like to just perform an upgrade from s4 to a newer s4 release? Then you would not have needed to do a provisioning at all.

If you would like from scratch (as it seems to me) please follow my advice as stated above:

> Hence I would:
> - rename the "smb.conf" file under "/etc/samba" to "smb.conf.bak"
> - (re)install the "samba4" package

This should make sure to not run in any trouble during the package configuration process. You will get a new "smb.conf" file generated with an appropriate netbios name <= 16 characters (it cannot be any longer by convention!). I would not change it.

Last simply copy the important settings (most probably folder shares) from the old "smb.conf.bak" into the new "smb.conf".
Comment 8 Paul Somebody 2011-12-20 17:50:51 UTC
Greetings, gentleman.

I have encountered this problem on the relatively clean install of the Ubuntu 11.10 and despite following you instructions in the comments still experience this issue, as explained in log here. http://paste.ubuntu.com/776580/

Let me clarify it again, I _have_ removed both config file and it's backup from the /etc/samba, but it still gives me this error. I cannot even remove Samba via 'sudo apt-get purge samba', it still gives me this error. :)

Is there anything that can be done about it?

Thanks.
Comment 9 Paul Somebody 2011-12-20 17:55:31 UTC
Let me clarify one more thing — this issue have initially arisen after I have specified hostname for my computer not in accordance to the NetBios standards.

I have changed in the /etc/hosts and in the /etc/hostname and removed the config files, but the issue with Samba remained.
Comment 10 Matthias Dieter Wallnöfer 2011-12-20 19:05:47 UTC
Jelmer, how could we circumvent this issue when installing the samba4 packages?

> ProvisioningError: guess_names: 'realm =' was not specified in supplied
> /etc/samba/smb.conf.  Please remove the smb.conf file and let provision
> generate it
Comment 11 Jelmer Vernooij 2011-12-20 19:08:40 UTC
This is not a bug in Samba 4, but in the Ubuntu Samba 4 package.

Please see the bug report here: https://bugs.launchpad.net/ubuntu/+source/samba4/+bug/832465