Results 1 to 5 of 5

Thread: How to install latest Samba4 on Ubuntu?

  1. #1
    Join Date
    Feb 2014
    Beans
    6

    Unhappy How to install latest Samba4 on Ubuntu?

    Hello.
    I want to make AD/DC Samba4 server.
    When i install Samba4 on Ubuntu Server 13.10 i have errors.
    Look.

    Preparing system.
    Code:
    apt-get install build-essential libacl1-dev libattr1-dev \
    libblkid-dev libgnutls-dev libreadline-dev python-dev \
    python-dnspython gdb pkg-config libpopt-dev libldap2-dev \
    dnsutils libbsd-dev attr krb5-user docbook-xsl libcups2-dev acl
    Enable ACL support
    Code:
    cat /etc/fstab
    # /etc/fstab: static file system information.
    #
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    # / was on /dev/sdb1 during installation
    UUID=dffa8d87-bae2-4002-b118-3108f9b8e20e / ext4 errors=remount-ro,user_xattr,acl,barrier=1 0 1
    # swap was on /dev/sdb5 during installation
    UUID=10ff38ce-54b6-459b-82a9-93566f02d401 none swap sw 0 0
    Rebooting server and installing samba4
    Code:
    sudo apt-get install samba4 samba4-common-bin
    Get error
    Code:
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Try to configure
    Code:
    sudo samba-tool domain provision
    Realm: tps7.local
    Domain [tps7]: tps7
    Server Role (dc, member, standalone) [dc]: dc
    DNS backend (SAMBA_INTERNAL, BIND9_FLATFILE, BIND9_DLZ, NONE) [SAMBA_INTERNAL]: SAMBA_INTERNAL
    DNS forwarder IP address (write 'none' to disable forwarding) [192.168.1.1]: 192.168.1.1
    Administrator password:
    Retype password:
    Looking up IPv4 addresses
    Looking up IPv6 addresses
    No IPv6 address will be assigned
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    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=tps7,DC=local
    Adding configuration container
    Setting up sam.ldb schema
    Setting up sam.ldb configuration data
    Setting up display specifiers
    Modifying 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
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_x
    It's true, there is no folder .../samba/vfs and there is no file "acl_xattr.so"
    Google asked me that it fixed in Samba 4.0.9.

    Okay.
    Im trying to build *.deb packet from sources, coz make / make install is not good way (for future - updating and etc.)
    Installing auto-apt и checkinstall
    Code:
    sudo apt-get install auto-apt
    sudo apt-get install checkinstall
    Go to the home directory
    Code:
    cd
    Take last version
    Code:
    wget http://www.samba.org/samba/ftp/samba-latest.tar.gz
    Extract
    Code:
    tar xzf samba*
    Create package
    Code:
    cd samba*
    sudo auto-apt -y run ./configure
    sudo make
    sudo checkinstall -D --install=no
    Install
    Code:
    sudo dpkg -i samba4_4.1.4-1_amd64.deb
    And what i have?..

    Code:
    cd /usr/local/samba
    Code:
     sudo samba-tool
    Traceback (most recent call last):
      File "/usr/bin/samba-tool", line 33, in <module>
        from samba.netcmd.main import cmd_sambatool
      File "/usr/lib/python2.7/dist-packages/samba/netcmd/main.py", line 24, in <module>
        from samba.netcmd.delegation import cmd_delegation
      File "/usr/lib/python2.7/dist-packages/samba/netcmd/delegation.py", line 23, in <module>
        from samba import provision
      File "/usr/lib/python2.7/dist-packages/samba/provision/__init__.py", line 46, in <module>
        from samba.samba3 import smbd, passdb
    ImportError: libdfs_server_ad.so: cannot open shared object file: No such file or directory
    wt..?
    Last edited by insiki2; February 18th, 2014 at 11:04 AM.

  2. #2
    Join Date
    Feb 2014
    Beans
    6

    Re: How to install latest Samba4 on Ubuntu?

    Before i'm trying to install Samba-4.1.4 on Ubuntu Server 12.04 from sources and got error..

    cat /etc/fstab
    Code:
    # /etc/fstab: static file system information.
    #
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    # / was on /dev/sdb1 during installation
    UUID=6a5a4984-594c-4074-9fc4-d7ddc9d907d7 / ext4 acl,user_xattr,errors=remount-ro 0 1
    # swap was on /dev/sdb5 during installation
    UUID=10ff38ce-54b6-459b-82a9-93566f02d401 none swap sw 0 0
    sudo samba-tool domain provision
    Code:
    Realm: tps7.local
    Domain [tps7]: tps7
    Server Role (dc, member, standalone) [dc]: dc
    DNS backend (SAMBA_INTERNAL, BIND9_FLATFILE, BIND9_DLZ, NONE) [SAMBA_INTERNAL]: BIND9_DLZ
    Administrator password:
    Retype password:
    Looking up IPv4 addresses
    Looking up IPv6 addresses
    No IPv6 address will be assigned
    ldb: module schema_load initialization failed : No such object
    ldb: module rootdse initialization failed : No such object
    ldb: module samba_dsdb initialization failed : No such object
    ldb: Unable to load modules for /var/lib/samba/private/sam.ldb: (null)
    samdb_connect failed
    VFS connect failed!
    ERROR(<class 'samba.provision.ProvisioningError'>): Provision failed - ProvisioningError: Your filesystem or build does not support posix ACLs, which s3fs requires. Try the mounting the filesystem with the 'acl' option.
    File "/usr/lib/python2.7/dist-packages/samba/netcmd/domain.py", line 398, in run
    use_rfc2307=use_rfc2307, skip_sysvolacl=False)
    File "/usr/lib/python2.7/dist-packages/samba/provision/__init__.py", line 2052, in provision
    raise ProvisioningError("Your filesystem or build does not support posix ACLs, which s3fs requires. Try the mounting the filesystem with the 'acl' option.")

  3. #3
    Join Date
    Jan 2013
    Beans
    155

    Re: How to install latest Samba4 on Ubuntu?

    Quote Originally Posted by insiki2 View Post
    Before i'm trying to install Samba-4.1.4 on Ubuntu Server 12.04 from sources and got error..

    cat /etc/fstab
    Code:
    # /etc/fstab: static file system information.
    #
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    # / was on /dev/sdb1 during installation
    UUID=6a5a4984-594c-4074-9fc4-d7ddc9d907d7 / ext4 acl,user_xattr,errors=remount-ro 0 1
    # swap was on /dev/sdb5 during installation
    UUID=10ff38ce-54b6-459b-82a9-93566f02d401 none swap sw 0 0
    sudo samba-tool domain provision
    Code:
    Realm: tps7.local
    Domain [tps7]: tps7
    Server Role (dc, member, standalone) [dc]: dc
    DNS backend (SAMBA_INTERNAL, BIND9_FLATFILE, BIND9_DLZ, NONE) [SAMBA_INTERNAL]: BIND9_DLZ
    Administrator password:
    Retype password:
    Looking up IPv4 addresses
    Looking up IPv6 addresses
    No IPv6 address will be assigned
    ldb: module schema_load initialization failed : No such object
    ldb: module rootdse initialization failed : No such object
    ldb: module samba_dsdb initialization failed : No such object
    ldb: Unable to load modules for /var/lib/samba/private/sam.ldb: (null)
    samdb_connect failed
    VFS connect failed!
    ERROR(<class 'samba.provision.ProvisioningError'>): Provision failed - ProvisioningError: Your filesystem or build does not support posix ACLs, which s3fs requires. Try the mounting the filesystem with the 'acl' option.
    File "/usr/lib/python2.7/dist-packages/samba/netcmd/domain.py", line 398, in run
    use_rfc2307=use_rfc2307, skip_sysvolacl=False)
    File "/usr/lib/python2.7/dist-packages/samba/provision/__init__.py", line 2052, in provision
    raise ProvisioningError("Your filesystem or build does not support posix ACLs, which s3fs requires. Try the mounting the filesystem with the 'acl' option.")
    I would replace the following line

    Code:
    UUID=dffa8d87-bae2-4002-b118-3108f9b8e20e / ext4 errors=remount-ro,user_xattr,acl,barrier=1 0 1
    With

    Code:
    UUID=dffa8d87-bae2-4002-b118-3108f9b8e20e / ext4 errors=remount-ro,user_xattr,acl,barrier=1 1     1
    Notice I replaced the zero with a 1. After a failed domain provision you must remove all traces of your initial Samba install or you will get errors about "ProvisioningError("Your filesystem or build does not support posix ACLs, which s3fs requires. Try the mounting the filesystem with the 'acl' option.")."

  4. #4
    Join Date
    Feb 2014
    Beans
    6

    Re: How to install latest Samba4 on Ubuntu?

    I changed 0 to 1 and got
    sudo apt-get install samba4
    Code:
    Чтение списков пакетов… Готово
    Построение дерева зависимостей
    Чтение информации о состоянии… Готово
    Предлагаемые пакеты:
      phpldapadmin samba-gtk swat2 ntp
    НОВЫЕ пакеты, которые будут установлены:
      samba4
    обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено.
    Необходимо скачать 0 B/1 691 kB архивов.
    После данной операции, объём занятого дискового пространства возрастёт на 11,1 MB.
    Предварительная настройка пакетов ...
    Выбор ранее не выбранного пакета samba4.
    (Чтение базы данных … на данный момент установлено 96993 файла и каталога.)
    Распаковывается пакет samba4 (из файла …/samba4_4.0.3+dfsg1-0.1ubuntu1_amd64.deb) …
    Обрабатываются триггеры для ureadahead …
    Обрабатываются триггеры для man-db …
    Настраивается пакет samba4 (4.0.3+dfsg1-0.1ubuntu1) …
    Looking up IPv4 addresses
    Looking up IPv6 addresses
    No IPv6 address will be assigned
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Setting up share.ldb
    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=localdomain
    Adding configuration container
    Setting up sam.ldb schema
    Setting up sam.ldb configuration data
    Setting up display specifiers
    Modifying 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
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Error loading module '/usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so': /usr/lib/x86_64-linux-gnu/samba//vfs/acl_xattr.so: cannot open shared object file: No such file or directory
    error probing vfs module 'acl_xattr': NT_STATUS_UNSUCCESSFUL
    smbd_vfs_init: vfs_init_custom failed for acl_xattr
    Adding DNS accounts
    Creating CN=MicrosoftDNS,CN=System,DC=localdomain
    Creating DomainDnsZones and ForestDnsZones partitions
    Populating DomainDnsZones and ForestDnsZones partitions
    Setting up sam.ldb rootDSE marking as synchronized
    Fixing provision GUIDs
    A Kerberos configuration suitable for Samba 4 has been generated at /var/lib/samba/private/krb5.conf
    Once the above files are installed, your Samba4 server will be ready to use
    Server Role:           active directory domain controller
    Hostname:              tps7dc01
    NetBIOS Domain:        WORKGROUP
    DNS Domain:            localdomain
    DOMAIN SID:            S-1-5-21-2840583755-2156081812-968736069
    samba4 start/running, process 15312
    Обрабатываются триггеры для ureadahead …

  5. #5
    Join Date
    Jan 2013
    Beans
    155

    Re: How to install latest Samba4 on Ubuntu?

    Lets start from the beginning. Remove all traces of Samba. Use the following

    Code:
    apt-get autoremove purge samba4
    Then look for all traces of Samba

    Code:
    locate /samba
    Remove all traces of Samba you find. Autoremove should do this for you. If you find /usr/local/samba make sure to remove this Samba directory. Also remove any krb.conf file from /etc/.

    Install the following


    Code:
    apt-get install build-essential libacl1-dev libattr1-dev libblkid-dev libgnutls-dev libreadline-dev python-dev python-dnspython gdb pkg-config libpopt-dev libldap2-dev dnsutils libbsd-dev attr krb5-user docbook-xsl libcups2-dev acl libpam0g-dev docbook-xsl xsltproc inkscape dnsutils
    Download Samba as a tar.
    Code:
    wget http://ftp.samba.org/pub/samba/samba-4.1.5.tar.gz
    
      tar -zxvf samba-4.1.5.tar.gz
    Change into the extracted folder


    Code:
    cd samba-4.1.5
    Now we need to configure and make samba. These steps will take a while.

    Code:
    ./configure
      sudo make
      sudo make install

    Once this completes we can start configuring our Samba 4 Active Directory domain

    Code:
    sudo /usr/local/samba/bin/samba-tool domain provision

    See below for info on XATTR Support.



    File System Support

    To use the advanced features of Samba4 you need a filesystem that supports both the "user" and "system" xattr namespaces.
    ext3/ext4 File System

    If you are using either ext3 or ext4 for your file system you will need to include the options "user_xattr","acl" and "barrier=1" in your /etc/fstab. For example:
    /dev/mapper/samba4pdc-root / ext4 errors=remount-ro,user_xattr,acl,barrier=1 1 1
    Simply change ext3 to ext4 if you are using it. Normally you will want to just modify the existing line to add those options. Please use caution when modifying your fstab as it can lead to an un-bootable system if the wrong thing is modified.
    The barrier=1 option ensures that tdb transactions are safe against unexpected power loss. A number of sites have corrupted their AD database in sam.ldb by not having this option enabled.
    You also need to compile your kernel with the XATTR, SECURITY, and POSIX_ACL options for your filesystem. For ext3 (change the 3 to a 4 for ext4) that means you need:
    CONFIG_EXT3_FS_XATTR=y
    CONFIG_EXT3_FS_SECURITY=y
    CONFIG_EXT3_FS_POSIX_ACL=y
    If you are running a Linux 2.6 (or greater) kernel with CONFIG_IKCONFIG_PROC defined you can check this with the following command:
    $ zgrep CONFIG_EXT3_FS /proc/config.gz
    File Systems without xattr support

    If you don't have a filesystem with xattr support, then you can simulate it by adding the following line to your smb.conf:
    posix:eadb = /usr/local/samba/eadb.tdb
    that will place all extra file attributes (NT ACLs, DOS EAs, streams etc), in that tdb. It is not efficient, and doesn't scale well, but at least it gives you a choice when you don't have a modern filesystem.
    Testing your filesystem

    To test your filesystem support, install the 'attr' package and run the following 4 commands as root:
    # touch test.txt
    # setfattr -n user.test -v test test.txt
    # setfattr -n security.test -v test2 test.txt
    # getfattr -d test.txt
    # getfattr -n security.test -d test.txt
    You should see output like this:
    # file: test.txt
    user.test="test"
    # file: test.txt
    security.test="test2"
    For ACL testing do the following as root:
    # touch test3.txt
    # setfacl -m g:adm:rwx test3.txt
    # getfacl test3.txt
    and you should get a line like group:adm:rwx in your output.

    If you get any "Operation not supported" errors then it means your kernel is not configured correctly, or your filesystem is not mounted with the right options.
    If you get any "Operation not permitted" errors then it probably means you didn't try the test as root.
    If you are using the posix:eadb option then you don't need to test your filesystem in this manner.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •