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

Klaus Hartnegg hartnegg at uni-freiburg.de
Thu Sep 11 08:13:15 MDT 2014


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


More information about the samba mailing list