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

Rowland Penny rowlandpenny241155 at gmail.com
Sun Nov 15 08:06:56 UTC 2015


On 14/11/15 22:54, Matthew Delfino wrote:
> 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.

Just press return when asked the questions, you are going to change what 
the questions set.

>
> Edit /etc/hosts
>   127.0.0.1	localhost
>   192.168.123.160	(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
>
> BUILD:
> - cd samba-4.3.1/
> - sudo ./configure --enable-debug
> - sudo make

Please don't run ./configure and make as root

>
> INSTALL:
> - sudo make install
>
> EDIT Search PATHS:
> - 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
>   PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/samba/sbin:/usr/local/samba/bin"

Don't edit /etc/sudoers, use visudo, this includes error checking.

>
> INSTALL NTPD:
> - apt-get install ntp
> - service ntp stop
> - ntpdate -B 0.ubuntu.pool.ntp.org
> - service ntp start
>
> EDIT FSTAB:
> - vi /etc/fstab
> Edit the fstab file to include these three options on line 8: "user_xattr,acl,barrier=1,"

Don't do this, you are just adding the ext4 defaults.

>
> SETUP KERBEROS:
> - mv /etc/krb5.conf /etc/krb5.conf.original
> - vi /etc/krb5.conf
>
>   [libdefaults]
>           default_realm = (YOUR DOMAIN.LAN OR WHATEVER)
>           dns_lookup_realm = false
>           dns_lookup_kdc = true
>
> PREPARE SAMBA:
> - mv /usr/local/samba/etc/smb.conf /usr/local/samba/etc/smb.conf.orig

There will not be a smb.conf, so how can you move it?

> - shutdown -r now

Why?

> 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 are assuming the OP already has a DC and that he wants to run Samba 
in AD mode.

> 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.

Just download the Ubuntu samba packages (don't install them), extract 
the scripts from them and alter the paths to suit your new set up.

Rowland

>   I hope this helps!
>
> Thanks,
> Matthew
>
>
>




More information about the samba mailing list