[Samba] samba's source code won't compile on ubuntu 14.04 LTS

Matthew Delfino mdelfino.list.samba at KNOCKinc.com
Sat Nov 14 22:54:50 UTC 2015

This is a little rough, but I recently did this with Ubuntu 14.04.3 LTS and Samba source code 4.3.1:

Installing Ubuntu: All steps default except:
- Choose to install "OpenSSH server"

When rebooted:
- sudo -s
- apt-get update
- apt-get upgrade
- apt-get install open-vm-tools #if you have this in a VMware VM
- shutdown -r now

On reboot, login, then...
- vi /etc/network/interfaces
Edit the network settings to that DNS points to any other DCs in your domain. Maybe you haven’t got any. If this is the FSMO, then start with any DNS you normally use for your servers, but change it before promoting it so that it points at itself.

Install prerequisites:
- sudo apt-get install acl attr autoconf bison build-essential debhelper dnsutils docbook-xml docbook-xsl flex gdb krb5-user libacl1-dev libaio-dev libattr1-dev libblkid-dev libbsd-dev libcap-dev libgnutls28-dev libjson-perl libldap2-dev libncurses5-dev libpam0g-dev libparse-yapp-perl libpopt-dev libreadline-dev perl perl-modules pkg-config python-all-dev python-dev python-dnspython python-crypto xsltproc zlib1g-dev
- Answer the Kerberos questions appropriately to your designed setup.

Edit /etc/hosts	localhost	(fully-qualified domain name)	(hostname)

GET REPOSITORY: Download latest zip from https://www.samba.org
- wget https://download.samba.org/pub/samba/stable/samba-4.3.1.tar.gz
- tar -zxf samba-4.3.1.tar.gz

- cd samba-4.3.1/
- sudo ./configure --enable-debug
- sudo make

- sudo make install

- sudo -s
- vi /etc/sudoers
 Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/samba/sbin:/usr/local/samba/bin"
- vi /etc/environment

- apt-get install ntp
- service ntp stop
- ntpdate -B 0.ubuntu.pool.ntp.org
- service ntp start

- vi /etc/fstab
Edit the fstab file to include these three options on line 8: "user_xattr,acl,barrier=1,"

- mv /etc/krb5.conf /etc/krb5.conf.original
- vi /etc/krb5.conf

         default_realm = (YOUR DOMAIN.LAN OR WHATEVER)
         dns_lookup_realm = false
         dns_lookup_kdc = true

- mv /usr/local/samba/etc/smb.conf /usr/local/samba/etc/smb.conf.orig
- shutdown -r now

Log back in after reboot, then PROMOTE TO A DC:
- sudo samba-tool domain provision —realm=(domain.lan) —domain=(DOMAIN-NAME) --adminpass 'XXXXXXX' --server-role=dc --dns-backend=SAMBA_INTERNAL

You’ll also need some init shell scripts to put in /etc/init.d, but I couldn’t find any good examples on the web. I hope this helps!


On 2015.11.14, at 12:36 PM, dropxp-bato at yahoo.it wrote:

> hi,i need to build a samba share server on my house.I trying to do using the package manager apt on ubuntu,but the version in the repository doesn't work caused by a bug.
> So i've tried to compile from source following the instructions taken from linuxfromscratch web-site,but i also have go back a various types of error.there is something that I do not know about the sources?
> Anyone can help me?thanks in advance.bye
> -- 
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba

©2015 KNOCK, inc.  All rights reserved. KNOCK is a registered trademark of KNOCK, inc. This message and any attachments contain information, which is confidential and/or privileged.  If you are not the intended recipient, please refrain from any disclosure, copying, distribution or use of this information.  Please be aware that such actions are prohibited.  If you have received this transmission in error, kindly notify the sender by e-mail.  Your cooperation is appreciated.

More information about the samba mailing list