[Samba] howto upgrade from samba-4.1.6-ubuntu to 4.1.12

Martinx - ジェームズ thiagocmartinsc at gmail.com
Thu Sep 11 18:50:47 MDT 2014


Hi!

Nice procedure!

BTW, I'm maintaining an Ubuntu PPA to backport few packages from Utopic, to
Trusty, including Samba 4.1.11!

Just run:

add-apt-repository ppa:martinx/ig
apt-get update
apt-get dist-upgrade

I'm planning to maintain it until ~2016... Soon as Samba 4.1.12 hits
Utopic, I'll backport it to Trusty.

I'm using it in production, let me know if something goes wrong...

Cheers!
Thiago

On 11 September 2014 11:13, Klaus Hartnegg <hartnegg at uni-freiburg.de> wrote:

> Hi,
>
> I just upgraded in Ubuntu from the ubuntu-package samba 4.1.6 do a
> self-compiled version 4.1.12. If anybody else happens to have the same task
> (pdc, not ad), this is how it worked:
>
> # do all following as root
> sudo su -
>
> # remove ubuntu samba 4.1.6
> aptitude remove samba
>
> # install samba 4.1.12 from source
> aptitude install build-essential libacl1-dev libattr1-dev \
>    libblkid-dev libgnutls-dev libreadline-dev python-dev libpam0g-dev \
>    python-dnspython gdb pkg-config libpopt-dev libldap2-dev \
>    dnsutils libbsd-dev attr krb5-user docbook-xsl libcups2-dev acl
> mkdir /archiv
> cd /archiv
> wget http://ftp.samba.org/pub/samba/stable/samba-4.1.12.tar.gz
> zcat samba-4.1.12.tar.gz | tar xf -
> cd samba-4.1.12
> ./configure
> make
> make install
>
> # copy config from old to new directory structure
> cp -a /etc/samba/*              /usr/local/samba/etc
> cp -a /var/lib/samba/*          /usr/local/samba/var/locks
> cp -a /var/lib/samba/private/*  /usr/local/samba/private
> rm -rf /usr/local/samba/var/locks/private
>
> # adapt upstart config
> cd /etc/init
> edit smbd.conf and change the last line from "exec smbd -F" to
>   exec /usr/local/samba/sbin/smbd -F
> edit nmbd.conf and change the last line from "exec nmbd -D" to
>   exec /usr/local/samba/sbin/nmbd -D
>
> If you are using ad-dc, you must instead adapt the path to the binary in
> /etc/init/samba-ad-dc.conf, and maybe you need to copy some more config
> files.
>
> If your smb.conf uses "include" options, make sure to adapt their paths as
> well.
>
> If you want to keep the main config file in /etc/samba, you could omit the
> first cp command from above, and instead do
> ln -s /etc/samba/smb.conf /usr/local/samba/etc/smb.conf
>
> Finally either
>   reboot
> or
>   initctl reload-configuration
>   service smbd start
>   service nmbd start
>
> hope this helps somebody,
> Klaus
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
>


More information about the samba mailing list