Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to install samba, but it fails:

kavinlu@kavinlu-IT:/etc/init.d$ sudo apt-get -f install samba4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libdcerpc-server0 libdcerpc0 libgensec0 libregistry0 libsamba-policy0 python-samba samba4-common-bin
Suggested packages:
  bind9 phpldapadmin samba-gtk swat2
Recommended packages:
  samba4-dsdb-modules
The following NEW packages will be installed:
  libdcerpc-server0 libdcerpc0 libgensec0 libregistry0 libsamba-policy0 python-samba samba4 samba4-common-bin
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/4,143 kB of archives.
After this operation, 23.2 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
Selecting previously deselected package libgensec0.
(Reading database ... 207432 files and directories currently installed.)
Unpacking libgensec0 (from .../libgensec0_4.0.0~alpha17~git20110807.dfsg1-1ubuntu1_amd64.deb) ...
Selecting previously deselected package libdcerpc0.
Unpacking libdcerpc0 (from .../libdcerpc0_4.0.0~alpha17~git20110807.dfsg1-1ubuntu1_amd64.deb) ...
Selecting previously deselected package libregistry0.
Unpacking libregistry0 (from .../libregistry0_4.0.0~alpha17~git20110807.dfsg1-1ubuntu1_amd64.deb) ...
Selecting previously deselected package libdcerpc-server0.
Unpacking libdcerpc-server0 (from .../libdcerpc-server0_4.0.0~alpha17~git20110807.dfsg1-1ubuntu1_amd64.deb) ...
Selecting previously deselected package libsamba-policy0.
Unpacking libsamba-policy0 (from .../libsamba-policy0_4.0.0~alpha17~git20110807.dfsg1-1ubuntu1_amd64.deb) ...
Selecting previously deselected package python-samba.
Unpacking python-samba (from .../python-samba_4.0.0~alpha17~git20110807.dfsg1-1ubuntu1_amd64.deb) ...
Selecting previously deselected package samba4-common-bin.
Unpacking samba4-common-bin (from .../samba4-common-bin_4.0.0~alpha17~git20110807.dfsg1-1ubuntu1_amd64.deb) ...
Selecting previously deselected package samba4.
Unpacking samba4 (from .../samba4_4.0.0~alpha17~git20110807.dfsg1-1ubuntu1_amd64.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up libgensec0 (4.0.0~alpha17~git20110807.dfsg1-1ubuntu1) ...
Setting up libdcerpc0 (4.0.0~alpha17~git20110807.dfsg1-1ubuntu1) ...
Setting up libregistry0 (4.0.0~alpha17~git20110807.dfsg1-1ubuntu1) ...
Setting up libdcerpc-server0 (4.0.0~alpha17~git20110807.dfsg1-1ubuntu1) ...
Setting up libsamba-policy0 (4.0.0~alpha17~git20110807.dfsg1-1ubuntu1) ...
Setting up python-samba (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!
Unknown parameter encountered: "max log size"
Ignoring unknown parameter "max log size"
Unknown parameter encountered: "syslog"
Ignoring unknown parameter "syslog"
Unknown parameter encountered: "passdb backend"
Ignoring unknown parameter "passdb backend"
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: "guest ok"
Ignoring unknown parameter "guest ok"
Unknown parameter encountered: "guest ok"
Ignoring unknown parameter "guest ok"
Unknown parameter encountered: "max log size"
Ignoring unknown parameter "max log size"
Unknown parameter encountered: "syslog"
Ignoring unknown parameter "syslog"
Unknown parameter encountered: "passdb backend"
Ignoring unknown parameter "passdb backend"
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: "guest ok"
Ignoring unknown parameter "guest ok"
Unknown parameter encountered: "guest ok"
Ignoring unknown parameter "guest ok"
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
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)

What's going wrong? How do I fix it?

share|improve this question
    
try apt-get -f install to force an install of the files that didn't get loaded because of the error. Then try apt-get upgrade again, apt-get -f install back and forth until only the package that has the error is left. –  harish.venkat Dec 29 '11 at 5:14
    
I try apt-get -f install but is error. –  Kavin Lu Dec 29 '11 at 6:23
add comment

3 Answers

This is a known bug in the samba4 package - see https://bugs.launchpad.net/ubuntu/+source/samba4/+bug/832465

If you don't need Active Directory DC functionality, I would recommend installing samba 3 (the stable release), and removing samba 4. Samba 3 is in the "samba" package, not the "samba4" package.

share|improve this answer
    
Sorry,Still so. –  Kavin Lu Dec 30 '11 at 4:28
    
You will also need to uninstall Samba4 if you install Samba3, of course. –  jelmer Dec 31 '11 at 16:33
add comment

I have solved the problem in this way:

  1. Use this smb.conf:

    # Global parameters
    [global]
        workgroup = One
        realm = One
        netbios name = Klaptop11-10
        security = share
    
  2. Install the samba-dsdb-modules package. To deal with dependencies, install all these together: samba-common samba-common-bin samba-dsdb-modules samba4 samba4-clients samba4-common-bin

All my samba-related packages are listed here, just in case:

$ dpkg -l | grep smb

ii  **libpam-smbpass**                         2:3.5.11~dfsg-1ubuntu2.1                 pluggable authentication module for Samba
ii  **libsmbclient**                           2:3.5.11~dfsg-1ubuntu2.1                 shared library for communication with SMB/CIFS servers
ii  **python-smbc**                            1.0.10-0ubuntu2                          Python bindings for Samba clients (libsmbclient)

$ dpkg -l | grep samba

ii  **libsamba-hostconfig0**                   4.0.0~alpha17~git20110807.dfsg1-1ubuntu1 Samba host configuration library
ii  **libsamba-policy0**                       4.0.0~alpha17~git20110807.dfsg1-1ubuntu1 Samba policy management
ii  **libsamba-util0**                         4.0.0~alpha17~git20110807.dfsg1-1ubuntu1 Samba utility function library
ii  **python-samba**                           4.0.0~alpha17~git20110807.dfsg1-1ubuntu1 Python bindings for Samba
ii  **samba-common**                           2:3.5.11~dfsg-1ubuntu2.1                 common files used by both the Samba server and client
ii  **samba-common-bin**                       2:3.5.11~dfsg-1ubuntu2.1                 common files used by both the Samba server and client
ii  **samba-dsdb-modules**                     4.0.0~alpha17~git20110807.dfsg1-1ubuntu1 Samba Directory Services Database
ii  **samba4**                                 4.0.0~alpha17~git20110807.dfsg1-1ubuntu1 SMB/CIFS file, NT domain and active directory server (version 4)
ii  **samba4-clients**                         4.0.0~alpha17~git20110807.dfsg1-1ubuntu1 client utilities from Samba 4
ii  **samba4-common-bin**                      4.0.0~alpha17~git20110807.dfsg1-1ubuntu1 Samba 4 common files used by both the server and the client
share|improve this answer
add comment

actual bug is >> https://bugs.launchpad.net/ubuntu/+source/samba4/+bug/857394 <<

But I fixed it by removing reference to the domain controller and adding a line for security, as well making the workgroup and realm the same (in my case they're both called "One" (without quotes)

So the start of my basebones smb.conf reads thus:

    # Global parameters
[global]
    workgroup = One
    realm = One
    netbios name = Klaptop11-10
    security = share

No idea if that's right in terms of samba usage, but I was going to configure it afterwards anyway, all I wanted initially was to stop it erroring constantly. Which this did.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.